login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Paolo P. Lava, Table of n, a(n) for n = 2..387

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 A236075

Adjacent sequences:  A224495 A224496 A224497 * A224499 A224500 A224501

KEYWORD

nonn

AUTHOR

Paolo P. Lava, Apr 08 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 5 03:58 EDT 2020. Contains 333238 sequences. (Running on oeis4.)