Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Smallest number which can be represented as the sum of distinct squares of primes in exactly n ways, or 0 if no such integer exists.
1

%I #16 Oct 14 2024 23:57:47

%S 4,410,1014,1494,1685,2188,2335,2573,2717,2863,3054,3389,3224,3654,

%T 3534,4014,4232,4183,4254,4064,4589,4618,4544,4593,4903,5193,5503,

%U 5215,5579,5433,5455,5673,5962,5983,6158,6178,5744,5864,5984,5913,6223,6273,6678,6393,6442,6513,6870,6535,7038,7015

%N Smallest number which can be represented as the sum of distinct squares of primes in exactly n ways, or 0 if no such integer exists.

%C It appears that 1275 is the first k for which a(k) = 0. - _Robert Israel_, Oct 14 2024

%H Robert Israel, <a href="/A287965/b287965.txt">Table of n, a(n) for n = 1..1274</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%F A111900(a(n)) = n.

%e a(2) = 410 because 410 = 7^2 + 19^2 = 11^2 + 17^2 and this is the smallest number that can be written as the sum of distinct squares of primes in 2 different ways.

%p N:= 100: # to try with primes up to N

%p P:= select(isprime, [2,seq(i,i=3..N,2)]):

%p nP:= nops(P):

%p S:= mul(1+x^(P[i]^2), i=1..nP):

%p M:= 100: # for a(1) .. a(M)

%p V:= Vector(M): count:= 0:

%p for i from 4 to N^2 while count < M do

%p r:= coeff(S,x,i);

%p if r >= 1 and r <= M and V[r] = 0 then count:= count+1; V[r]:= i; fi

%p od:

%p convert(V,list); # _Robert Israel_, Oct 14 2024

%Y Cf. A001248, A048261, A097563, A111900, A121518.

%K nonn,changed

%O 1,1

%A _Ilya Gutkovskiy_, Jun 03 2017