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
Bert Dobbelaere, Table of n, a(n) for n = 0..48
Daniel Shanks and Larry P. Schmid, Variations on a theorem of Landau. Part I, Math. Comp., 20 (1966), 551-569.
EXAMPLE
a(3)=4 since 2^3=8 and 2=2*1^2, 3=3*1^2, 5=2*1^2+3*1^2, 8=2*2^2.
PROG
(PARI) a(n)=if(n<0, 0, sum(k=1, 2^n, 0<sum(y=0, sqrtint(k\3), issquare((k-3*y^2)/2))))
(Python)
import math
def A000075(n):
return len(set([2*x**2+3*y**2 for x in range(1+math.isqrt(2**n//2)) for y in range(1+math.isqrt((2**n-2*x**2)//3)) if 0 < 2*x**2+3*y**2 <= 2**n]))
# Chai Wah Wu, Aug 20 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
