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.

A367358 Indices k at which either the leading digit or the length of A121805(k) changes.

This page as a plain text file.
%I A367358 #12 Nov 22 2023 08:16:36
%S A367358 1,2,3,4,5,7,8,11,13,17,19,21,22,24,45,69,90,107,127,145,164,185,204,
%T A367358 422,614,822,1007,1174,1392,1585,1757,1943,4115,6039,8123,9974,11641,
%U A367358 13814,15738,17822,19673,41413,60643,81477,99995,114281,132138,151369,172201,190720,408111,646206,854539,1039724,1373058,1551630,1743937,1952271
%N A367358 Indices k at which either the leading digit or the length of A121805(k) changes.
%o A367358 (Python)
%o A367358 def agen(): # generator of terms
%o A367358     n, an, y, prev_lead, prev_length = 1, 1, 1, None, None
%o A367358     while y < 10:
%o A367358         san = str(an)
%o A367358         lead, length = san[0], len(san)
%o A367358         if lead != prev_lead or length != prev_length:
%o A367358             yield n
%o A367358         an, y = an + 10*(an%10), 1
%o A367358         while y < 10:
%o A367358             if str(an+y)[0] == str(y):
%o A367358                 an += y
%o A367358                 break
%o A367358             y += 1
%o A367358         n, prev_lead, prev_length = n+1, lead, length
%o A367358 print(list(agen())) # _Michael S. Branicky_, Nov 22 2023
%Y A367358 Cf. A121805, A366487, A367359.
%K A367358 nonn,base,fini,full
%O A367358 1,2
%A A367358 _N. J. A. Sloane_, Nov 21 2023
%E A367358 More terms from _Michael S. Branicky_, Nov 22 2023