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.
%I A354410 #33 Jan 12 2023 18:31:55 %S A354410 10,200,1001,1010,1100,3000,10002,10020,10200,12000,20001,20010,20100, %T A354410 21000,40000,100003,100011,100030,100101,100110,100300,101001,101010, %U A354410 101100,103000,110001,110010,110100,111000,130000,200002,200020,200200,202000,220000 %N A354410 Numbers with as many zeros as the sum of their digits. %C A354410 As is normal, there are no leading zeros. The places of k zeros and the nonzero digits that are partitions of k are combinatorial. %C A354410 Numbers k such that A007953(k) = A055641(k). - _Felix Fröhlich_, May 26 2022 %H A354410 Rémy Sigrist, <a href="/A354410/a354410.gp.txt">PARI program</a> %t A354410 Select[Range[250000],DigitCount[#,10,0]==Total[IntegerDigits[#]]&] (* _Harvey P. Dale_, Jan 12 2023 *) %o A354410 (PARI) isok(m) = my(d=digits(m)); vecsum(d) == #select(x->(x==0), d); \\ _Michel Marcus_, May 26 2022 %o A354410 (PARI) See Links section. %o A354410 (Python) # after linked PARI by _Rémy Sigrist_ %o A354410 base, vv, nb = 10, [0], 0 %o A354410 def visit(v, s, z, r): %o A354410 global base, vv, nb %o A354410 if v and s==z: %o A354410 nb += 1 %o A354410 if nb > len(vv): vv.append(len(vv)) %o A354410 vv[nb-1] = v %o A354410 if s-z-r <= 0 and s-z+(base-1)*r >= 0: %o A354410 if v: visit(base*v, s, z+1, r-1) %o A354410 for d in range(1, base): visit(base*v+d, s+d, z, r-1) %o A354410 def auptod(digits): visit(0, 0, 0, digits); return sorted(set(vv)) %o A354410 print(auptod(6)) # _Michael S. Branicky_, May 26 2022 %Y A354410 Subsequence of A011540. %Y A354410 Cf. A007953 (sum of digits), A055641 (number of 0's). %Y A354410 Cf. A031443, A061384. %K A354410 nonn,base %O A354410 1,1 %A A354410 _Tamas Sandor Nagy_, May 25 2022