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”).
%I #32 Aug 31 2024 21:44:44
%S 1,9,67,437,441,2615,100349,100353,100359,637197,637305,27066969,
%T 27067049,27067101,27067113,27067115,179992839,179993001,55762149071,
%U 382465573491
%N Numbers k such that prime(k+1) == 2 (mod k).
%C Integers k such that A004649(k+1) = 2. - _Michel Marcus_, Dec 30 2022
%t bb={};Do[If[2==Mod[Prime[n+1], n], bb=Append[bb, n]], {n, 1, 200000}];bb
%t 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 *)
%o (Sage)
%o def A105287(max) :
%o terms = []
%o p = 3
%o for n in range(1, max+1) :
%o if (p - 2) % n == 0 : terms.append(n)
%o p = next_prime(p)
%o return terms
%o # _Eric M. Schmidt_, Feb 05 2013
%Y Cf. A004649, A105286, A105288, A105290, A105329, A105451.
%K nonn,more
%O 1,2
%A _Zak Seidov_, Apr 25 2005
%E First term inserted by _Eric M. Schmidt_, Feb 05 2013
%E More terms from _Harvey P. Dale_, May 04 2013
%E a(12)-a(18) from _Michel Marcus_, Dec 29 2022
%E a(19)-a(20) from _Max Alekseyev_, Aug 31 2024