login

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”).

A224498
Smallest prime that can be expressed as the sum of n distinct positive squares with the largest square as small as possible.
1
5, 29, 71, 79, 131, 179, 269, 349, 457, 569, 719, 971, 1231, 1327, 1721, 1913, 2389, 2749, 3167, 3539, 4099, 4549, 5381, 5717, 6569, 7489, 7879, 8779, 9791, 10711, 11953, 13009, 14549, 15581, 17431, 17863, 19699, 20771, 22921, 25261, 25913, 27689, 30911, 32611
OFFSET
2,1
COMMENTS
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.
Therefore A224498(n) >= A100559(n).
LINKS
EXAMPLE
n=2 -> 1^2 + 2^2 = 5.
n=3 -> 2^2 + 3^2 + 4^2 = 29.
n=4 -> 1^2 + 3^2 + 5^2 + 6^2 = 71.
MAPLE
with(numtheory); with(combinat);
List224498:=proc(q) local a, b, d, f, g, i, j, k, ok, n;
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;
while ok=1 do b:=choose(a, n); f:=infinity; g:={};
for i from 1 to nops(b) do d:=add((b[i][k])^2, k=1..n);
if isprime(d) then ok:=0; if d<f then f:=d; g:=b[i]; fi; fi; od;
if ok=1 then j:=j+1; a:=a union {j}; else print(f); #print(g);
# above print command may be uncommented to show the sum that produces the prime.
fi; od; od; end:
List224498(500);
CROSSREFS
Cf. A100559.
Sequence in context: A097812 A176333 A100559 * A087348 A154412 A339935
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Apr 08 2013
STATUS
approved