OFFSET
0,3
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Delbert L. Johnson, Table of n, a(n) for n = 0..45
D. Shanks and L. P. Schmid, Variations on a theorem of Landau. Part I, Math. Comp., 20 (1966), 551-569.
EXAMPLE
a(4)=6 since 2^4=16 and 1=1^2, 4=2^2, 9=3^2, 12=12*1^2, 13=1^2+12*1^2, 16=4^2.
PROG
(PARI) a(n)=if(n<0, 0, sum(k=1, 2^n, 0<sum(y=0, sqrtint(k\12), issquare(k-12*y^2))))
(PARI) a(n)=local(A); if(n<0, 0, A=qfrep([1, 0; 0, 12], 2^n); sum(k=1, 2^n, A[k]!=0))
(Haskell)
a000021 n = length [() | k <- [1..2^n],
sum [a010052 (k - 12*y^2) | y <- [0..a000196 (k `div` 12)]] > 0]
-- Reinhard Zumkeller, Apr 16 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Feb 07 2000
STATUS
approved
