Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Oct 16 2024 22:26:37
%S 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,
%T 114,117,107,110,112,1033,983,958,930,924,878,902,876,879,8392,8013,
%U 7863,7678,7560,7445,7408,7323,7224,70435,67883,66330,65367,64336,63799,63129,62712,62090
%N Run lengths of the most significant decimal digit in the primes (A077648).
%F a(n) = A000720(A037124(n+6)) - A000720(A037124(n+5)) for n >= 5. - _Pontus von Brömssen_, Oct 07 2024
%e The primes and the run lengths of their initial digits begin
%e primes 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, ...
%e runs \------------/ \----/ \----/
%e lengths 1 1 1 1 4 2 2 ...
%o (Python)
%o from sympy import primepi
%o def A376129(n):
%o if n<5: return 1
%o def f(m): return (lambda x:primepi(10**x[0]*(x[1]+1)))(divmod(m,9))
%o return int(f(n+5)-f(n+4)) # _Chai Wah Wu_, Oct 16 2024
%Y Cf. A000720, A037124, A077648.
%K nonn,base
%O 1,5
%A _Stuart Coe_, Sep 11 2024