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 A387357 #14 Aug 29 2025 10:16:30 %S A387357 1,10,11,60,112,110,210,330,420,630,840,1008,1890,1260,1680,2520,2310, %T A387357 3360,5460,6720,4620,5040,7140,7560,11880,9240,14040,10080,17160, %U A387357 13860,17136,16380,15120,18480,27720,33264,21420,39270,30240,36960,41580,45360,42840,57120,60060,71820,75600,55440 %N A387357 a(n) is the first number with a total of exactly n 1's in the decimal digits of its divisors. %C A387357 a(n) is the least number k such that A385494(k) = n. %H A387357 Robert Israel, <a href="/A387357/b387357.txt">Table of n, a(n) for n = 1..400</a> %F A387357 A385494(a(n)) = n. %e A387357 a(6) = 110 because of the divisors of 110, 1 and 10 each have one 1, 11 and 110 each have two, for a total of 6, and no smaller number works. %p A387357 f:= proc(n) local t; %p A387357 add(numboccur(1, convert(t,base,10)), t = numtheory:-divisors(n)) %p A387357 end proc: %p A387357 N:= 100: # for a(1)..a(N) %p A387357 V:= Vector(N): count:= 0: %p A387357 for x from 1 do %p A387357 v:= f(x); %p A387357 if v <= N and V[v] = 0 then V[v]:= x; count:= count+1; if count = N then break fi fi; %p A387357 od: %p A387357 convert(V,list); %t A387357 a[n_]:=Module[{k=1},While[Count[IntegerDigits[Divisors[k]]//Flatten,1]!=n, k++]; k]; Array[a,48] (* _Stefano Spezia_, Aug 28 2025 *) %o A387357 (Python) %o A387357 from itertools import count, islice %o A387357 def f(n): return sum(str(d).count("1") for d in divisors(n, generator=True)) %o A387357 def agen(): # generator of terms %o A387357 n, adict = 1, dict() %o A387357 for k in count(1): %o A387357 v = f(k) %o A387357 if v not in adict: %o A387357 adict[v] = k %o A387357 while n in adict: yield adict[n]; n += 1 %o A387357 print(list(islice(agen(), 50))) # _Michael S. Branicky_, Aug 27 2025 %Y A387357 Cf. A385494. %K A387357 nonn,base,new %O A387357 1,2 %A A387357 _Robert Israel_, Aug 27 2025