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!)
A105288 Numbers k such that prime(k+1) == 3 (mod k). 7

%I #29 Dec 30 2022 06:30:37

%S 1,2,4,5,70,440,1055,1058,6461,6466,6469,251752,4124468,27067036,

%T 27067112,69709709,69709957,465769835,8179002104,145935689357,

%U 382465573490

%N Numbers k such that prime(k+1) == 3 (mod k).

%C Integers k such that A004649(k+1) = 3. - _Michel Marcus_, Dec 30 2022

%p n:= 0: p:= 2: count:= 0:

%p for n from 1 while count < 13 do

%p p:= nextprime(p);

%p if p-3 mod n = 0 then

%p count:= count+1;

%p A[count]:= n;

%p fi

%p od:

%p seq(A[i],i=1..count); # _Robert Israel_, May 02 2018

%t bb={};Do[If[3==Mod[Prime[n+1], n], bb=Append[bb, n]], {n, 1, 200000}];bb

%t Join[{1, 2}, Select[Range[2 10^7], Mod[Prime[# + 1], #]==3 &]] (* _Vincenzo Librandi_, May 02 2018 *)

%o (Sage)

%o def A105288(max) :

%o terms = []

%o p = 3

%o for n in range(1, max+1) :

%o if (p - 3) % n == 0 : terms.append(n)

%o p = next_prime(p)

%o return terms

%o # _Eric M. Schmidt_, Feb 05 2013

%o (Magma) [1,2] cat [n: n in [1..2*10^4] | NthPrime(n+1) mod n eq 3]; // _Vincenzo Librandi_, Maj 02 2018

%Y Cf. A004649, A105286, A105287, A105290, A105329, A105451.

%K nonn,more

%O 1,2

%A _Zak Seidov_, Apr 25 2005

%E First two terms inserted by _Eric M. Schmidt_, Feb 05 2013

%E a(12)-a(13) from _Robert Israel_, May 02 2018

%E a(14)-a(21) from _Giovanni Resta_, May 02 2018

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 August 18 15:26 EDT 2024. Contains 375269 sequences. (Running on oeis4.)