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-3 of 3 results.

A324020 Total number of zeroless polydivisible numbers in base n.

Original entry on oeis.org

1, 4, 9, 32, 45, 236, 330, 1108, 2157, 12740, 7713, 93710, 65602, 230342, 570128, 5007682, 2484863, 36896861, 16618196, 81481351, 266303823, 1991227852, 533069755, 7599786619, 13636829615, 35633175288, 43994413188, 796513902354, 121485971111, 5858898939564
Offset: 2

Views

Author

Seiichi Manyama, Sep 01 2019

Keywords

Examples

			n | polydivisible numbers in base n  | zeroless
--+----------------------------------+---------------
2 | [0, 1]                           | [1]
  | [10]                             |
--+----------------------------------+---------------
3 | [0, 1, 2]                        | [1, 2]
  | [11, 20, 22]                     | [11, 22]
  | [110, 200, 220]                  |
  | [1100, 2002, 2200]               |
  | [11002, 20022]                   |
  | [110020, 200220]                 |
--+----------------------------------+----------------
4 | [0, 1, 2, 3]                     | [1, 2, 3]
  | [10, 12, 20, 22, 30, 32]         | [12, 22, 32]
  | [102, 120, 123, 201,             | [123, 222, 321]
  |  222, 300, 303, 321]             |
  | [1020, 1200, 1230, 2010,         |
  |  2220, 3000, 3030, 3210]         |
  | [10202, 12001, 12303, 20102,     |
  |  22203, 30002, 32103]            |
  | [120012, 123030, 222030, 321030] |
  | [2220301]                        |
		

Crossrefs

Programs

  • Ruby
    def A(n)
      d = 0
      a = (1..n - 1).map{|i| [i]}
      cnt = n - 1
      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
              cnt += 1
            end
          }
        }
        a = b
      end
      cnt
    end
    def A324020(n)
      (2..n).map{|i| A(i)}
    end
    p A324020(10)

Formula

a(n) = Sum_{k=1..n-1} A324019(n,k).

Extensions

a(20)-a(31) from Bert Dobbelaere, Sep 14 2019

A334318 Number T(n,k) of integers in base n having exactly k distinct digits such that the number formed by the consecutive subsequence of the initial j digits is divisible by j for all j in {1,...,k}; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 4, 5, 5, 2, 5, 6, 6, 1, 0, 6, 13, 18, 8, 7, 2, 7, 15, 33, 34, 16, 7, 0, 8, 25, 50, 58, 52, 21, 8, 3, 9, 28, 67, 98, 101, 57, 30, 7, 0, 10, 41, 115, 168, 220, 88, 51, 9, 4, 1, 11, 45, 134, 275, 398, 315, 220, 126, 32, 10, 0, 12, 61, 206, 428, 690, 568, 503, 158, 32, 5, 1, 0
Offset: 1

Views

Author

Alois P. Heinz, Apr 22 2020

Keywords

Examples

			T(4,3) = 5: 102, 120, 201, 123, 321 (written in base 4):
T(7,2) = 15: 13, 15, 20, 24, 26, 31, 35, 40, 42, 46, 51, 53, 60, 62, 64 (written in base 7)
T(10,1) = 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
T(10,10) = 1: 3816547290.
Triangle T(n,k) begins:
   1;
   2,  1;
   3,  1,   0;
   4,  5,   5,   2;
   5,  6,   6,   1,   0;
   6, 13,  18,   8,   7,   2;
   7, 15,  33,  34,  16,   7,   0;
   8, 25,  50,  58,  52,  21,   8,   3;
   9, 28,  67,  98, 101,  57,  30,   7,  0;
  10, 41, 115, 168, 220,  88,  51,   9,  4,  1;
  11, 45, 134, 275, 398, 315, 220, 126, 32, 10, 0;
  12, 61, 206, 428, 690, 568, 503, 158, 32,  5, 1, 0;
  ...
		

Crossrefs

Columns k=1-4 give: A000027, A334320, A333405, A333469.
Row sums give A334319.
Bisection of main diagonal (even part) gives A181736.
Cf. A111456.

Programs

  • Maple
    b:= proc(n, s, w) option remember; `if`(s={}, 0, (k-> add((t->
          `if`(t=0, x, `if`(irem(t, k)=0, b(n, s minus {j}, t)
              +x^k, 0)))(w*n+j), j=s)))(1+n-nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, {$0..n-1}, 0)):
    seq(T(n), n=1..14);
  • Mathematica
    b[n_, s_, w_] := b[n, s, w] = If[s == {}, 0, With[{k = 1+n-Length[s]}, Sum[With[{t = w*n + j}, If[t == 0, x, If[Mod[t, k] == 0, b[n, s ~Complement~ {j}, t] + x^k, 0]]], {j, s}]]];
    T[n_] := PadRight[CoefficientList[b[n, Range[0, n-1], 0]/x, x], n];
    Array[T, 14] // Flatten (* Jean-François Alcover, Feb 11 2021, after Alois P. Heinz *)

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)
Showing 1-3 of 3 results.