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.

A380885 a(n) is the smallest multiple m*n (m > 1) of n which contains every decimal digit of n, including repetitions.

Original entry on oeis.org

10, 12, 30, 24, 15, 36, 70, 48, 90, 100, 110, 120, 130, 140, 105, 160, 170, 108, 190, 120, 126, 220, 230, 240, 125, 260, 270, 280, 290, 300, 310, 320, 330, 340, 315, 360, 370, 380, 390, 240, 164, 294, 344, 440, 405, 460, 470, 384, 294, 150, 153, 520, 530, 540
Offset: 1

Views

Author

David James Sycamore, Feb 07 2025

Keywords

Comments

Multiple m is in the range 3 <= m <= 10. Sequence is not the same as A087217, where digit order ("string") is important, whereas in this case it is not (however there are many common terms). The first composite departure is a(15) and the first prime departure is a(41); see Example.

Examples

			a(1) = 10 since 10 is the smallest multiple of 1 which contains every digit of 1.
a(15) = 7*15 = 105 since every digit of 15 is present in 105 (note A087217(15) = 150).
a(35) = 315 = 9*35 = A087217(35) because here digits 3 and 5 are in order.
a(41) = 4*41 = 164, the smallest multiple of 41 containing digits 1 and 4. This is the first prime departure from A087217, since A087217(41) = 410.
		

Crossrefs

Cf. A087217.

Programs

  • Mathematica
    Reap[Do[d = DigitCount[n]; k = 2; While[! AllTrue[DigitCount[#] - d, # >= 0 &] &[n*k], k++]; Sow[k *= n], {n, 120}] ][[-1, 1]] (* Michael De Vlieger, Feb 20 2025 *)
  • PARI
    f(d) = vector(10, i, #select(x->(x==(i-1)), d));
    isok(k, v) = my(w=f(digits(k))); for (i=1, 10, if (v[i] > w[i], return(0));); return(1);
    a(n) = my(k=2*n, v=f(digits(n))); while(!isok(k, v), k+=n); k; \\ Michel Marcus, Feb 20 2025
    
  • Python
    from collections import Counter
    def a(n):
        c = Counter(str(n))
        return next(mn for mn in range(2*n, 11*n, n) if Counter(str(mn)) >= c)
    print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Feb 23 2025

Formula

a(n) <= 10*n.

Extensions

More terms from Michel Marcus, Feb 20 2025