OFFSET
1,1
EXAMPLE
p = 7195291 satisfies 138371^(p-1) == 1 (mod p^2) and 138371 is a factor of 7195292, so 7195291 is a term of the sequence.
PROG
(PARI) is(n) = my(f=factor(n+1)[, 1]~); for(k=1, #f, if(Mod(f[k], n^2)^(n-1)==1, return(1))); 0
forprime(p=1, , if(is(p), print1(p, ", ")))
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Jul 06 2022
EXTENSIONS
a(8) from Michael S. Branicky, Jul 10 2022
STATUS
approved