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.

A286098 Square array read by antidiagonals: A(n,k) = T(n AND k, n OR 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).

This page as a plain text file.
%I A286098 #23 Jun 12 2025 00:47:05
%S A286098 0,1,1,3,4,3,6,6,6,6,10,11,12,11,10,15,15,17,17,15,15,21,22,21,24,21,
%T A286098 22,21,28,28,28,28,28,28,28,28,36,37,38,37,40,37,38,37,36,45,45,47,47,
%U A286098 49,49,47,47,45,45,55,56,55,58,59,60,59,58,55,56,55,66,66,66,66,70,70,70,70,66,66,66,66,78,79,80,79,78,83,84,83,78,79,80,79,78
%N A286098 Square array read by antidiagonals: A(n,k) = T(n AND k, n OR 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).
%C A286098 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 A286098 Antti Karttunen, <a href="/A286098/b286098.txt">Table of n, a(n) for n = 0..10584; the first 145 antidiagonals of array</a>
%H A286098 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286098 A(n,k) = T(A004198(n,k), A003986(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, ...].
%e A286098 The top left 0 .. 12 x 0 .. 12 corner of the array:
%e A286098    0,  1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
%e A286098    1,  4,   6,  11,  15,  22,  28,  37,  45,  56,  66,  79,  91
%e A286098    3,  6,  12,  17,  21,  28,  38,  47,  55,  66,  80,  93, 105
%e A286098    6, 11,  17,  24,  28,  37,  47,  58,  66,  79,  93, 108, 120
%e A286098   10, 15,  21,  28,  40,  49,  59,  70,  78,  91, 105, 120, 140
%e A286098   15, 22,  28,  37,  49,  60,  70,  83,  91, 106, 120, 137, 157
%e A286098   21, 28,  38,  47,  59,  70,  84,  97, 105, 120, 138, 155, 175
%e A286098   28, 37,  47,  58,  70,  83,  97, 112, 120, 137, 155, 174, 194
%e A286098   36, 45,  55,  66,  78,  91, 105, 120, 144, 161, 179, 198, 218
%e A286098   45, 56,  66,  79,  91, 106, 120, 137, 161, 180, 198, 219, 239
%e A286098   55, 66,  80,  93, 105, 120, 138, 155, 179, 198, 220, 241, 261
%e A286098   66, 79,  93, 108, 120, 137, 155, 174, 198, 219, 241, 264, 284
%e A286098   78, 91, 105, 120, 140, 157, 175, 194, 218, 239, 261, 284, 312
%t A286098 T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitAnd[n, k],BitOr[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* _Indranil Ghosh_, May 21 2017 *)
%o A286098 (Scheme)
%o A286098 (define (A286098 n) (A286098bi (A002262 n) (A025581 n)))
%o A286098 (define (A286098bi row col) (let ((a (A004198bi row col)) (b (A003986bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
%o A286098 (Python)
%o A286098 def T(a, b): return ((a + b)**2 + 3*a + b)//2
%o A286098 def A(n, k): return T(n&k, n|k)
%o A286098 for n in range(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # _Indranil Ghosh_, May 21 2017
%Y A286098 Cf. A000217 (row 0 & column 0), A084263 (seems to be row 1 & column 1), A046092 (main diagonal).
%Y A286098 Cf. A003056, A003986, A004198.
%Y A286098 Cf. also arrays A286099, A286101, A286102, A286108.
%K A286098 nonn,tabl
%O A286098 0,4
%A A286098 _Antti Karttunen_, May 03 2017