cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A228122 Smallest nonnegative number x such that x^2 + x + 41 has exactly n prime factors counting multiplicities.

This page as a plain text file.
%I A228122 #24 Sep 08 2018 02:29:38
%S A228122 0,40,420,1721,14144,139563,3019035,24304266,206583092,3838101265
%N A228122 Smallest nonnegative number x such that x^2 + x + 41 has exactly n prime factors counting multiplicities.
%e A228122 a(1) = 0 because if x = 0 then x^2 + x + 41 = 41, which has 1 prime factor.
%e A228122 a(2) = 40 because if x = 40 then x^2 + x + 41 = 1681 = 41*41, which has 2 prime factors, counting multiplicities.
%e A228122 a(3) = 420 because if x = 420 then x^2 + x + 41 = 176861 = 47*53*71, which has 3 prime factors.
%t A228122 a = {}; Do[x = 0; While[PrimeOmega[x^2 + x + 41] != k, x++]; AppendTo[a, x], {k, 9}]; a
%o A228122 (PARI) a(n) = {my(m=0); while (bigomega(m^2+m+41) != n, m++); m;} \\ _Michel Marcus_, Jan 31 2016
%o A228122 (Python)
%o A228122 from sympy import factorint
%o A228122 def A228122(n):
%o A228122     k = 0
%o A228122     while sum(factorint(k*(k+1)+41).values()) != n:
%o A228122         k += 1
%o A228122     return k # _Chai Wah Wu_, Sep 07 2018
%Y A228122 Cf. A005846, A007634, A145292, A145293, A056561.
%K A228122 nonn,more
%O A228122 1,2
%A A228122 _Shyam Sunder Gupta_, Aug 11 2013
%E A228122 a(9) from _Zak Seidov_, Feb 01 2016
%E A228122 a(10) from _Giovanni Resta_, Sep 08 2018