OFFSET
1,2
LINKS
Manfred Scheucher, Sage Script.
MATHEMATICA
Select[Range[650000], Mod[Prime[#+1]-7, #]==0&] (* Harvey P. Dale, Sep 23 2021 *)
PROG
(Python)
def A105421(max) :
terms = []
p = 3
for n in range(1, max+1) :
if (p - 7) % n == 0 : terms.append(n)
p = nextprime(p)
return terms
# Eric M. Schmidt, Feb 05 2013
(PARI) isok(n) = Mod(prime(n + 1), n) == Mod(7, n); \\ Michel Marcus, Apr 05 2015
(PARI) n=0; forprime(p=3, , if(Mod(p, n++)==7, print1(n", "))) \\ Charles R Greathouse IV, Jul 23 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 02 2005
EXTENSIONS
a(1)-a(4) inserted by Eric M. Schmidt, Feb 05 2013
a(19)-a(22) from Harvey P. Dale, Apr 05 2015
a(23)-a(35) from Manfred Scheucher, Jul 23 2015
a(36) from Charles R Greathouse IV, Jul 23 2015
a(37)-a(40) from Max Alekseyev, Aug 31 2024
STATUS
approved