[go: up one dir, main page]

login
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.
0
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,5
EXAMPLE
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
PROG
(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], ", ")))
CROSSREFS
A007318 (Pascal's triangle), A047999 (Sierpinski's triangle, Pascal's triangle mod 2).
Sequence in context: A030613 A025910 A002637 * A077478 A127836 A307433
KEYWORD
easy,nonn,tabl
AUTHOR
Gerald McGarvey, Oct 10 2009
STATUS
approved