OFFSET
1,2
COMMENTS
EXAMPLE
a(1) = 2 - 2 = 0;
a(2) = 2 + 3 = 5;
a(3) = 2 + 5 = 7;
a(4) = 2 + 7 = 9;
a(5) = 2 + 11 + 2 - 12 + 2 + 13 = 18.
MAPLE
A152832 := proc(n) (n+1)/2-(9*(-1)^n+1)/4 ; end:
S := proc(u) 2*u-(-1)^u*A152832(u) ; end:
A000043 := proc(n) op(n, [ 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607,
1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497,
86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917 ]) ; end:
A162848 := proc(n) S( A000043(n))-S(ithprime(n)-1) ; end: seq(A162848(n), n=1..39) ; # R. J. Mathar, Aug 14 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 21 2009
EXTENSIONS
Corrected from a(8) on by R. J. Mathar, Aug 14 2009
STATUS
approved