A373210 Least k such that the smallest prime >= 2^k is 2^k + 2*n + 1, or -1 if no such k exists.
0, 3, 5, 10, 9, 29, 64, 22, 13, 162, 19, 39, 34, 14, 17, 36, 60, 25, 74, 87, 121, 24, 151, 209, 170, 111, 35, 50, 188, 45, 96, 247, 193, 124, 49, 115, 258, 83, 173, 254, 56, 167, 136, 138, 279, 148, 314, 153, 158, 106, 199, 434, 93, 161, 6954, 104, 719, 240, 164
Offset: 0
Keywords
Examples
a(6) = 64, because the smallest prime >= 2^k is not 2^k + 13 for 0 <= k <= 63, while the smallest prime >= 2^64 is 2^64 + 13.
Links
- Michael S. Branicky, Table of n, a(n) for n = 0..127
Programs
-
PARI
A373210_first_N_terms(N) = my(v = vector(N+1, i, -1), dist); v[1] = 0; for(i=2, oo, dist = nextprime(2^i) - 2^i; if(dist <= 2*N+1 && v[(dist+1)/2] == -1, v[(dist+1)/2] = i); if(vecmin(v) > -1, return(v))) \\ Warning: ignoring Sierpinski numbers
Extensions
a(54) and beyond from Michael S. Branicky, May 29 2024
Comments