OFFSET
1,1
COMMENTS
Differs from A086748 by having terms like 17, 257, 289, 323, 391, and 493. Is A086748 a subsequence of this sequence?
The asymptotic density of this sequence is Sum_{q in A019434} (1/q) * Product_{primes p < q} (1 - 1/p) = 0.24500742018276270264... . If there are only 5 Fermat primes, then this density is a rational number: 2.7462024...*10^23743 / 1.1208650...*10^23744.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
fermatQ[p_] := OddQ[p] && p == 2^IntegerExponent[p-1, 2] + 1;
Select[Range[250], fermatQ[FactorInteger[#][[1, 1]]] &]
PROG
(PARI) isfermat(p) = p % 2 && p == 1 << valuation(p-1, 2) + 1;
isok(k) = k > 1 && isfermat(vecmin(factor(k)[, 1]));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jan 09 2026
STATUS
approved
