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

 


a(n) = Sum_{k = 1..n} (-1)^(n reduced mod k).
1

%I #11 Sep 18 2021 07:09:06

%S 1,2,1,2,1,4,-1,4,1,4,-1,6,-3,8,-1,4,-1,8,-5,10,-3,8,-5,10,-5,10,-3,8,

%T -5,14,-11,14,-7,12,-5,12,-9,14,-7,12,-9,18,-15,20,-9,14,-11,16,-11,

%U 18,-11,16,-13,22,-15,20,-13,18,-15,24,-21,26,-15,18,-11,20,-17,22,-15,24,-21,28,-25,30,-19,24,-17,26,-23,28,-19,24

%N a(n) = Sum_{k = 1..n} (-1)^(n reduced mod k).

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

%F Lim_{n -> infinity} abs(a(n))/n = C = 0.30684(3)....

%t Table[ Sum[(-1)^ Mod[n, k], {k, 1, n}], {n, 1, 81} ]

%o (PARI) a(n)=sum(k=1,n,(-1)^(n%k))

%K sign

%O 1,2

%A _Benoit Cloitre_, Aug 10 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 06:29 EDT 2024. Contains 376143 sequences. (Running on oeis4.)