OFFSET
1,2
COMMENTS
Integers k such that A004649(k+1) = 2. - Michel Marcus, Dec 30 2022
MATHEMATICA
bb={}; Do[If[2==Mod[Prime[n+1], n], bb=Append[bb, n]], {n, 1, 200000}]; bb
With[{nn=640000}, Flatten[Position[Thread[{Range[nn], Prime[Range[2, nn+1]]}], _?(Mod[Last[#]-2, First[#]]==0&), {1}, Heads->False]]] (* Harvey P. Dale, Sep 23 2021 *)
PROG
(Sage)
def A105287(max) :
terms = []
p = 3
for n in range(1, max+1) :
if (p - 2) % n == 0 : terms.append(n)
p = next_prime(p)
return terms
# Eric M. Schmidt, Feb 05 2013
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Apr 25 2005
EXTENSIONS
First term inserted by Eric M. Schmidt, Feb 05 2013
More terms from Harvey P. Dale, May 04 2013
a(12)-a(18) from Michel Marcus, Dec 29 2022
a(19)-a(20) from Max Alekseyev, Aug 31 2024
STATUS
approved