|
|
A286147
|
|
Square array read by antidiagonals: A(n,k) = T(n XOR k, n), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987)
|
|
6
|
|
|
0, 2, 4, 5, 1, 12, 9, 13, 18, 24, 14, 8, 3, 17, 40, 20, 26, 7, 11, 50, 60, 27, 19, 42, 6, 61, 49, 84, 35, 43, 52, 62, 73, 85, 98, 112, 44, 34, 25, 51, 10, 72, 59, 97, 144, 54, 64, 33, 41, 16, 22, 71, 83, 162, 180, 65, 53, 88, 32, 23, 15, 38, 70, 181, 161, 220, 77, 89, 102, 116, 31, 39, 48, 58, 201, 221, 242, 264, 90, 76, 63, 101, 148, 30, 21, 47, 222, 200, 179, 241, 312
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
The array is read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...
|
|
LINKS
|
|
|
FORMULA
|
A(n,k) = T(A003987(n,k), n), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...].
|
|
EXAMPLE
|
The top left 0 .. 12 x 0 .. 12 corner of the array:
0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90
4, 1, 13, 8, 26, 19, 43, 34, 64, 53, 89, 76, 118
12, 18, 3, 7, 42, 52, 25, 33, 88, 102, 63, 75, 150
24, 17, 11, 6, 62, 51, 41, 32, 116, 101, 87, 74, 186
40, 50, 61, 73, 10, 16, 23, 31, 148, 166, 185, 205, 86
60, 49, 85, 72, 22, 15, 39, 30, 184, 165, 225, 204, 114
84, 98, 59, 71, 38, 48, 21, 29, 224, 246, 183, 203, 146
112, 97, 83, 70, 58, 47, 37, 28, 268, 245, 223, 202, 182
144, 162, 181, 201, 222, 244, 267, 291, 36, 46, 57, 69, 82
180, 161, 221, 200, 266, 243, 315, 290, 56, 45, 81, 68, 110
220, 242, 179, 199, 314, 340, 265, 289, 80, 94, 55, 67, 142
264, 241, 219, 198, 366, 339, 313, 288, 108, 93, 79, 66, 178
312, 338, 365, 393, 218, 240, 263, 287, 140, 158, 177, 197, 78
|
|
MATHEMATICA
|
T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitXor[n, k], k]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 2017 *)
|
|
PROG
|
(Scheme)
(define (A286147bi row col) (let ((a (A003987bi row col)) (b row)) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Where A003987bi implements bitwise-xor (A003987).
(Python)
def T(a, b): return ((a + b)**2 + 3*a + b)//2
def A(n, k): return T(n^k, k)
for n in range(21): print([A(n - k, k) for k in range(n + 1)]) # Indranil Ghosh, May 21 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|