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.

A143214 Gray code applied to Pascal's triangle: T(n,k) = GrayCode(binomial(n, k)).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 6, 5, 6, 1, 1, 7, 15, 15, 7, 1, 1, 5, 8, 30, 8, 5, 1, 1, 4, 31, 50, 50, 31, 4, 1, 1, 12, 18, 36, 101, 36, 18, 12, 1, 1, 13, 54, 126, 65, 65, 126, 54, 13, 1, 1, 15, 59, 68, 187, 130, 187, 68, 59, 15, 1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 20 2008

Keywords

Examples

			Triangle begins as:
  1;
  1,  1;
  1,  3,  1;
  1,  2,  2,   1;
  1,  6,  5,   6,   1;
  1,  7, 15,  15,   7,   1;
  1,  5,  8,  30,   8,   5,   1;
  1,  4, 31,  50,  50,  31,   4,  1;
  1, 12, 18,  36, 101,  36,  18, 12,  1;
  1, 13, 54, 126,  65,  65, 126, 54, 13,  1;
  1, 15, 59,  68, 187, 130, 187, 68, 59, 15, 1;
		

Crossrefs

Cf. A143213.

Programs

  • Mathematica
    GrayCode[n_, k_]:= FromDigits[BitXor@@@Partition[Prepend[IntegerDigits[n, 2, k], 0], 2, 1], 2];
    A143214[n_, k_]:= GrayCode[Binomial[n-1, k-1], 10];
    Table[A143214[n,k], {n,12}, {k,n}]//Flatten

Extensions

Edited by Michel Marcus and Joerg Arndt, Apr 22 2013
Edited by G. C. Greubel, Aug 27 2024