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.

A325644 "Sloping quaternary numbers": write numbers in quaternary under each other (right-justified), read diagonals in upward direction, convert to decimal.

Original entry on oeis.org

0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 30, 19, 16, 17, 18, 23, 20, 21, 22, 27, 24, 25, 26, 31, 28, 29, 46, 35, 32, 33, 34, 39, 36, 37, 38, 43, 40, 41, 42, 47, 44, 45, 62, 51, 48, 49, 50, 55, 52, 53, 54, 59, 56, 57, 58, 63, 60, 125, 78, 67, 64, 65, 66, 71, 68, 69, 70
Offset: 0

Views

Author

Seiichi Manyama, Sep 07 2019

Keywords

Examples

			    0
    1
    2
    3
   10
   11
   12
   13
   20
   21
   22
   23
   30
   31
   32
   33
  100
...
The upward-sloping diagonals are:
0
1
2
13
10
11
12
23
20
21
22
33
30
31
132
103
100
...
giving 0, 1, 2, "7", 4, 5, 6, "11", 8, 9, 10, "15", 12, 13, "30", "19", 16, ...
		

Crossrefs

Cf. A102370 (base 2), A109681 (base3), this sequence (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).

Programs

  • Ruby
    def A(m, n)
      ary = [0]
      n.times{|i|
        (m ** i - i..m ** (i + 1) - i - 2).each{|j|
          ary << (0..i).inject(0){|s, k| s + (j + k).to_s(m)[-1 - k].to_i * m ** k}
        }
      }
      ary
    end
    p A(4, 4)