|
|
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
|
|
|
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
|
|
|
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
|
|
|
KEYWORD
|
nonn,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Roughly 50 percent of the entries corrected by R. J. Mathar, Oct 10 2009
|
|
STATUS
|
approved
|
|
|
|