OFFSET
0,2
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
Seth A. Troisi,Table of n, a(n) for n = 0..50 (terms 0..35 from Ray Chandler, 36..37 from Pontus von Brömssen)
D. Borwein, J. M. Borwein, P. B. Borwein, R. Girgensohn,Giuga's Conjecture on Primality, Am. Math. Monthly 103 (1) (1996), 40-50.
D. Shanks and L. P. Schmid,Variations on a theorem of Landau. Part I, Math. Comp., 20 (1966), 551-569.
Seth A. Troisi,C++ and Python programs
EXAMPLE
There are 5 integers <= 2^3 of form x^2 - 2y^2. The five (x,y) pairs (1,0), (2,1), (2,0), (3,1), (4,2) give respectively: 1, 2, 4, 7, 8. So a(3) = 5. -Bernard Schott, Feb 10 2019
MATHEMATICA
cnt=0; n=0; Table[n++; While[{p, e}=Transpose[FactorInteger[n]]; If[Select[p^e, MemberQ[{3, 5}, Mod[ #, 8]] &] == {}, cnt++ ]; n<2^k, n++ ]; cnt, {k, 0, 20}] (*T. D. Noe, Jan 19 2009 *)
PROG
(PARI)A000047(n)={ local(f, c=0); for(m=1, 2^n, for(i=1, #f=factor(m)~, abs(f[1, i]%8-4)==1 || next; f[2, i]%2 & next(2)); c++); c} \\ See comment inA035251: m=3 or 5 mod 8;M. F. Hasler, Jan 19 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms fromGiovanni Resta andHarry J. Smith, Jan 24 2009
STATUS
approved
