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.

A381700 a(n) is the smallest multiple k*n that contains all the distinct digits of n, where k > 0 must have at least one digit > 1.

Original entry on oeis.org

12, 12, 36, 24, 15, 36, 147, 48, 189, 120, 132, 192, 312, 714, 105, 416, 714, 108, 912, 120, 126, 132, 322, 432, 125, 624, 702, 728, 928, 360, 713, 832, 132, 1394, 315, 936, 703, 836, 936, 240, 164, 294, 344, 264, 405, 644, 1457, 384, 294, 150, 153, 1352, 1325, 1458, 165, 1456, 3705, 1508, 295
Offset: 1

Views

Author

Ali Sada and M. F. Hasler, Mar 04 2025

Keywords

Comments

The restriction on k is to avoid trivial solutions where k is a sum of distinct powers of 10. Even if we exclude that k*n starts with the digits of n, most terms would correspond to k = 10^L+1 where L is about half the number of digits of n, so that the initial and final digits of the product are "trivially" those of n.
Asymptotically 100% of positive integers n have a(n) = 2*n. In particular, for n <= x, a(n) > 2*n occurs at most O(x^k) where k = log 9/log 10 = 0.954.... - Charles R Greathouse IV, Mar 20 2025
Is a(n)/n bounded? Define b(n) = a(n)/n; then b(42941736805) = 5609 is the largest I know. - Charles R Greathouse IV, Apr 24 2025

Examples

			36 is the least nontrivial multiple of 6 that contains the digit 6, so a(6) = 36.
		

Crossrefs

Cf. A380885 (without different start constraint).

Programs

  • Magma
    A381700 := function(n)
        S := Set(Intseq(n));
        k := 1;
        repeat
            k +:= 1;
            digitsKn := Set(Intseq(k*n));
        until (S subset digitsKn) and (Max(Intseq(k)) ge 2);
        return k*n;
    end function;
    [ A381700(n) : n in [1..60] ]; // Vincenzo Librandi, Mar 17 2025
  • Mathematica
    A381700[n_Integer]:=Module[{S,k,digitsKn},S=DeleteDuplicates[IntegerDigits[n]]; (* Set of digits of n *) k=1;
    While[k++;
    digitsKn=DeleteDuplicates[IntegerDigits[k n]];
    !(SubsetQ[digitsKn,S]&&Max[IntegerDigits[k]]>=2)];
    k n] (* Vincenzo Librandi, Mar 17 2025 *)
  • PARI
    A381700(n)=my(S=Set(digits(n))); for(k=2,oo, #setminus(S,Set(digits(k*n))) || vecmax(digits(k))<2 || return(k*n));