|
|
A062061
|
|
Numbers k such that prime(k)+1 divides k^2.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
Prime(4)+1 = 7+1 divides 4^2, so 4 is a term of the sequence.
|
|
MATHEMATICA
|
Select[Range[10^6], Mod[ #^2, Prime[ # ] + 1] == 0 &]
Select[Range[640000], PowerMod[#, 2, Prime[#]+1]==0&] (* The program generates the first seven terms of the sequence. To generate more, increase the Range constant. *) (* Harvey P. Dale, Apr 23 2022 *)
|
|
PROG
|
(PARI) isok(n) = n^2 % (prime(n)+1) == 0; \\ Michel Marcus, Apr 15 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|