login
A023151
Numbers k such that prime(k) == 9 (mod k).
12
1, 2, 10, 11, 35, 37, 80, 100364, 251711, 251717, 251731, 251735, 251741, 251770, 4124456, 4124582, 27067096, 27067520, 69709706, 69709717, 69709723, 69709868, 69709931, 69709933, 465769825, 465769826, 465769831, 1208198548, 8179002130
OFFSET
1,2
LINKS
MATHEMATICA
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 9, Print[n]], {n, 1, 10^9}] (* Robert G. Wilson v, Feb 18 2004 *)
PROG
(Sage)
def A023151(max) :
terms = []
p = 2
for n in range(1, max+1) :
if (p - 9) % n == 0 : terms.append(n)
p = next_prime(p)
return terms
# Eric M. Schmidt, Feb 05 2013
KEYWORD
nonn
EXTENSIONS
More terms from Robert G. Wilson v, Feb 18 2004
a(25)-a(29) from Robert G. Wilson v, Feb 22 2006
First two terms inserted by Eric M. Schmidt, Feb 05 2013
STATUS
approved