# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a319228 Showing 1-1 of 1 %I A319228 #26 Sep 18 2018 12:14:52 %S A319228 6,32,189,1410,10751,88118,745582,6456835,56988601,510007598, %T A319228 4615215645 %N A319228 Number of primes of the form b^2 + b + 1 for b <= 10^n. %e A319228 a(1) = 6 because there are 6 primes of the form b^2 + b + 1 for b <= 10: 3, 7, 13, 31, 43 and 73. %o A319228 (PARI) {a(n) = sum(k=0, 10^n, isprime(k^2+k+1))} %o A319228 (Python) %o A319228 from sympy import isprime %o A319228 def A319228(n): %o A319228 c, b, b2, n10 = 0, 1, 3, 10**n %o A319228 while b <= n10: %o A319228 if isprime(b2): %o A319228 c += 1 %o A319228 b += 1 %o A319228 b2 += 2*b %o A319228 return c # _Chai Wah Wu_, Sep 17 2018 %Y A319228 Cf. A002383, A002384, A206709. %K A319228 nonn,more %O A319228 1,1 %A A319228 _Seiichi Manyama_, Sep 14 2018 %E A319228 a(10) from _Chai Wah Wu_, Sep 17 2018 %E A319228 a(11) from _Chai Wah Wu_, Sep 18 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE