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!)
A151960 Sum_{x = A141468(n) to A000040(n)} 1-(-1)^x*x. 0

%I #6 May 01 2013 21:10:56

%S 2,5,3,3,6,16,12,12,15,37,24,30,33,55,39,45,77,54,88,66,66,72,109,84,

%T 129,99,99,142,105,108,126,175,138,138,200,153,211,168,171,233,186,

%U 244,201,201,204,268,222,303,243,243,316,255,255,267,349,282

%N Sum_{x = A141468(n) to A000040(n)} 1-(-1)^x*x.

%e a(1)=1-0+1+1+1-2=2, a(2)=1+1+1-2+1+3=5, a(3)=1-4+1+5=3, a(4)=1-6+1+7=3, a(5)=1-8+1+9+1-10+1+11=6, a(6)=1+9+1-10+1+11+1-12+1+13=16, a(7)=1-10+1+11+1-12+1+13+1-14+1+15+1-16+1+17=12, a(8)=1-12+1+13+1-14+1+15+1-16+1+17+1-18+1+19=12, a(9)=1-14+1+15+1-16+1+17+1-18+1+19+1-20+1+21+1-22+1+23=15, a(10)=1+15+1-16+1+17+1-18+1+19+1-20+1+21+1-22+1+23+1-24+1+25+1-26+1+27+1-28+1+29=37, ...

%t ZeroAndNonPrime[n_Integer] := FixedPoint[n - 1 + PrimePi@# &, n - 1 + PrimePi@n]; ZeroAndNonPrime[2] = 1; f[n_] := Sum[1-(-1)^x*x, {x, ZeroAndNonPrime@n, Prime@n}]; Array[f, 56]

%Y Cf. A000040, A141468, A161669.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Jul 14 2009

%E Edited, corrected and extended by _Robert G. Wilson v_, Jul 24 2009

%E Definition clarified by _N. J. A. Sloane_, Jul 25 2009

%E Definition corrected by _Charles R Greathouse IV_, Jul 22 2010

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 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)