A099884 XOR difference triangle of the powers of 2, read by rows; Square array A(row,col): A(0,col) = 2^col, A(row,col) = A048724(A(row-1, col)) for row > 0, read by descending antidiagonals.
1, 2, 3, 4, 6, 5, 8, 12, 10, 15, 16, 24, 20, 30, 17, 32, 48, 40, 60, 34, 51, 64, 96, 80, 120, 68, 102, 85, 128, 192, 160, 240, 136, 204, 170, 255, 256, 384, 320, 480, 272, 408, 340, 510, 257, 512, 768, 640, 960, 544, 816, 680, 1020, 514, 771, 1024, 1536, 1280, 1920
Offset: 0
Examples
The main diagonal equals A001317 (Pascal's triangle mod 2 in decimal): {1,3,5,15,17,51,85,255,257,771,1285,3855,...}, and defines the XOR BINOMIAL transform of the powers of 2. Rows begin: 1; 2, 3; 4, 6, 5; 8, 12, 10, 15; 16, 24, 20, 30, 17; 32, 48, 40, 60, 34, 51; 64, 96, 80, 120, 68, 102, 85; 128, 192, 160, 240, 136, 204, 170, 255; 256, 384, 320, 480, 272, 408, 340, 510, 257; 512, 768, 640, 960, 544, 816, 680, 1020, 514, 771; 1024, 1536, 1280, 1920, 1088, 1632, 1360, 2040, 1028, 1542, 1285; 2048, 3072, 2560, 3840, 2176, 3264, 2720, 4080, 2056, 3084, 2570, 3855; ... From _Antti Karttunen_, Sep 19 2016: (Start) Viewed as a square array, the top left corner looks like this: 1, 2, 4, 8, 16, 32, 64, 128 3, 6, 12, 24, 48, 96, 192, 384 5, 10, 20, 40, 80, 160, 320, 640 15, 30, 60, 120, 240, 480, 960, 1920 17, 34, 68, 136, 272, 544, 1088, 2176 51, 102, 204, 408, 816, 1632, 3264, 6528 85, 170, 340, 680, 1360, 2720, 5440, 10880 255, 510, 1020, 2040, 4080, 8160, 16320, 32640 257, 514, 1028, 2056, 4112, 8224, 16448, 32896 771, 1542, 3084, 6168, 12336, 24672, 49344, 98688 1285, 2570, 5140, 10280, 20560, 41120, 82240, 164480 3855, 7710, 15420, 30840, 61680, 123360, 246720, 493440 4369, 8738, 17476, 34952, 69904, 139808, 279616, 559232 ... (End) The square array shown above can be viewed as a subtable of a multiplication table with particular relevance to the carryless multiplication defined by A048720, as the first column gives the A048720 powers of 3 (and the first row gives powers of 2, which are the same as in standard arithmetic). - _Peter Munn_, Jan 13 2020
Links
Crossrefs
Essentially GF(2)[X] analog of table A036561. - Antti Karttunen, Jan 18 2020
Cf. A000079 (first column of triangular table, the topmost row of square array).
Cf. A001317 (the rightmost diagonal of triangular table, the leftmost column of square array).
Programs
-
Mathematica
a[n_]:= Sum[Mod[Binomial[n, i], 2]*2^i, {i, 0, n}]; T[n_, k_]:=2^(n - k)a[k]; Table[T[n, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, Apr 11 2017 *)
-
PARI
{T(n,k)=local(B);B=0;for(i=0,k,B=bitxor(B,binomial(k,i)%2*2^(n-i)));B} for(n=0,10,for(k=0,n,print1(T(n,k),", "));print(""))
-
Python
from sympy import binomial def a(n): return sum((binomial(n, i)%2)*2**i for i in range(n + 1)) def T(n, k): return 2**(n - k)*a(k) for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Apr 11 2017
-
Scheme
(define (A099884 n) (A099884bi (A002262 n) (A025581 n))) ;; Then use either this recurrence: (define (A099884bi row col) (if (zero? row) (A000079 col) (A048724 (A099884bi (- row 1) col)))) ;; or this one: (define (A099884bi row col) (if (zero? col) (A001317 row) (* 2 (A099884bi row (- col 1))))) ;; Antti Karttunen, Sep 19 2016
Formula
T(n, k) = 2^(n-k)*A001317(k). T(n, n) = A001317(n) = SumXOR_{k=0..n} A047999(n, k)*2^k, where SumXOR is the analog of summation under the binary XOR operation.
From Antti Karttunen, Sep 19 2016: (Start)
When viewed as a square array A(row,col), with row >= 0, col >= 0, the following recurrences and formulas are valid:
A(row,0) = A001317(row), for col > 0, A(row,col) = 2*A(row,col-1).
(End)
With the definitions from Antti Karttunen above, A(row+1, col) = A048720(3, A(row, col)). - Peter Munn, Jan 13 2020
Extensions
Square array interpretation added as a second, alternative description by Antti Karttunen, Sep 19 2016
Comments