login
A387615
Table of T(b,n) read by ascending antidiagonals, where T(b,n) is the smallest positive integer k for which every nonzero digit in base b appears in the k first multiples of n for b>=2, n>=1.
2
1, 2, 1, 3, 2, 1, 4, 6, 2, 1, 5, 4, 2, 2, 1, 6, 15, 4, 3, 1, 1, 7, 6, 10, 3, 3, 2, 1, 8, 28, 6, 8, 4, 2, 1, 1, 9, 8, 7, 6, 3, 4, 2, 2, 1, 10, 45, 24, 14, 5, 5, 4, 6, 2, 1, 11, 10, 9, 8, 6, 4, 5, 4, 3, 2, 1, 12, 66, 10, 23, 8, 10, 6, 7, 3, 3, 1, 1, 13, 12, 44, 10, 18, 12, 4, 6, 20, 4, 2, 2, 1
OFFSET
2,2
LINKS
Julian Zbigniew Kuryllowicz-Kazmierczak, Table of n, a(n) for n = 2..11326
FORMULA
T(b,n) = T(b,b*n), T(2,n) = 1, T(b,1) = b-1, T(b,b-1) = ceiling(b/2) for every b>=2, n>=1.
If b and n are coprime and b>=2n-1, T(b,n) = b-1.
If b and n are not coprime and b>n, T(b,n) = ceiling(b(b-1)/n).
EXAMPLE
T(10,12)=13, because the smallest multiple of 12 containing the digit 5 is 13*12=156, and the rest of the digits shows up in smaller multiples.
Table begins:
1 2 3 4 5 6 7
----------------------
2 | 1 1 1 1 1 1 1
3 | 2 2 2 2 1 2 1
4 | 3 6 2 3 3 2 2
5 | 4 4 4 3 4 4 4
6 | 5 15 10 8 3 5 5
7 | 6 6 6 6 5 4 6
PROG
(PARI) isok(k, b, n) = my(s=[]); for (i=1, k, my(d=digits(i*n, b)); s = setunion(s, Set(d)); ); #select(x->(x>0), s) == b-1;
T(b, n) = my(k=1); while (!isok(k, b, n), k++); k;
matrix(10, 20, b, n, T(b+1, n)) \\ Michel Marcus, Sep 04 2025
CROSSREFS
KEYWORD
nonn,tabl,base
STATUS
approved