login
A037036
Least k such that 2^n+1-k is a prime.
0
0, 0, 0, 2, 0, 2, 4, 2, 0, 4, 4, 10, 4, 2, 4, 20, 0, 2, 6, 2, 4, 10, 4, 16, 4, 40, 6, 40, 58, 4, 36, 2, 6, 10, 42, 32, 6, 26, 46, 8, 88, 22, 12, 58, 18, 56, 22, 116, 60, 82, 28, 130, 48, 112, 34, 56, 6, 14, 28, 56, 94, 2, 58, 26, 60, 50, 6, 20, 24, 20, 36, 232, 94, 70, 36, 98, 16, 34
OFFSET
0,4
EXAMPLE
a(5)=2 because 2^5+1-2=31 that is a prime.
PROG
(PARI) a(n) = my(k = 0); while (! isprime(2^n+1-k), k++); k; \\ Michel Marcus, Sep 28 2013
CROSSREFS
Cf. A016014.
Sequence in context: A338227 A350861 A144182 * A055947 A015910 A182256
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved