login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A327545 Triangle T(n,k) read by rows giving the number of zeroless polydivisible numbers in base n that have k distinct digits with 1 <= k <= n-1. 4

%I #35 Sep 18 2019 10:32:59

%S 1,4,0,5,2,2,10,14,8,0,7,14,20,2,2,26,39,84,60,27,0,11,47,108,95,63,3,

%T 3,20,101,233,369,289,79,17,0,19,86,306,475,714,409,146,1,1,32,201,

%U 979,2048,3581,3474,1925,449,51,0,17,114,507,1273,2224,2239,1074,230,35,0,0

%N Triangle T(n,k) read by rows giving the number of zeroless polydivisible numbers in base n that have k distinct digits with 1 <= k <= n-1.

%C For k >= n there is no k-digit zeroless polydivisible number in base n.

%H Seiichi Manyama, <a href="/A327545/b327545.txt">Rows n = 2..18, flattened</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Polydivisible_number">Polydivisible number</a>.

%e n | zeroless polydivisible numbers in base n

%e --+------------------------------------------

%e 2 | [1]

%e 3 | [1, 2, 11, 22]

%e 4 | [1, 2, 3, 22, 222], [12, 32], [123, 321]

%e 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.

%e Triangle begins:

%e n\k | 1 2 3 4 5 6 7 8 9

%e -----+----------------------------------------

%e 2 | 1;

%e 3 | 4, 0;

%e 4 | 5, 2, 2;

%e 5 | 10, 14, 8, 0;

%e 6 | 7, 14, 20, 2, 2;

%e 7 | 26, 39, 84, 60, 27, 0;

%e 8 | 11, 47, 108, 95, 63, 3, 3;

%e 9 | 20, 101, 233, 369, 289, 79, 17, 0;

%e 10 | 19, 86, 306, 475, 714, 409, 146, 1, 1;

%o (Ruby)

%o def A(n)

%o d = 0

%o a = (1..n - 1).map{|i| [i]}

%o ary = [n - 1] + Array.new(n - 2, 0)

%o while d < n - 2

%o d += 1

%o b = []

%o a.each{|i|

%o (1..n - 1).each{|j|

%o m = i.clone + [j]

%o if (0..d).inject(0){|s, k| s + m[k] * n ** (d - k)} % (d + 1) == 0

%o b << m

%o ary[m.uniq.size - 1] += 1

%o end

%o }

%o }

%o a = b

%o end

%o ary

%o end

%o def A327545(n)

%o (2..n).map{|i| A(i)}.flatten

%o end

%o p A327545(10)

%Y Row sums give A324020.

%Y T(2*n,2*n-1) gives A181736.

%Y T(n,1) gives A327577.

%Y Cf. A324019, A324205.

%K nonn,base,tabl

%O 2,2

%A _Seiichi Manyama_, Sep 16 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)