login
A037035
Least k such that 2^n+1+k is a prime.
1
0, 0, 0, 2, 0, 4, 2, 2, 0, 8, 6, 4, 2, 16, 26, 2, 0, 28, 2, 20, 6, 16, 14, 8, 42, 34, 14, 28, 2, 10, 2, 10, 14, 16, 24, 52, 30, 8, 6, 22, 14, 26, 14, 28, 6, 58, 14, 4, 20, 68, 54, 20, 20, 4, 158, 2, 80, 8, 68, 130, 32, 14, 134, 28, 12, 130, 8, 2, 32, 28, 24, 10, 14, 28, 36, 32, 14
OFFSET
0,4
EXAMPLE
a(5)=4 because 2^5+1+4=37 that is a prime.
PROG
(PARI) a(n) = k = 0; while (! isprime(2^n+k+1), k++); k; \\ Michel Marcus, Sep 27 2013
CROSSREFS
Cf. A016014.
A013597(n) - 1.
Sequence in context: A211318 A324239 A274706 * A159984 A240697 A271230
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved