OFFSET
1,1
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.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..10^5.
FORMULA
a(n) <= 10*n.
EXAMPLE
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David James Sycamore, Feb 07 2025
EXTENSIONS
More terms from Michel Marcus, Feb 20 2025
STATUS
approved