login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325644 "Sloping quaternary numbers": write numbers in quaternary under each other (right-justified), read diagonals in upward direction, convert to decimal. 8

%I #24 Oct 09 2019 13:44:18

%S 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,

%T 26,31,28,29,46,35,32,33,34,39,36,37,38,43,40,41,42,47,44,45,62,51,48,

%U 49,50,55,52,53,54,59,56,57,58,63,60,125,78,67,64,65,66,71,68,69,70

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

%H Seiichi Manyama, <a href="/A325644/b325644.txt">Table of n, a(n) for n = 0..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Quaternary_numeral_system">Quaternary numeral system</a>

%e 0

%e 1

%e 2

%e 3

%e 10

%e 11

%e 12

%e 13

%e 20

%e 21

%e 22

%e 23

%e 30

%e 31

%e 32

%e 33

%e 100

%e ...

%e The upward-sloping diagonals are:

%e 0

%e 1

%e 2

%e 13

%e 10

%e 11

%e 12

%e 23

%e 20

%e 21

%e 22

%e 33

%e 30

%e 31

%e 132

%e 103

%e 100

%e ...

%e giving 0, 1, 2, "7", 4, 5, 6, "11", 8, 9, 10, "15", 12, 13, "30", "19", 16, ...

%o (Ruby)

%o def A(m, n)

%o ary = [0]

%o n.times{|i|

%o (m ** i - i..m ** (i + 1) - i - 2).each{|j|

%o ary << (0..i).inject(0){|s, k| s + (j + k).to_s(m)[-1 - k].to_i * m ** k}

%o }

%o }

%o ary

%o end

%o p A(4, 4)

%Y 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).

%K nonn,base

%O 0,3

%A _Seiichi Manyama_, Sep 07 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)