OFFSET
1,2
MATHEMATICA
a = b = 0; Do[b = Prime[n + 1]; If[Mod[a + b, n] == 1, Print[n]]; a = b, {n, 1, 10^9}]
PROG
(Sage)
def A067185(max):
terms = []
p = 2
for n in range(1, max + 1):
q = next_prime(p)
if not (p + q - 1) % n:
terms.append(n)
p = q
return terms
# Eric M. Schmidt, Feb 05 2013
(PARI) isok(k) = (prime(k+1) + prime(k)) % k == 1; \\ Michel Marcus, Feb 17 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Benoit Cloitre, Feb 19 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Feb 19 2002
Extended by David W. Wilson, Feb 20 2002
a(11)-a(14) from Donovan Johnson, Mar 10 2010
First term from Eric M. Schmidt, Feb 05 2013
STATUS
approved