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.

Showing 1-1 of 1 results.

A090971 Sierpiński's triangle, read by rows, starting from 1: T(n,k) = (T(n-1,k) + T(n-1,k-1)) mod 2.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Benoit Cloitre, Feb 28 2004

Keywords

Comments

Row sums give A038573.

Examples

			Triangle begins with:
  1;
  0, 1;
  1, 1, 1;
  0, 0, 0, 1;
  1, 0, 0, 1, 1;
  0, 1, 0, 1, 0, 1;
  1, 1, 1, 1, 1, 1, 1; ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==n, 1, Mod[T[n-1,k] + T[n-1, k-1], 2]]]; Table[T[n, k], {n,1,10}, {k,1,n}] (* G. C. Greubel, Feb 03 2019 *)
    Table[Boole[BitAnd[n, k] == k], {n, 1, 14}, {k, 1, n}] // Flatten (* Amiram Eldar, Aug 24 2024 *)
  • PARI
    T(n,k)=if(k<0 || k>n, 0, if(n==0, 1, (T(n-1,k)+T(n-1,k-1))%2))

Formula

From Philippe Deléham, Feb 29 2004: (Start)
Triangle A047999(n, k) for n,k > 0; A047999: Pascal's triangle mod 2.
a(n) = A062534(n-1) mod 2.
T(n-1, k-1) = A074909(n, n-k) mod 2. (End)
T(n, k) = 1 if bitand(n, k) = k, and 0 otherwise. - Amiram Eldar, Aug 24 2024
Showing 1-1 of 1 results.