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!)
A111938 a(n) = n times number of divisors of n of form 4m+1 - n times number of divisors of form 4m+3. 1

%I #19 Oct 13 2022 06:36:40

%S 1,2,0,4,10,0,0,8,9,20,0,0,26,0,0,16,34,18,0,40,0,0,0,0,75,52,0,0,58,

%T 0,0,32,0,68,0,36,74,0,0,80,82,0,0,0,90,0,0,0,49,150,0,104,106,0,0,0,

%U 0,116,0,0,122,0,0,64,260,0,0,136,0,0,0,72,146,148,0,0,0,0,0,160,81,164

%N a(n) = n times number of divisors of n of form 4m+1 - n times number of divisors of form 4m+3.

%H Amiram Eldar, <a href="/A111938/b111938.txt">Table of n, a(n) for n = 1..10000</a>

%F Multiplicative with a(p^e) = p^e if p = 2; (e+1)*p^e if p == 1 (mod 4); ((1+(-1)^e)/2)*p^e if p == 3 (mod 4).

%F a(n) = n * A002654(n).

%F G.f.: Sum_{k>0} k(x^k-x^(3k))/(1+x^(2k))^2 = Sum_{k>0} -(-1)^k(2k-1)x^(2k-1)/(1-x^(2k-1))^2.

%F G.f.: xd/dx(theta_3(x)^2)/4. - _Michael Somos_, Nov 07 2005

%F G.f.: (1/4)* Sum_{u,v} (u*u +v*v)* x^(u*u +v*v). - _Michael Somos_, Jun 14 2007

%F Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi/8 = 0.392699... (A019675). - _Amiram Eldar_, Oct 13 2022

%t f[p_, e_] := If[Mod[p, 4] == 1, e + 1, (1 + (-1)^e)/2] * p^e; f[2, e_] := 2^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Oct 13 2022 *)

%o (PARI) a(n)=if(n<1, 0, n*sumdiv(n,d, (d%4==1)-(d%4==3)))

%o (PARI) {a(n)=local(r); if(n<1, 0, r=sqrtint(n); sum(x=-r,r, sum(y=-r,r, if(x^2+y^2==n, (x+y)^2) ))/4 )} \\ _Michael Somos_, Sep 12 2005

%o (PARI) {a(n)=if(n<1, 0, n*polcoeff( sum(k=1,sqrtint(n), 2*x^k^2, 1+x*O(x^n))^2, n)/4 )} \\ _Michael Somos_, Sep 12 2005

%Y Cf. A002654, A019675.

%K nonn,mult

%O 1,2

%A _Michael Somos_, Aug 21 2005

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