login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A355699
a(n) is the smallest number that has exactly n repdigit divisors.
6
1, 2, 4, 6, 12, 24, 72, 66, 666, 132, 1332, 264, 2664, 792, 13320, 3960, 14652, 26664, 48840, 29304, 79992, 341880, 146520, 399960, 1333332, 1025640, 2799720, 8879112, 2666664, 18666648, 7999992, 44395560, 13333320, 93333240, 39999960, 279999720, 269333064
OFFSET
1,2
LINKS
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
Similar sequences: A087997, A333456, A355303, A355695.
Sequence in context: A093036 A340548 A087997 * A340638 A177905 A118405
KEYWORD
nonn,base,look
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