login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000047 Number of integers <= 2^n of form x^2 - 2y^2.
(Formerly M0701 N0259)
3

%I M0701 N0259 #48 Dec 19 2022 10:17:26

%S 1,2,3,5,8,15,26,48,87,161,299,563,1066,2030,3885,7464,14384,27779,

%T 53782,104359,202838,394860,769777,1502603,2936519,5744932,11249805,

%U 22048769,43248623,84894767,166758141,327770275,644627310,1268491353,2497412741

%N Number of integers <= 2^n of form x^2 - 2y^2.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Seth A. Troisi, <a href="/A000047/b000047.txt">Table of n, a(n) for n = 0..50</a> (terms 0..35 from Ray Chandler, 36..37 from Pontus von Brömssen)

%H D. Borwein, J. M. Borwein, P. B. Borwein, R. Girgensohn, <a href="http://www.jstor.org/stable/2975213">Giuga's Conjecture on Primality</a>, Am. Math. Monthly 103 (1) (1996), 40-50.

%H D. Shanks and L. P. Schmid, <a href="http://dx.doi.org/10.1090/S0025-5718-1966-0210678-1">Variations on a theorem of Landau. Part I</a>, Math. Comp., 20 (1966), 551-569.

%H <a href="/index/Qua#quadpop">Index entries for sequences related to populations of quadratic forms</a>

%H Seth A. Troisi, <a href="https://github.com/sethtroisi/OEIS/tree/main/A000047">C++ and Python programs</a>

%e 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

%t 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 *)

%o (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 in A035251: m=3 or 5 mod 8; _M. F. Hasler_, Jan 19 2009

%Y Cf. A035251.

%K nonn

%O 0,2

%A _N. J. A. Sloane_

%E More terms from _Giovanni Resta_ and _Harry J. Smith_, Jan 24 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 10:45 EDT 2024. Contains 371709 sequences. (Running on oeis4.)