OFFSET
1,5
FORMULA
EXAMPLE
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 ...
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stuart Coe, Sep 11 2024
STATUS
approved