cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376129 Run lengths of the most significant decimal digit in the primes (A077648).

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