login
This site is supported by donations 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
2, 5, 3, 3, 6, 16, 12, 12, 15, 37, 24, 30, 33, 55, 39, 45, 77, 54, 88, 66, 66, 72, 109, 84, 129, 99, 99, 142, 105, 108, 126, 175, 138, 138, 200, 153, 211, 168, 171, 233, 186, 244, 201, 201, 204, 268, 222, 303, 243, 243, 316, 255, 255, 267, 349, 282 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..56.

EXAMPLE

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, ...

MATHEMATICA

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]

CROSSREFS

Cf. A000040, A141468, A161669.

Sequence in context: A162405 A141637 A185581 * A281300 A115320 A073480

Adjacent sequences:  A151957 A151958 A151959 * A151961 A151962 A151963

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Jul 14 2009

EXTENSIONS

Edited, corrected and extended by Robert G. Wilson v, Jul 24 2009

Definition clarified by N. J. A. Sloane, Jul 25 2009

Definition corrected by Charles R Greathouse IV, Jul 22 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 21:06 EDT 2019. Contains 328226 sequences. (Running on oeis4.)