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.

A367359 Value of A121805(k) for k = A367358(n).

This page as a plain text file.
%I A367359 #12 Nov 22 2023 23:56:19
%S A367359 1,12,35,94,135,248,331,461,530,651,744,809,908,1068,2070,3039,4093,
%T A367359 5012,6013,7042,8026,9055,10058,20047,30092,40017,50008,60054,70063,
%U A367359 80065,90022,100058,200051,300060,400093,500028,600074,700013,800022,900055,1000006,2000047,3000008,4000061,5000034,6000055,7000008,8000056,9000013,10000036,20000038,30000029,40000039,50000030,60000051,70000064,80000064,90000077
%N A367359 Value of A121805(k) for k = A367358(n).
%C A367359 These are the terms in A121805 where either the leading digit or the length has just changed.
%o A367359 (Python)
%o A367359 def agen(): # generator of terms
%o A367359     n, an, y, prev_lead, prev_length = 1, 1, 1, None, None
%o A367359     while y < 10:
%o A367359         san = str(an)
%o A367359         lead, length = san[0], len(san)
%o A367359         if lead != prev_lead or length != prev_length:
%o A367359             yield an
%o A367359         an, y = an + 10*(an%10), 1
%o A367359         while y < 10:
%o A367359             if str(an+y)[0] == str(y):
%o A367359                 an += y
%o A367359                 break
%o A367359             y += 1
%o A367359         n, prev_lead, prev_length = n+1, lead, length
%o A367359 print(list(agen())) # _Michael S. Branicky_, Nov 22 2023
%Y A367359 Cf. A121805, A366487, A367358.
%K A367359 nonn,base,fini,full
%O A367359 1,2
%A A367359 _N. J. A. Sloane_, Nov 21 2023
%E A367359 More than the usual number of terms are shown in order to match the data in A367358.
%E A367359 More terms from _Michael S. Branicky_, Nov 22 2023