login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A023149
Numbers k such that prime(k) == 7 (mod k).
13
1, 2, 4, 6, 18, 36, 78, 191, 6456, 6457, 40080, 40081, 637324, 637326, 637344, 10553425, 10553434, 10553477, 10553502, 10553573, 10553854, 27066988, 27067126, 69709680, 69709736, 69709940, 465769818, 3140421716, 3140421740, 3140421743
OFFSET
1,2
LINKS
MATHEMATICA
p = 1; Do[ If[ Mod[p = NextPrime[p], n] == 7, Print[n]], {n, 1, 10^9}] (* Robert G. Wilson v, Feb 18 2004 *)
PROG
(Sage)
def A023149(max) :
terms = []
p = 2
for n in range(1, max+1) :
if (p - 7) % 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(27)-a(31) from Robert G. Wilson v, Feb 22 2006
First four terms inserted by Eric M. Schmidt, Feb 05 2013
STATUS
approved