login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A073050
a(n) = prime(2^n + 2) - prime(2^n + 1) - 1.
0
1, 1, 5, 1, 1, 3, 5, 5, 3, 3, 9, 11, 5, 21, 1, 3, 23, 1, 31, 15, 17, 17, 15, 91, 9, 13, 9, 41, 43, 7, 97, 69, 7, 35, 7, 23, 5, 19, 63, 5, 35, 25, 21, 29, 29, 9, 117, 29, 3, 85, 119, 35, 37, 127, 9, 51, 5, 9, 47, 33, 49, 83, 83, 19, 41, 5, 17, 95, 3, 29, 29, 401, 25, 143, 19, 27, 65, 57
OFFSET
1,3
COMMENTS
Total sum of the second differences of the primes (A036263) to 2^n.
MATHEMATICA
a[n_] := Prime[2^n+2]-Prime[2^n+1]-1; a/@Range[26]
PROG
(Python)
from sympy import nextprime, prime
def a(n): p = prime(2**n + 1); return nextprime(p) - p - 1
print([a(n) for n in range(1, 25)]) # Michael S. Branicky, Dec 27 2021
CROSSREFS
Sequence in context: A346916 A359667 A010129 * A366426 A154740 A179261
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Aug 15 2002
EXTENSIONS
a(42)-a(47) from Michael S. Branicky, Dec 27 2021
a(48)-a(78) from Michael S. Branicky, Dec 30 2021 using A033844
STATUS
approved