OFFSET
1,2
COMMENTS
Integers k such that A004649(k+1) = 3. - Michel Marcus, Dec 30 2022
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 *)
PROG
(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
(Magma) [1, 2] cat [n: n in [1..2*10^4] | NthPrime(n+1) mod n eq 3]; // Vincenzo Librandi, Maj 02 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Apr 25 2005
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
STATUS
approved