login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085431
a(n) = (2^(n-1) + prime(n+1)-prime(n))/2.
1
1, 2, 3, 6, 9, 18, 33, 66, 131, 257, 515, 1026, 2049, 4098, 8195, 16387, 32769, 65539, 131074, 262145, 524291, 1048578, 2097155, 4194308, 8388610, 16777217, 33554434, 67108865, 134217730, 268435463, 536870914, 1073741827, 2147483649
OFFSET
1,2
LINKS
EXAMPLE
( (1, 2, 4, 8, 16...) + (1, 2, 2, 4, 2...) ) / 2.
MAPLE
A085431:=n->(2^(n-1)+ithprime(n+1)-ithprime(n))/2: seq(A085431(n), n=1..50); # Wesley Ivan Hurt, Apr 11 2017
MATHEMATICA
f[n_] := 2^(n - 2) + (Prime[n + 1] - Prime[n])/2; Table[ f[n], {n, 1, 34}]
PROG
(Magma) [(2^(n-1)+NthPrime(n+1)-NthPrime(n))/2: n in [1..40]]; // Vincenzo Librandi, Apr 12 2017
CROSSREFS
Sequence in context: A018518 A091326 A113863 * A108862 A298413 A268610
KEYWORD
nonn,easy
AUTHOR
David G. Williams (Davwill24(AT)aol.com), Aug 13 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v and Ray Chandler, Aug 15 2003
STATUS
approved