OFFSET
1,2
COMMENTS
Subsequence of A004709.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 10 = 2 * 5 that is cubefree. 10^2 + 1 = 101 which is a prime.
a(6) = 14 = 2 * 7 that is cubefree. 14^2 + 1 = 197 which is a prime.
MAPLE
select(t -> isprime(t^2+1) and max(map(f->f[2], ifactors(t)[2]))<=2, [$1..1000]); # Robert Israel, Feb 12 2016
MATHEMATICA
Select[Range[1000], FreeQ[FactorInteger[#], {_, k_ /; k > 2}] && PrimeQ[#^2 + 1] &]
Select[Range[1000], Max[FactorInteger[#][[;; , 2]]]<3&&PrimeQ[#^2+1]&] (* Harvey P. Dale, May 30 2023 *)
PROG
(PARI) for(n=1, 1000, f = factor(n)[, 2]; if ((#f == 0) || vecmax(f) < 3, if (isprime(n^2+1), print1(n, ", "))));
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Feb 12 2016
STATUS
approved