OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
169373 is a term since 169373 - 2 = 3^5*17*41 is divisible by 3^4 and 169373 + 2 = 5^4*271 is divisible by 5^4.
MATHEMATICA
q1[n_] := AnyTrue[FactorInteger[n][[;; , 2]], # > 3 &]; q2[p_] := PrimeQ[p] && q1[p - 2] && q1[p + 2]; Select[Range[4*10^6], q2] (* Amiram Eldar, Mar 24 2021 *)
PROG
(PARI) \\ Input no. of iterations n, power p and number to subtract and add k.
powerfreep4(n, p, k) = { c=0; pc=0; forprime(x=2, n, pc++; if(!ispowerfree(x-k, p) && !ispowerfree(x+k, p), c++; print1(x", "); ) ); }
ispowerfree(m, p1) = { flag=1; y=component(factor(m), 2); for(i=1, length(y), if(y[i] >= p1, flag=0; break); ); return(flag); }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 08 2003
STATUS
approved