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.

A366610 Number of successive occurrences of the same first digits in A366585.

This page as a plain text file.
%I A366610 #25 Nov 06 2023 17:22:35
%S A366610 1,1,1,1,4,5,4,2,2,2,2,1,1,97,50,34,25,20,17,14,13,11,995,500,334,250,
%T A366610 200,167,143,125,111,9996,5000,3334,2500,2000,1667,1428,1250,1112,
%U A366610 99992,50000,33334,25000,20000,16667,14286,12500,11111,999995,500000,333334,250000,200000,166667,142857
%N A366610 Number of successive occurrences of the same first digits in A366585.
%H A366610 Chai Wah Wu, <a href="/A366610/b366610.txt">Table of n, a(n) for n = 1..2000</a>
%e A366610 a(6) = 5 because in A366585, the sixth run of same first digit of the terms lasts through five terms: 2021, 2223, 2425, 2627, 2829, each beginning with 2.
%o A366610 (PARI) lista(nn) = my(list=List(), k=1); while (k < nn, my(s="", n=digits(k)[1]); for (j=1, n, s = concat(s, Str(k+j-1));); listput(list, eval(s)); k += n;); my(w = apply(x->digits(x)[1], list)); my(list=List(), last=w[1], nb=1); for (i=2, #w, if (w[i] == last, nb++, listput(list, nb); last=w[i]; nb=1;);); Vec(list, #list-1); \\ _Michel Marcus_, Oct 15 2023
%o A366610 (Python)
%o A366610 from itertools import islice
%o A366610 def A366610_gen(): # generator of terms
%o A366610     a, c = 1, 0
%o A366610     while (c:=c+1):
%o A366610         yield c
%o A366610         c, r = divmod((w:=((t:=int(str(a:=a+int(str(a)[0]))[0]))+1)*10**(len(str(a))-1)-1)-a,t)
%o A366610         a = w-r
%o A366610 A366610_list = list(islice(A366610_gen(),30)) # _Chai Wah Wu_, Nov 04 2023
%Y A366610 Cf. A366585.
%K A366610 nonn,base
%O A366610 1,5
%A A366610 _Tamas Sandor Nagy_, Oct 14 2023
%E A366610 More terms from _Michel Marcus_, Oct 15 2023