A264050 a(n) = least m > 1 such that m + 2^n is prime.
3, 3, 3, 3, 5, 3, 3, 7, 9, 7, 5, 3, 17, 27, 3, 3, 29, 3, 21, 7, 17, 15, 9, 43, 35, 15, 29, 3, 11, 3, 11, 15, 17, 25, 53, 31, 9, 7, 23, 15, 27, 15, 29, 7, 59, 15, 5, 21, 69, 55, 21, 21, 5, 159, 3, 81, 9, 69, 131, 33, 15, 135, 29, 13, 131, 9, 3, 33, 29, 25, 11, 15, 29, 37, 33
Offset: 1
Keywords
Examples
a(56)=81 because m=81 is the least m > 1 such that m + 2^56 is prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..2000
Programs
-
Mathematica
Table[m = 2; While[! PrimeQ[m + 2^n], m++]; m, {n, 75}] (* Michael De Vlieger, Nov 06 2015 *)
-
PARI
a(n)=my(m=2);while(!isprime(m+2^n),m++);m \\ Anders Hellström, Nov 02 2015
-
PARI
a(n)=nextprime(2^n+2)-2^n \\ Charles R Greathouse IV, Nov 02 2015
Extensions
a(60) corrected by Charles R Greathouse IV, Nov 02 2015
Comments