login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163294 a(n) = 2 + Sum_{x=n..prime(n)} (-x*(-1)^x). 1
1, 3, 6, 4, 10, 6, 14, 8, 18, 12, 23, 15, 29, 17, 33, 21, 40, 24, 45, 28, 49, 31, 55, 35, 63, 40, 67, 42, 71, 44, 81, 52, 87, 55, 94, 60, 99, 65, 105, 69, 112, 72, 119, 77, 123, 79, 131, 90, 140, 92, 144, 96, 149, 101, 158, 106, 165, 109, 170, 113, 174, 118, 187, 126, 191 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

EXAMPLE

a(1) = 2 + 1 - 2 = 1;

a(2) = 2 - 2 + 3 = 3;

a(3) = 2 + 3 - 4 + 5 = 6;

a(4) = 2 - 4 + 5 - 6 + 7 = 4;

a(5) = 2 + 5 - 6 + 7 - 8 + 9 - 10 + 11 = 10.

MAPLE

A163294 := proc(n) 2+add( -j*(-1)^j, j=n..ithprime(n)) ; end: seq(A163294(n), n=1..120) ; # R. J. Mathar, Oct 10 2009

MATHEMATICA

Table[2 + Sum[k*(-1)^(k + 1), {k, n, Prime[n]}], {n, 1, 100}] (* G. C. Greubel, Dec 17 2016 *)

PROG

(PARI) for(n=1, 50, print1(2 + sum(k=n, prime(n), k*(-1)^(k+1)), ", ")) \\ G. C. Greubel, Dec 17 2016

CROSSREFS

Cf. A000027, A000040.

Sequence in context: A242224 A294671 A275985 * A168577 A122634 A169846

Adjacent sequences:  A163291 A163292 A163293 * A163295 A163296 A163297

KEYWORD

nonn,less

AUTHOR

Juri-Stepan Gerasimov, Jul 24 2009

EXTENSIONS

Corrected by Juri-Stepan Gerasimov, Jul 26 2009

Edited (but not checked) by N. J. A. Sloane, Jul 27 2009

Roughly 50 percent of the entries corrected by R. J. Mathar, Oct 10 2009

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 December 15 20:00 EST 2019. Contains 330000 sequences. (Running on oeis4.)