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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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, 3, 20, 101, 233, 369, 289, 79, 17, 0, 19, 86, 306, 475, 714, 409, 146, 1, 1, 32, 201, 979, 2048, 3581, 3474, 1925, 449, 51, 0, 17, 114, 507, 1273, 2224, 2239, 1074, 230, 35, 0, 0
Offset: 2

Views

Author

Seiichi Manyama, Sep 16 2019

Keywords

Comments

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

Examples

			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;
		

Crossrefs

Row sums give A324020.
T(2*n,2*n-1) gives A181736.
T(n,1) gives A327577.

Programs

  • 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)

A327571 Triangle T(n,k) read by rows giving the number of zeroless polydivisible numbers in base n that contains only "k" in the digits with 1 <= k <= n-1.

Original entry on oeis.org

1, 2, 2, 1, 3, 1, 2, 2, 4, 2, 1, 2, 1, 2, 1, 4, 4, 4, 4, 6, 4, 1, 2, 1, 2, 1, 3, 1, 2, 2, 4, 2, 2, 4, 2, 2, 1, 3, 1, 4, 1, 3, 1, 4, 1, 2, 2, 6, 2, 2, 6, 2, 2, 6, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 4, 4, 4, 6, 4, 4, 4, 4, 6, 4, 4
Offset: 2

Views

Author

Seiichi Manyama, Sep 17 2019

Keywords

Examples

			n | zeroless polydivisible numbers with all digits the same in base n
--+------------------------------------------------------------------
2 | [1]
3 | [1, 11], [2, 22]
4 | [1], [2, 22, 222], [3]
So T(2,1) = 1, T(3,1) = 2, T(3,2) = 2, T(4,1) = 1, T(4,2) = 3, T(4,3) = 1.
Triangle begins:
n\k  | 1  2  3  4  5  6  7  8  9 10 11 12
-----+------------------------------------
   2 | 1;
   3 | 2, 2;
   4 | 1, 3, 1;
   5 | 2, 2, 4, 2;
   6 | 1, 2, 1, 2, 1;
   7 | 4, 4, 4, 4, 6, 4;
   8 | 1, 2, 1, 2, 1, 3, 1;
   9 | 2, 2, 4, 2, 2, 4, 2, 2;
  10 | 1, 3, 1, 4, 1, 3, 1, 4, 1;
  11 | 2, 2, 6, 2, 2, 6, 2, 2, 6, 2;
  12 | 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1;
  13 | 4, 4, 4, 4, 6, 4, 4, 4, 4, 6, 4, 4;
		

Crossrefs

Row sums give A327577.

Programs

  • Ruby
    def T(k, n)
      s = 0
      (0..n - 2).each{|i|
        s += k * n ** i
        return i if s % (i + 1) > 0
      }
      n - 1
    end
    def A327571(n)
      (2..n).map{|i| (1..i - 1).map{|j| T(j, i)}}.flatten
    end
    p A327571(10)

Formula

T(n,1) = T(n,n-1) = A071222(n-2).
T(n,1) <= T(n,k).
T(n,2*m) >= 2 for m >= 1.
Showing 1-2 of 2 results.