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!)
A094572 Number of pairs of integers x, y (of either sign) with x^2 - y^2 = n. 5

%I #14 Apr 13 2024 05:13:42

%S 2,0,4,2,4,0,4,4,6,0,4,4,4,0,8,6,4,0,4,4,8,0,4,8,6,0,8,4,4,0,4,8,8,0,

%T 8,6,4,0,8,8,4,0,4,4,12,0,4,12,6,0,8,4,4,0,8,8,8,0,4,8,4,0,12,10,8,0,

%U 4,4,8,0,4,12,4,0,12,4,8,0,4,12,10,0,4,8,8,0,8,8,4,0,8,4,8,0,8,16,4,0,12,6

%N Number of pairs of integers x, y (of either sign) with x^2 - y^2 = n.

%C The old entry with this sequence number was a duplicate of A058071.

%D M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 236.

%H Ray Chandler, <a href="/A094572/b094572.txt">Table of n, a(n) for n = 1..10000</a>

%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references).

%F a(n) = 2d(n) if n is odd, = 2d(n/4) if n == 0 mod 4, otherwise 0, where d() = A000005().

%F a(n) = 2 * A112329(n). - _Ray Chandler_, Aug 23 2014

%F From _Amiram Eldar_, Apr 13 2024: (Start)

%F Dirichlet g.f.: 2*zeta(s)^2*(1 + 2^(1-2*s) - 2^(1-s)).

%F Sum_{k=1..n} a(k) ~ n*log(n) + (2*gamma-1)*n, where gamma is Euler's constant (A001620). (End)

%p with(numtheory); f:=proc(n) if n mod 2 = 1 then RETURN(2*tau(n)); fi; if n mod 4 = 0 then RETURN(2*tau(n/4)); fi; 0; end;

%t Table[If[OddQ[n],2DivisorSigma[0,n],If[OddQ[n/2],0,2DivisorSigma[0,n/4]]],{n,100}] (* _Ray Chandler_, Aug 23 2014 *)

%o (PARI) a(n) = if(n%2, 2 * numdiv(n), if(n % 4 == 0, 2 * numdiv(n/4), 0)); \\ _Amiram Eldar_, Apr 13 2024

%Y Cf. A000005, A001620, A093061, A112329.

%K nonn,changed

%O 1,1

%A _N. J. A. Sloane_, Nov 02 2008

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 23 13:04 EDT 2024. Contains 371913 sequences. (Running on oeis4.)