OFFSET
2,2
COMMENTS
For k >= n there is no k-digit zeroless polydivisible number in base n.
LINKS
Seiichi Manyama, Rows n = 2..18, flattened
Wikipedia, Polydivisible number.
EXAMPLE
n | zeroless polydivisible numbers in base n
--+------------------------------------------
2 | [1]
3 | [1, 2, 11, 22]
4 | [1, 2, 3, 22, 222], [12, 32], [123, 321]
So T(2,1) = 1, T(3,1) = 4, T(3,2) = 0, T(4,1) = 5, T(4,2) = 2, T(4,3) = 2.
Triangle begins:
n\k | 1 2 3 4 5 6 7 8 9
-----+----------------------------------------
2 | 1;
3 | 4, 0;
4 | 5, 2, 2;
5 | 10, 14, 8, 0;
6 | 7, 14, 20, 2, 2;
7 | 26, 39, 84, 60, 27, 0;
8 | 11, 47, 108, 95, 63, 3, 3;
9 | 20, 101, 233, 369, 289, 79, 17, 0;
10 | 19, 86, 306, 475, 714, 409, 146, 1, 1;
PROG
(Ruby)
def A(n)
d = 0
a = (1..n - 1).map{|i| [i]}
ary = [n - 1] + Array.new(n - 2, 0)
while d < n - 2
d += 1
b = []
a.each{|i|
(1..n - 1).each{|j|
m = i.clone + [j]
if (0..d).inject(0){|s, k| s + m[k] * n ** (d - k)} % (d + 1) == 0
b << m
ary[m.uniq.size - 1] += 1
end
}
}
a = b
end
ary
end
def A327545(n)
(2..n).map{|i| A(i)}.flatten
end
p A327545(10)
CROSSREFS
KEYWORD
AUTHOR
Seiichi Manyama, Sep 16 2019
STATUS
approved