This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A286151 #24 Feb 16 2025 08:33:44 %S A286151 0,1,2,3,2,5,6,11,13,9,10,7,5,8,14,15,22,8,7,26,20,21,16,38,9,42,19, %T A286151 27,28,37,47,58,62,52,43,35,36,29,23,48,14,51,25,34,44,45,56,30,39,19, %U A286151 16,41,33,64,54,55,46,80,31,25,20,23,32,88,53,65,66,79,93,108,32,41,39,31,116,102,89,77,78,67,57,94,140,33,27,30,148,101,63,76,90 %N A286151 Square array read by descending antidiagonals: If n > k, A(n,k) = T(n XOR k, k), and otherwise A(n,k) = T(n, n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987). %C A286151 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), ... %H A286151 Antti Karttunen, <a href="/A286151/b286151.txt">Table of n, a(n) for n = 0..10584; the first 145 antidiagonals of array</a> %H A286151 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286151 If n > k, A(n,k) = T(A003987(n,k),k), otherwise A(n,k) = T(n,A003987(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987). %e A286151 The top left 0 .. 12 x 0 .. 12 corner of the array: %e A286151 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78 %e A286151 2, 2, 11, 7, 22, 16, 37, 29, 56, 46, 79, 67, 106 %e A286151 5, 13, 5, 8, 38, 47, 23, 30, 80, 93, 57, 68, 138 %e A286151 9, 8, 7, 9, 58, 48, 39, 31, 108, 94, 81, 69, 174 %e A286151 14, 26, 42, 62, 14, 19, 25, 32, 140, 157, 175, 194, 82 %e A286151 20, 19, 52, 51, 16, 20, 41, 33, 176, 158, 215, 195, 110 %e A286151 27, 43, 25, 41, 23, 39, 27, 34, 216, 237, 177, 196, 142 %e A286151 35, 34, 33, 32, 31, 30, 29, 35, 260, 238, 217, 197, 178 %e A286151 44, 64, 88, 116, 148, 184, 224, 268, 44, 53, 63, 74, 86 %e A286151 54, 53, 102, 101, 166, 165, 246, 245, 46, 54, 87, 75, 114 %e A286151 65, 89, 63, 87, 185, 225, 183, 223, 57, 81, 65, 76, 146 %e A286151 77, 76, 75, 74, 205, 204, 203, 202, 69, 68, 67, 77, 182 %e A286151 90, 118, 150, 186, 86, 114, 146, 182, 82, 110, 142, 178, 90 %t A286151 T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=If[n>k, T[BitXor[n, k], k], T[n, BitXor[n, k]]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* _Indranil Ghosh_, May 20 2017 *) %o A286151 (Scheme) %o A286151 (define (A286151 n) (A286151bi (A002262 n) (A025581 n))) %o A286151 (define (A286151bi row col) (define (pairA001477bi a b) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2)) (cond ((> row col) (pairA001477bi (A003987bi row col) col)) (else (pairA001477bi row (A003987bi col row))))) ;; Where A003987bi implements bitwise-xor (A003987). %o A286151 (Python) %o A286151 def T(a, b): return ((a + b)**2 + 3*a + b)//2 %o A286151 def A(n, k): return T(n^k, k) if n>k else T(n, n^k) %o A286151 for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # _Indranil Ghosh_, May 20 2017 %Y A286151 Cf. A000217 (row 0), A000096 (column 0 and the main diagonal). %Y A286151 Cf. A001477, A003987, A286108, A286109, A286145, A286147, A286150. %Y A286151 Cf. A286153 (same array without row 0 and column 0). %K A286151 nonn,tabl %O A286151 0,3 %A A286151 _Antti Karttunen_, May 03 2017