|
|
A325644
|
|
"Sloping quaternary numbers": write numbers in quaternary under each other (right-justified), read diagonals in upward direction, convert to decimal.
|
|
8
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
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, ...
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|