login
Triangle T(n,k): write n in base 16, reverse order of digits.
4

%I #5 Sep 23 2015 04:45:21

%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,

%T 1,8,1,9,1,10,1,11,1,12,1,13,1,14,1,15,1,0,2,1,2,2,2,3,2,4,2,5,2,6,2,

%U 7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,2,15,2

%N Triangle T(n,k): write n in base 16, reverse order of digits.

%C Sum(T(n,k)*16^k : k = 0..A262438(n)-1) = n.

%H Reinhard Zumkeller, <a href="/A262437/b262437.txt">Rows n = 0..10000 of triangle, flattened</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Hexadecimal.html">Hexadecimal</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal</a>

%e . n | HEX | T(n,*) n | HEX | T(n,*) n | HEX | T(n,*)

%e . ----+-----+-------- ----+-----+-------- ----+-----+--------

%e . 0 | 0 | [0] 24 | 18 | [8,1] 48 | 30 | [0,3]

%e . 1 | 1 | [1] 25 | 19 | [9,1] 49 | 31 | [1,3]

%e . 2 | 2 | [2] 26 | 1A | [10,1] 50 | 32 | [2,3]

%e . 3 | 3 | [3] 27 | 1B | [11,1] 51 | 33 | [3,3]

%e . 4 | 4 | [4] 28 | 1C | [12,1] 52 | 34 | [4,3]

%e . 5 | 5 | [5] 29 | 1D | [13,1] 53 | 35 | [5,3]

%e . 6 | 6 | [6] 30 | 1E | [14,1] 54 | 36 | [6,3]

%e . 7 | 7 | [7] 31 | 1F | [15,1] 55 | 37 | [7,3]

%e . 8 | 8 | [8] 32 | 20 | [0,2] 56 | 38 | [8,3]

%e . 9 | 9 | [9] 33 | 21 | [1,2] 57 | 39 | [9,3]

%e . 10 | A | [10] 34 | 22 | [2,2] 58 | 3A | [10,3]

%e . 11 | B | [11] 35 | 23 | [3,2] 59 | 3B | [11,3]

%e . 12 | C | [12] 36 | 24 | [4,2] 60 | 3C | [12,3]

%e . 13 | D | [13] 37 | 25 | [5,2] 61 | 3D | [13,3]

%e . 14 | E | [14] 38 | 26 | [6,2] 62 | 3E | [14,3]

%e . 15 | F | [15] 39 | 27 | [7,2] 63 | 3F | [15,3]

%e . 16 | 10 | [0,1] 40 | 28 | [8,2] 64 | 40 | [0,4]

%e . 17 | 11 | [1,1] 41 | 29 | [9,2] 65 | 41 | [1,4]

%e . 18 | 12 | [2,1] 42 | 2A | [10,2] 66 | 42 | [2,4]

%e . 19 | 13 | [3,1] 43 | 2B | [11,2] 67 | 43 | [3,4]

%e . 20 | 14 | [4,1] 44 | 2C | [12,2] 68 | 44 | [4,4]

%e . 21 | 15 | [5,1] 45 | 2D | [13,2] 69 | 45 | [5,4]

%e . 22 | 16 | [6,1] 46 | 2E | [14,2] 70 | 46 | [6,4]

%e . 23 | 17 | [7,1] 47 | 2F | [15,2] 71 | 47 | [7,4]

%e . 24 | 18 | [8,1] 48 | 30 | [0,3] 72 | 48 | [8,4] .

%o (Haskell)

%o a262437 n k = a262437_tabf !! n !! k

%o a262437_row n = a262437_tabf !! n

%o a262437_tabf = iterate succ [0] where

%o succ [] = [1]

%o succ (15:hs) = 0 : succ hs

%o succ (h:hs) = (h + 1) : hs

%Y Cf. A001025, A262438 (row lengths), A030308 (binary), A030341 (ternary), A031298 (decimal).

%K nonn,tabf,base

%O 0,3

%A _Reinhard Zumkeller_, Sep 22 2015