A105288 Numbers k such that prime(k+1) == 3 (mod k).
1, 2, 4, 5, 70, 440, 1055, 1058, 6461, 6466, 6469, 251752, 4124468, 27067036, 27067112, 69709709, 69709957, 465769835, 8179002104, 145935689357, 382465573490
Offset: 1
Programs
-
Magma
[1,2] cat [n: n in [1..2*10^4] | NthPrime(n+1) mod n eq 3]; // Vincenzo Librandi, May 02 2018
-
Maple
n:= 0: p:= 2: count:= 0: for n from 1 while count < 13 do p:= nextprime(p); if p-3 mod n = 0 then count:= count+1; A[count]:= n; fi od: seq(A[i],i=1..count); # Robert Israel, May 02 2018
-
Mathematica
bb={};Do[If[3==Mod[Prime[n+1], n], bb=Append[bb, n]], {n, 1, 200000}];bb Join[{1, 2}, Select[Range[2 10^7], Mod[Prime[# + 1], #]==3 &]] (* Vincenzo Librandi, May 02 2018 *)
-
Sage
def A105288(max) : terms = [] p = 3 for n in range(1, max+1) : if (p - 3) % n == 0 : terms.append(n) p = next_prime(p) return terms # Eric M. Schmidt, Feb 05 2013
Extensions
First two terms inserted by Eric M. Schmidt, Feb 05 2013
a(12)-a(13) from Robert Israel, May 02 2018
a(14)-a(21) from Giovanni Resta, May 02 2018
Comments