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!)
A318734 a(n) = Sum_{k=1..n} (-1)^(k + 1) * d(2*k - 1), where d(k) is the number of divisors of k (A000005). 5

%I #21 Sep 17 2018 08:49:32

%S 1,-1,1,-1,2,0,2,-2,0,-2,2,0,3,-1,1,-1,3,-1,1,-3,-1,-3,3,1,4,0,2,-2,2,

%T 0,2,-4,0,-2,2,0,2,-4,0,-2,3,1,5,1,3,-1,3,-1,1,-5,-3,-5,3,1,3,-1,1,-3,

%U 3,-1,2,-2,2,0,4,2,6,-2,0,-2,2,-2

%N a(n) = Sum_{k=1..n} (-1)^(k + 1) * d(2*k - 1), where d(k) is the number of divisors of k (A000005).

%H Hugo Pfoertner, <a href="/A318734/b318734.txt">Table of n, a(n) for n = 1..10000</a>

%H Hugo Pfoertner, <a href="/A318734/a318734.pdf">Records of A318734,</a> showing negative and positive records.

%t a[n_] := Sum[(-1)^(k + 1) DivisorSigma[0, 2 k - 1], {k, 1, n}];

%t Array[a, 100] (* _Jean-François Alcover_, Sep 17 2018 *)

%o (PARI) s=0;j=-1;forstep(k=1,141,2,j=-j;s=s+j*numdiv(k);print1(s,", "))

%o (PARI) a(n) = sum(k=1, n, (-1)^(k+1)*numdiv(2*k-1)); \\ _Michel Marcus_, Sep 08 2018

%Y Cf. A000005, A099774, A006218, A222068.

%Y Records and their positions: A318735, A318736, A318737, A318738.

%K sign,look

%O 1,5

%A _Hugo Pfoertner_, Sep 05 2018

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)