login
A387357
a(n) is the first number with a total of exactly n 1's in the decimal digits of its divisors.
5
1, 10, 11, 60, 112, 110, 210, 330, 420, 630, 840, 1008, 1890, 1260, 1680, 2520, 2310, 3360, 5460, 6720, 4620, 5040, 7140, 7560, 11880, 9240, 14040, 10080, 17160, 13860, 17136, 16380, 15120, 18480, 27720, 33264, 21420, 39270, 30240, 36960, 41580, 45360, 42840, 57120, 60060, 71820, 75600, 55440
OFFSET
1,2
COMMENTS
a(n) is the least number k such that A385494(k) = n.
LINKS
FORMULA
A385494(a(n)) = n.
EXAMPLE
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.
MAPLE
f:= proc(n) local t;
add(numboccur(1, convert(t, base, 10)), t = numtheory:-divisors(n))
end proc:
N:= 100: # for a(1)..a(N)
V:= Vector(N): count:= 0:
for x from 1 do
v:= f(x);
if v <= N and V[v] = 0 then V[v]:= x; count:= count+1; if count = N then break fi fi;
od:
convert(V, list);
MATHEMATICA
a[n_]:=Module[{k=1}, While[Count[IntegerDigits[Divisors[k]]//Flatten, 1]!=n, k++]; k]; Array[a, 48] (* Stefano Spezia, Aug 28 2025 *)
PROG
(Python)
from sympy import divisors
from itertools import count, islice
def f(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
def agen(): # generator of terms
n, adict = 1, dict()
for k in count(1):
v = f(k)
if v not in adict:
adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 27 2025
CROSSREFS
Cf. A385494.
Sequence in context: A042413 A041212 A257313 * A335553 A122602 A037958
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 27 2025
STATUS
approved