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!)
A162848 An alternating 2-based sum from prime(n) up to the base of the n-th Mersenne prime. 1
0, 5, 7, 9, 18, 25, 24, 51, 120, 181, 223, 264, 1243, 1455, 3129, 5430, 5616, 7953, 10534, 10953, 24115, 24736, 27910, 49711, 54109, 57873, 111090, 215449, 276096, 329955, 540039, 1891903, 2148379, 3144261, 3495451, 7440328, 7553209, 17431240, 33667044 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Define a 2-based sum S(l,u) = Sum_{j=l..u} (2 - j*(-1)^j). Then a(n) is this sum evaluated with a lower limit l = A000040(n) = prime(n) and with an upper limit u = A000043(n).
LINKS
FORMULA
a(n) = Sum_{j=A000040(n)..A000043(n)} (2 - j*(-1)^j).
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
Sequence in context: A036708 A124822 A072180 * A259359 A024571 A186406
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected from a(8) on by R. J. Mathar, Aug 14 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 18:45 EDT 2024. Contains 375044 sequences. (Running on oeis4.)