OFFSET
1,2
LINKS
David A. Corneth, Table of n, a(n) for n = 1..135
David A. Corneth, PARI program
EXAMPLE
72 has 12 divisors: {1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72}, only {1, 2, 3, 4, 6, 8, 9} are repdigits; no positive integer smaller than 72 has seven repdigit divisors, hence a(7) = 72.
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, Length[Union[IntegerDigits[#]]] == 1 &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[24, 10^6] (* Amiram Eldar, Jul 15 2022 *)
PROG
(PARI) isrep(n) = 1==#Set(digits(n)); \\ A010785
a(n) = my(k=1); while (sumdiv(k, d, isrep(d)) != n, k++); k; \\ Michel Marcus, Jul 15 2022
(PARI) \\ See PARI link. - David A. Corneth, Jul 26 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return len(set(str(n))) == 1
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 21))) # Michael S. Branicky, Jul 26 2022
CROSSREFS
KEYWORD
AUTHOR
Bernard Schott, Jul 14 2022
EXTENSIONS
a(9)-a(35) from Michael S. Branicky, Jul 14 2022
a(36)-a(37) from Michael S. Branicky, Jul 15 2022
STATUS
approved