OFFSET
0,3
LINKS
FORMULA
EXAMPLE
The first fifteen rows of the triangle:
0
1 3
2 6 5
3 2 7 6
4 12 15 13 9
5 4 13 12 11 10
6 7 4 5 14 15 12
7 5 12 4 10 14 13 15
8 24 27 25 29 31 26 30 17
9 8 25 24 31 30 27 26 19 18
10 11 8 9 26 27 24 25 22 23 20
11 9 24 8 30 26 25 27 18 22 21 23
12 13 14 15 8 9 10 11 28 29 30 31 24
13 15 10 14 24 8 11 9 20 28 31 29 25 27
14 10 9 11 27 25 8 24 23 21 28 20 26 30 29
MATHEMATICA
a88[n_] := BitXor[n, Floor[n/2]];
a68[n_] := BitXor @@ Table[Floor[n/2^m], {m, 0, Floor[Log[2, n]]}];
a68[0] = 0;
T[n_, k_] := a88[a68[n] + a68[k]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 19 2019 *)
PROG
(Python)
def a003188(n): return n^(n>>1)
def a006068(n):
s=1
while True:
ns=n>>s
if ns==0: break
n=n^ns
s<<=1
return n
def T(n, k): a003188(a006068(n) + a006068(k))
for n in range(21): print [T(n, k) for k in range(n + 1)] # Indranil Ghosh, Jun 07 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Feb 13 2016
STATUS
approved