OFFSET
1,1
COMMENTS
If p is a term, so that there are primes q,r,s such that q^2|p-3, r^2|p-2 and s^2|p-1, then the sequence includes all primes == p (mod q^2*r^2*s^2). In particular, the sequence is infinite, and a(n)/(n*log(n)) is bounded above and below by constants. - Robert Israel, Sep 09 2018
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
EXAMPLE
98 = 2*7^2, 99 = 3^2*11 and 100 = 2^2*5^2. So 101 is a term.
MAPLE
Res:= NULL: count:= 0:
p:= 1;
while count < 100 do
p:= nextprime(p);
if not ormap(numtheory:-issqrfree, [p-1, p-2, p-3]) then
count:= count+1; Res:= Res, p
fi
od:
Res; # Robert Israel, Sep 09 2018
MATHEMATICA
Select[Prime[Range[2000]], !SquareFreeQ[# - 1] && !SquareFreeQ[# - 2] && !SquareFreeQ[# - 3]&] (* Jean-François Alcover, Sep 17 2018 *)
Select[Prime[Range[1500]], NoneTrue[#-{1, 2, 3}, SquareFreeQ]&] (* Harvey P. Dale, Apr 11 2022 *)
PROG
(PARI) isok(p) = isprime(p) && !issquarefree(p-1) && !issquarefree(p-2) && !issquarefree(p-3); \\ Michel Marcus, Sep 09 2018
(Magma) [p: p in PrimesUpTo(13000) | not IsSquarefree(p-1) and not IsSquarefree(p-2) and not IsSquarefree(p-3)]; // Vincenzo Librandi, Sep 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 08 2018
STATUS
approved