login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105287 Numbers k such that prime(k+1) == 2 (mod k). 7

%I #28 Dec 30 2022 06:30:44

%S 1,9,67,437,441,2615,100349,100353,100359,637197,637305,27066969,

%T 27067049,27067101,27067113,27067115,179992839,179993001

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 30 22:50 EDT 2024. Contains 373911 sequences. (Running on oeis4.)