OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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
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