Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Apr 05 2015 10:46:29
%S 5,29,71,79,131,179,269,349,457,569,719,971,1231,1327,1721,1913,2389,
%T 2749,3167,3539,4099,4549,5381,5717,6569,7489,7879,8779,9791,10711,
%U 11953,13009,14549,15581,17431,17863,19699,20771,22921,25261,25913,27689,30911,32611
%N Smallest prime that can be expressed as the sum of n distinct positive squares with the largest square as small as possible.
%C A similar sequence is A100559. There the minimum prime is considered without any constraints on the set of squares. In fact for n=14 the smallest prime is 1171 that corresponds to the sum of the squares of 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, where the greatest number is 16. Instead in A224498 the minimum prime is 1231 coming from the sum of the squares of 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, where the maximum number is 15 < 16.
%C Therefore A224498(n) >= A100559(n).
%H Paolo P. Lava, <a href="/A224498/b224498.txt">Table of n, a(n) for n = 2..387</a>
%e n=2 -> 1^2 + 2^2 = 5.
%e n=3 -> 2^2 + 3^2 + 4^2 = 29.
%e n=4 -> 1^2 + 3^2 + 5^2 + 6^2 = 71.
%p with(numtheory); with(combinat);
%p List224498:=proc(q) local a,b,d,f,g,i,j,k,ok,n;
%p for n from 2 to q do a:={}; for j from 1 to n do a:=a union {j}; od; ok:=1; j:=j-1;
%p while ok=1 do b:=choose(a,n); f:=infinity; g:={};
%p for i from 1 to nops(b) do d:=add((b[i][k])^2,k=1..n);
%p if isprime(d) then ok:=0; if d<f then f:=d; g:=b[i]; fi; fi; od;
%p if ok=1 then j:=j+1; a:=a union {j}; else print(f); #print(g);
%p # above print command may be uncommented to show the sum that produces the prime.
%p fi; od; od; end:
%p List224498(500);
%Y Cf. A100559.
%K nonn
%O 2,1
%A _Paolo P. Lava_, Apr 08 2013