A376129 Run lengths of the most significant decimal digit in the primes (A077648).
1, 1, 1, 1, 4, 2, 2, 3, 2, 2, 3, 2, 1, 21, 16, 16, 17, 14, 16, 14, 15, 14, 135, 127, 120, 119, 114, 117, 107, 110, 112, 1033, 983, 958, 930, 924, 878, 902, 876, 879, 8392, 8013, 7863, 7678, 7560, 7445, 7408, 7323, 7224, 70435, 67883, 66330, 65367, 64336, 63799, 63129, 62712, 62090
Offset: 1
Examples
The primes and the run lengths of their initial digits begin primes 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, ... runs \------------/ \----/ \----/ lengths 1 1 1 1 4 2 2 ...
Programs
-
Python
from sympy import primepi def A376129(n): if n<5: return 1 def f(m): return (lambda x:primepi(10**x[0]*(x[1]+1)))(divmod(m,9)) return int(f(n+5)-f(n+4)) # Chai Wah Wu, Oct 16 2024
Comments