login
A228122
Smallest nonnegative number x such that x^2 + x + 41 has exactly n prime factors counting multiplicities.
4
0, 40, 420, 1721, 14144, 139563, 3019035, 24304266, 206583092, 3838101265
OFFSET
1,2
EXAMPLE
a(1) = 0 because if x = 0 then x^2 + x + 41 = 41, which has 1 prime factor.
a(2) = 40 because if x = 40 then x^2 + x + 41 = 1681 = 41*41, which has 2 prime factors, counting multiplicities.
a(3) = 420 because if x = 420 then x^2 + x + 41 = 176861 = 47*53*71, which has 3 prime factors.
MATHEMATICA
a = {}; Do[x = 0; While[PrimeOmega[x^2 + x + 41] != k, x++]; AppendTo[a, x], {k, 9}]; a
PROG
(PARI) a(n) = {my(m=0); while (bigomega(m^2+m+41) != n, m++); m; } \\ Michel Marcus, Jan 31 2016
(Python)
from sympy import factorint
def A228122(n):
k = 0
while sum(factorint(k*(k+1)+41).values()) != n:
k += 1
return k # Chai Wah Wu, Sep 07 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Shyam Sunder Gupta, Aug 11 2013
EXTENSIONS
a(9) from Zak Seidov, Feb 01 2016
a(10) from Giovanni Resta, Sep 08 2018
STATUS
approved