The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
LINKS
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 04:28 EDT 2024. Contains 373115 sequences. (Running on oeis4.)