A371065 a(1)=2; for n > 1, a(n) is the least prime number p > a(n-1) such that p + 2^(n-1) is a prime number.
2, 3, 7, 11, 13, 29, 37, 53, 61, 89, 127, 131, 157, 197, 223, 269, 307, 359, 367, 419, 463, 491, 547, 593, 607, 641, 643, 701, 823, 947, 1213, 1229, 1237, 1319, 1327, 1451, 1723, 2381, 3019, 3299, 3307, 3371, 3847, 4493, 4621, 4931, 5179, 5783, 6043, 6197, 6469
Offset: 1
Keywords
Examples
For n=5, the preceding term a(4)=11 and 2^(5-1)=16, so a(5) is the least prime p > 11 such that p+16 is a prime too, which is p = 13 = a(5). From _Michael De Vlieger_, Mar 10 2024: (Start) Table of first terms: n a(n) 2^(n+1) a(n)+2^(n+1) ------------------------------- 1 2 1 3 2 3 2 5 3 7 4 11 4 11 8 19 5 13 16 29 6 29 32 61 7 37 64 101 8 53 128 181 9 61 256 317 10 89 512 601 11 127 1024 1151 12 131 2048 2179 ... (End)
Links
- Amiram Eldar, Table of n, a(n) for n = 1..5000
Programs
-
Mathematica
a[1] = 2; a[n_] := a[n] = Module[{p = NextPrime[a[n - 1]]}, While[! PrimeQ[p + 2^(n - 1)], p = NextPrime[p]]; p]; Array[a, 50] (* Amiram Eldar, Mar 10 2024 *)