login
A234422
Number of primes <= 123...n.
0
0, 5, 30, 202, 1474, 11601, 95360, 809227, 7027260, 556442057, 46063874346, 3930144647471, 342720306370180, 30384643585371049, 2728974793135786013, 247673123284120245960, 22671892206713857205404
OFFSET
1,2
FORMULA
a(n) = A000720(A007908(n)).
EXAMPLE
There are 1474 primes <= 12345 so a(5) = 1474.
MATHEMATICA
PrimePi[Table[FromDigits[Flatten[IntegerDigits[Range[n]]]], {n, 12}]] (* Alonso del Arte, Dec 25 2013 *)
PROG
(Python)
def Num(x):
..num = ''
..for n in range(x):
....num += str(n+1)
..return num
from sympy import primepi
x = 1
while x < 10:
..print(primepi(int(Num(x))), end=', ')
..x += 1
# Edited by Derek Orr, Apr 05 2015
(PARI) s=""; for(n=1, 20, s=concat(s, n); print1(primepi(eval(s)), ", ")) \\ Derek Orr, Apr 05 2015
CROSSREFS
Sequence in context: A128328 A245376 A118346 * A091927 A253076 A165312
KEYWORD
nonn,base,hard,more
AUTHOR
Derek Orr, Dec 25 2013
EXTENSIONS
a(11)-a(12) from Donovan Johnson, Dec 29 2013
a(13)-a(16) from Chai Wah Wu, May 18 2020
a(17) from Chai Wah Wu, May 20 2020
STATUS
approved