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.

A213081 Exclusive-or based Pascal triangle, read by rows: T(n,1)=T(n,n)=n and T(n,k) = T(n-1,k-1) XOR T(n-1,k), where XOR is the bitwise exclusive-or operator.

Original entry on oeis.org

1, 2, 2, 3, 0, 3, 4, 3, 3, 4, 5, 7, 0, 7, 5, 6, 2, 7, 7, 2, 6, 7, 4, 5, 0, 5, 4, 7, 8, 3, 1, 5, 5, 1, 3, 8, 9, 11, 2, 4, 0, 4, 2, 11, 9, 10, 2, 9, 6, 4, 4, 6, 9, 2, 10, 11, 8, 11, 15, 2, 0, 2, 15, 11, 8, 11, 12, 3, 3, 4, 13, 2, 2, 13, 4, 3, 3, 12, 13, 15
Offset: 1

Views

Author

Alex Ratushnyak, Jun 04 2012

Keywords

Examples

			Table begins:
   1;
   2,  2;
   3,  0,  3;
   4,  3,  3,  4;
   5,  7,  0,  7,  5;
   6,  2,  7,  7,  2,  6;
   7,  4,  5,  0,  5,  4,  7;
   8,  3,  1,  5,  5,  1,  3,  8;
   9, 11,  2,  4,  0,  4,  2, 11,  9;
  10,  2,  9,  6,  4,  4,  6,  9,  2, 10;
  11,  8, 11, 15,  2,  0,  2, 15, 11,  8, 11;
		

Crossrefs

Cf. A007318 - Pascal's triangle read by rows.
Cf. A051597 - Pascal's triangle, begin and end n-th row with n+1, read by rows.
Cf. A080046 - Multiplicative Pascal triangle, read by rows: T(n,1)=T(n,n)=n and T(n,k) = T(n-1,k-1) * T(n-1,k).

Programs

  • Python
    src = [0]*1024
    dst = [0]*1024
    for i in range(1,39):
        dst[0] = dst[i-1] = i
        for j in range(1,i-1):
            dst[j] = src[j-1]^src[j]
        for j in range(i):
            src[j] = dst[j]
            print(dst[j], end=',')