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.

A166279 Triangle, read by rows: T(0,0) = 1, T(n,k) = T(n-1,k-1) (mod 2) + T(n-1,k) (mod 2), T(n,k) = 0 if k < 0 or k > n.

Original entry on oeis.org

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

Views

Author

Gerald McGarvey, Oct 10 2009

Keywords

Examples

			Triangle begins:
1,
1,1,
1,2,1,
1,1,1,1,
1,2,2,2,1,
1,1,0,0,1,1,
1,2,1,0,1,2,1,
1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,1,
1,1,0,0,0,0,0,0,1,1,
1,2,1,0,0,0,0,0,1,2,1,
1,1,1,1,0,0,0,0,1,1,1,1,
1,2,2,2,1,0,0,0,1,2,2,2,1,
1,1,0,0,1,1,0,0,1,1,0,0,1,1,
1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
		

Crossrefs

A007318 (Pascal's triangle), A047999 (Sierpinski's triangle, Pascal's triangle mod 2).

Programs

  • PARI
    p = 2; s = 13; T=matrix(s,s); T[1,1]=1; for(n=2,s,T[n,1]=1;for(k=2,n,T[n,k]=T[n-1,k-1]%p+T[n-1,k]%p)); for(n=1,s,for(k=1,n,print1(T[n,k],", ")))