|
|
A180278
|
|
Smallest nonnegative integer k such that k^2 + 1 has exactly n distinct prime factors.
|
|
15
|
|
|
0, 1, 3, 13, 47, 447, 2163, 24263, 241727, 2923783, 16485763, 169053487, 4535472963, 36316463227, 879728844873, 4476534430363, 119919330795347, 1374445897718223, 106298577886531087
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(2) = 3 because the 2 distinct prime factors of 3^2 + 1 are {2, 5};
a(10) = 16485763 because the 10 distinct prime factors of 16485763^2 + 1 are {2, 5, 13, 17, 29, 37, 41, 73, 149, 257}.
|
|
MATHEMATICA
|
a[n_] := a[n] = Module[{k = 1}, If[n == 0, Return[0]]; Monitor[While[PrimeNu[k^2 + 1] != n, k++]; k, {n, k}]]; Table[a[n], {n, 0, 8}] (* Robert P. P. McKone, Sep 13 2023 *)
|
|
PROG
|
(Python)
from itertools import count
from sympy import factorint
return next(k for k in count() if len(factorint(k**2+1)) == n) # Pontus von Brömssen, Sep 12 2023
(PARI) a(n)=for(k=0, oo, if(omega(k^2+1) == n, return(k))) \\ Andrew Howroyd, Sep 12 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(9), a(10) and example corrected; a(11) added, Donovan Johnson, Aug 27 2012
|
|
STATUS
|
approved
|
|
|
|