login
A099300
Number of times the digit 9 appears in the first 10^n digits of Pi after the decimal point.
13
1, 14, 106, 1014, 9902, 100106, 1000040, 9999521, 100000273, 1000036012, 9999956635, 99999854780
OFFSET
1,2
REFERENCES
Alfred S. Posamentier and Ingmar Lehmann, A Biography of the World's Most Mysterious Number, Prometheus Books, Amherst, NY 2004, page 129.
LINKS
Eric Weisstein's World of Mathematics, Pi Digits.
EXAMPLE
Pi = 3.1415926535..., so A099294(1) = 1, A099296(1) = 3, and a(1) = 1.
MATHEMATICA
$MaxPrecision = 1100000; dp = Drop[ RealDigits[Pi, 10, 1000010] [[1]], 1]; Table[ Count[ Take[dp, 10^n], 9], {n, 6}]
PROG
(Python) # call with d = 0..8 for A099291..A099299
from sympy import S
def a(n, d=9): return str(S.Pi.n(10**n + 2))[2:-1].count(str(d))
print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Jan 14 2021
KEYWORD
nonn,base,more
AUTHOR
Robert G. Wilson v, Oct 11 2004
EXTENSIONS
Name clarified by Michael S. Branicky, Jan 15 2021
STATUS
approved