login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286108 Square array read by antidiagonals: A(n,k) = T(2*(n AND k), n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and XOR is bitwise-xor (A003987). 7
0, 1, 1, 3, 5, 3, 6, 6, 6, 6, 10, 12, 14, 12, 10, 15, 15, 19, 19, 15, 15, 21, 23, 21, 27, 21, 23, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 38, 40, 38, 44, 38, 40, 38, 36, 45, 45, 49, 49, 53, 53, 49, 49, 45, 45, 55, 57, 55, 61, 63, 65, 63, 61, 55, 57, 55, 66, 66, 66, 66, 74, 74, 74, 74, 66, 66, 66, 66, 78, 80, 82, 80, 78, 88, 90, 88, 78, 80, 82, 80, 78 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,4
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
Eric Weisstein's World of Mathematics, Pairing Function
FORMULA
A(n,k) = T(2*A004198(n,k), A003987(n,k)), 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, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78
1, 5, 6, 12, 15, 23, 28, 38, 45, 57, 66, 80, 91
3, 6, 14, 19, 21, 28, 40, 49, 55, 66, 82, 95, 105
6, 12, 19, 27, 28, 38, 49, 61, 66, 80, 95, 111, 120
10, 15, 21, 28, 44, 53, 63, 74, 78, 91, 105, 120, 144
15, 23, 28, 38, 53, 65, 74, 88, 91, 107, 120, 138, 161
21, 28, 40, 49, 63, 74, 90, 103, 105, 120, 140, 157, 179
28, 38, 49, 61, 74, 88, 103, 119, 120, 138, 157, 177, 198
36, 45, 55, 66, 78, 91, 105, 120, 152, 169, 187, 206, 226
45, 57, 66, 80, 91, 107, 120, 138, 169, 189, 206, 228, 247
55, 66, 82, 95, 105, 120, 140, 157, 187, 206, 230, 251, 269
66, 80, 95, 111, 120, 138, 157, 177, 206, 228, 251, 275, 292
78, 91, 105, 120, 144, 161, 179, 198, 226, 247, 269, 292, 324
MATHEMATICA
T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[2*BitAnd[n, k], BitXor[n, k]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 20 2017 *)
PROG
(Scheme)
(define (A286108 n) (A286108bi (A002262 n) (A025581 n)))
(define (A286108bi row col) (let ((a (* 2 (A004198bi row col))) (b (A003987bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003987bi and A004198bi implement bitwise-xor (A003987) and bitwise-and (A004198).
(Python)
def T(a, b): return ((a + b)**2 + 3*a + b)//2
def A(n, k): return T(2*(n&k), n^k)
for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 20 2017
CROSSREFS
Cf. A000217 (row 0 & column 0), A014106 (main diagonal).
Sequence in context: A100667 A329736 A324086 * A096438 A299418 A214456
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 03 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)