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.

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