OFFSET
1,1
COMMENTS
a(n) is prime for n = 2, 8, 15, 23, 29, ... a(n) is semiprime for n = 1, 4, 5, 7, 10, 11, 16, 21, 22, 24, 26, ... a(n) is a perfect power for n = 1, 13, 14, 20, ... Coincidentally, a(20) = 529 = 23^2 = sum of squares of first 18 digits of pi.
FORMULA
a(n) = sum(i=1 to n) A001113(i)^2.
EXAMPLE
a(1) = 2^2 = 4,
a(2) = 2^2 + 7^2 = 53, which is prime,
a(3) = 2^2 + 7^2 + 1^2 = 54,
a(4) = 2^2 + 7^2 + 1^2 + 8^2 = 118,
a(5) = 2^2 + 7^2 + 1^2 + 8^2 + 2^2 = 122.
MATHEMATICA
Accumulate[RealDigits[E, 10, 50][[1]]^2] (* Harvey P. Dale, Apr 05 2011 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Oct 05 2005
EXTENSIONS
More terms from Harvey P. Dale, Apr 05 2011.
STATUS
approved