login
A111209
Difference between the powers of two and the primes.
4
0, 1, 3, 9, 21, 51, 111, 237, 489, 995, 2017, 4059, 8151, 16341, 32721, 65483, 131013, 262083, 524221, 1048505, 2097079, 4194225, 8388525, 16777127, 33554335, 67108763, 134217625, 268435349, 536870803, 1073741711, 2147483521, 4294967165, 8589934455, 17179869045
OFFSET
1,3
COMMENTS
2*a(n) < a(n+1) because 2*prime(n) > prime(n+1) (see A062234). We have a(n) - a(1) < a(n+1) - a(n) so this is a B_2 sequence. - Thomas Ordowski, Sep 23 2014
FORMULA
a(n) = 2^n - prime(n).
a(n) = A000079(n) - A000040(n). - Wesley Ivan Hurt, Sep 23 2014
MAPLE
A111209:=n->2^n-ithprime(n): seq(A111209(n), n=1..30); # Wesley Ivan Hurt, Sep 23 2014
MATHEMATICA
Table[2^n - Prime[n], {n, 25}]
PROG
(PARI) vector(50, n, 2^n - prime(n)) \\ Michel Marcus, Sep 23 2014
(Magma) [2^n-NthPrime(n) : n in [1..30]]; // Wesley Ivan Hurt, Sep 23 2014
CROSSREFS
Sequence in context: A369343 A105544 A119917 * A262444 A372559 A109755
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Oct 25 2005
EXTENSIONS
More terms from Michel Marcus, Sep 23 2014
STATUS
approved