OFFSET
1,1
COMMENTS
By Sylvester's solution to the Frobenius problem, all integers greater than 4*9 - 4 - 9 = 23 can be represented as a sum of multiples of 4 and 9. Hence all primes except 2,3,5,7,11,19,23 are in this sequence. [Charles R Greathouse IV, Apr 19 2010]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
J. J. Sylvester, "Question 7382" in Mathematical Questions from the Educational Times, 37 (1884), p. 26 (search for 7382).
Eric Weisstein's World of Mathematics, Sum of Squares Function
Eric Weisstein's World of Mathematics, Coin Problem
EXAMPLE
A000040(11) = 31 = 3^2 + 3^2 + 3^2 + 2^2, therefore 31 is a term.
MATHEMATICA
Join[{13, 17}, Prime[Range[10, 100]]] (* Harvey P. Dale, May 12 2014 *)
PROG
(PARI) a(n)=if(n<3, [13, 17][n], prime(n+7))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 19 2002
EXTENSIONS
Comments, reference, and links by Charles R Greathouse IV, Apr 19 2010
STATUS
approved