A111209 Difference between the powers of two and the primes.
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
Programs
-
Magma
[2^n-NthPrime(n) : n in [1..30]]; // 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}]
-
PARI
vector(50, n, 2^n - prime(n)) \\ Michel Marcus, Sep 23 2014
Formula
a(n) = 2^n - prime(n).
Extensions
More terms from Michel Marcus, Sep 23 2014
Comments