cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A355699 a(n) is the smallest number that has exactly n repdigit divisors.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Jul 14 2022

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

a(9)-a(35) from Michael S. Branicky, Jul 14 2022
a(36)-a(37) from Michael S. Branicky, Jul 15 2022
Showing 1-1 of 1 results.