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.

A166360 Triangle of Narayana numbers mod 2, T(n,k) = A001263(n,k) mod 2, read by rows.

Original entry on oeis.org

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

Views

Author

Gerald McGarvey, Oct 12 2009

Keywords

Examples

			Triangle begins:
  1
  1 1
  1 1 1
  1 0 0 1
  1 0 0 0 1
  1 1 0 0 1 1
  1 1 1 1 1 1 1
  1 0 0 0 0 0 0 1
  1 0 0 0 0 0 0 0 1
  1 1 0 0 0 0 0 0 1 1
  1 1 1 0 0 0 0 0 1 1 1
  1 0 0 1 0 0 0 0 1 0 0 1
  1 0 0 0 1 0 0 0 1 0 0 0 1
  1 1 0 0 1 1 0 0 1 1 0 0 1 1
  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
  ...
		

Crossrefs

Cf. A230116 (rows seen as binary numbers).

Programs

  • Haskell
    a166360 n k = a166360_tabl !! (n-1) !! (k-1)
    a166360_row n = a166360_tabl !! (n-1)
    a166360_tabl = map (map (flip mod 2)) a001263_tabl
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    T[n_, k_] := Mod[Binomial[n-1, k-1] * Binomial[n, k-1] / k, 2]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Amiram Eldar, May 13 2025 *)
  • PARI
    p = 2; s=14; NT = matrix(s,s,n,k, binomial(n-1, k-1)*binomial(n, k-1)/k);
    NTMP = matrix(s,s,n,k, NT[n,k]%p);
    for(n=1,s,for(k=1,n,print1(NTMP[n,k]," "));print())