cp's OEIS Frontend

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.

A286155 Square array A(n,k) read by antidiagonals, A(n,n) = -n, otherwise, if n > k, A(n,k) = T(n XOR k,k), else A(n,k) = T(n,n XOR k), where T(n,k) is sequence A000027 considered as a two-dimensional table and XOR is bitwise-xor (A003987).

This page as a plain text file.
%I A286155 #10 Feb 16 2025 08:33:44
%S A286155 -1,4,6,2,-2,3,11,3,2,15,7,23,-3,27,10,22,30,39,43,35,28,16,12,31,-4,
%T A286155 34,14,21,37,17,24,10,7,26,20,45,29,57,18,14,-5,12,19,65,36,56,68,81,
%U A286155 19,26,24,18,89,77,66,46,38,69,109,20,-6,17,117,76,44,55,79,47,58,124,141,21,16,149,133,64,54,91,67,107,48,140,125,177,-7,185,132,150,53,119
%N A286155 Square array A(n,k) read by antidiagonals, A(n,n) = -n, otherwise, if n > k, A(n,k) = T(n XOR k,k), else A(n,k) = T(n,n XOR k), where T(n,k) is sequence A000027 considered as a two-dimensional table and XOR is bitwise-xor (A003987).
%C A286155 The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
%H A286155 Antti Karttunen, <a href="/A286155/b286155.txt">Table of n, a(n) for n = 1..10585; the first 145 antidiagonals of array</a>
%H A286155 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286155 If n = k, A(n,k) = -n, if n > k, A(n,k) = T(A003987(n,k),k), otherwise [when n < k], A(n,k) = T(n,A003987(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N x N to N.
%e A286155 The top left 1 .. 12 x 1 .. 12 corner of the array:
%e A286155   -1,   4,   2,  11,   7,  22,  16,  37,  29,  56,  46,  79
%e A286155    6,  -2,   3,  23,  30,  12,  17,  57,  68,  38,  47, 107
%e A286155    3,   2,  -3,  39,  31,  24,  18,  81,  69,  58,  48, 139
%e A286155   15,  27,  43,  -4,  10,  14,  19, 109, 124, 140, 157,  59
%e A286155   10,  35,  34,   7,  -5,  26,  20, 141, 125, 176, 158,  83
%e A286155   28,  14,  26,  12,  24,  -6,  21, 177, 196, 142, 159, 111
%e A286155   21,  20,  19,  18,  17,  16,  -7, 217, 197, 178, 160, 143
%e A286155   45,  65,  89, 117, 149, 185, 225,  -8,  36,  44,  53,  63
%e A286155   36,  77,  76, 133, 132, 205, 204,  29,  -9,  64,  54,  87
%e A286155   66,  44,  64, 150, 186, 148, 184,  38,  58, -10,  55, 115
%e A286155   55,  54,  53, 168, 167, 166, 165,  48,  47,  46, -11, 147
%e A286155   91, 119, 151,  63,  87, 115, 147,  59,  83, 111, 143, -12
%o A286155 (Scheme)
%o A286155 (define (A286155 n) (A286155bi (A002260 n) (A004736 n)))
%o A286155 (define (A286155bi row col) (cond ((= row col) (- row)) ((> row col) (A000027bi (A003987bi row col) col)) (else (A000027bi row (A003987bi col row))))) ;; Where A003987bi implements bitwise-xor (A003987).
%o A286155 (define (A000027bi row col) (* (/ 1 2) (+ (expt (+ row col) 2) (- row) (- (* 3 col)) 2)))
%Y A286155 Cf. A003987, A091255.
%Y A286155 Cf. also arrays A285732, A286151, A286153.
%K A286155 sign,tabl
%O A286155 1,2
%A A286155 _Antti Karttunen_, May 03 2017