OFFSET
1,2
MATHEMATICA
PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1} ] & /@ FactorInteger[ n ]]; f[n_] := Block[{k = n + 1}, If[EvenQ[k], k++ ]; While[ PrimeQ[k] || Union[ PowerMod[ PrimeFactors[n], k - 1, k]] != {1}, k += 2]; k]; a = {1}; b = {9}; Do[ If[ SquareFreeQ[n], c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[n]]], {n, 2, 145000}]; a
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert G. Wilson v, Sep 18 2004
EXTENSIONS
a(13)-a(25) from Amiram Eldar, Jul 07 2021
STATUS
approved