Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Sep 08 2022 08:45:11
%S 1,2,3,6,9,18,33,66,131,257,515,1026,2049,4098,8195,16387,32769,65539,
%T 131074,262145,524291,1048578,2097155,4194308,8388610,16777217,
%U 33554434,67108865,134217730,268435463,536870914,1073741827,2147483649
%N a(n) = (2^(n-1) + prime(n+1)-prime(n))/2.
%H Vincenzo Librandi, <a href="/A085431/b085431.txt">Table of n, a(n) for n = 1..1000</a>
%e ( (1, 2, 4, 8, 16...) + (1, 2, 2, 4, 2...) ) / 2.
%p A085431:=n->(2^(n-1)+ithprime(n+1)-ithprime(n))/2: seq(A085431(n), n=1..50); # _Wesley Ivan Hurt_, Apr 11 2017
%t f[n_] := 2^(n - 2) + (Prime[n + 1] - Prime[n])/2; Table[ f[n], {n, 1, 34}]
%o (Magma) [(2^(n-1)+NthPrime(n+1)-NthPrime(n))/2: n in [1..40]]; // _Vincenzo Librandi_, Apr 12 2017
%Y Cf. A000079, A001223.
%K nonn,easy
%O 1,2
%A David G. Williams (Davwill24(AT)aol.com), Aug 13 2003
%E Edited and extended by _Robert G. Wilson v_ and _Ray Chandler_, Aug 15 2003