OFFSET
1,2
COMMENTS
a(n) is prime for n = 2, 5, 11, 17, 25, 29. a(n) is semiprime for n = 3, 4, 6, 10, 12, 13, 14, 15, 19, 22, 26, 27. a(n) is a perfect square for n = 1, 3, 7, 10, 19.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{i=1..n} A000002(i)^2.
MATHEMATICA
A000002[n_]:= If[n<3, Max[0, n], Module[{an = {1, 2, 2}, m = 3}, While[Length[an] < n, an = Join[an, Table[Mod[m, 2, 1], {an[[m]]}]]; m++]; an[[n]]]]; Table[Sum[A000002[j]^2, {j, n}], {n, 1, 70}] (* G. C. Greubel, Dec 18 2019; Somos code of A000002 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 13 2005
STATUS
approved