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!)
A286099 Square array read by antidiagonals: A(n,k) = T(n OR k, n AND k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986). 5
0, 2, 2, 5, 4, 5, 9, 9, 9, 9, 14, 13, 12, 13, 14, 20, 20, 18, 18, 20, 20, 27, 26, 27, 24, 27, 26, 27, 35, 35, 35, 35, 35, 35, 35, 35, 44, 43, 42, 43, 40, 43, 42, 43, 44, 54, 54, 52, 52, 50, 50, 52, 52, 54, 54, 65, 64, 65, 62, 61, 60, 61, 62, 65, 64, 65, 77, 77, 77, 77, 73, 73, 73, 73, 77, 77, 77, 77, 90, 89, 88, 89, 90, 85, 84, 85, 90, 89, 88, 89, 90 (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
MathWorld, Pairing Function
FORMULA
A(n,k) = T(A003986(n,k), A004198(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, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90
2, 4, 9, 13, 20, 26, 35, 43, 54, 64, 77, 89, 104
5, 9, 12, 18, 27, 35, 42, 52, 65, 77, 88, 102, 119
9, 13, 18, 24, 35, 43, 52, 62, 77, 89, 102, 116, 135
14, 20, 27, 35, 40, 50, 61, 73, 90, 104, 119, 135, 148
20, 26, 35, 43, 50, 60, 73, 85, 104, 118, 135, 151, 166
27, 35, 42, 52, 61, 73, 84, 98, 119, 135, 150, 168, 185
35, 43, 52, 62, 73, 85, 98, 112, 135, 151, 168, 186, 205
44, 54, 65, 77, 90, 104, 119, 135, 144, 162, 181, 201, 222
54, 64, 77, 89, 104, 118, 135, 151, 162, 180, 201, 221, 244
65, 77, 88, 102, 119, 135, 150, 168, 181, 201, 220, 242, 267
77, 89, 102, 116, 135, 151, 168, 186, 201, 221, 242, 264, 291
90, 104, 119, 135, 148, 166, 185, 205, 222, 244, 267, 291, 312
MATHEMATICA
T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitOr[n, k], BitAnd[n, k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 2017 *)
PROG
(Scheme)
(define (A286099 n) (A286099bi (A002262 n) (A025581 n)))
(define (A286099bi row col) (let ((a (A003986bi row col)) (b (A004198bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
(Python)
def T(a, b): return ((a + b)**2 + 3*a + b)/2
def A(n, k): return T(n|k, n&k)
for n in range(0, 21): print [A(k, n - k) for k in range(0, n + 1)] # Indranil Ghosh, May 21 2017
CROSSREFS
Cf. A000096 (row 0 & column 0), A162761 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286098, A286101, A286102, A286109.
Sequence in context: A330026 A112923 A337662 * A098366 A284127 A261114
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 20 02:01 EDT 2024. Contains 371798 sequences. (Running on oeis4.)