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.

A225043 Pascal's triangle with row n reduced modulo n+1.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 1, 4, 1, 1, 5, 4, 4, 5, 1, 1, 6, 1, 6, 1, 6, 1, 1, 7, 5, 3, 3, 5, 7, 1, 1, 8, 1, 2, 7, 2, 1, 8, 1, 1, 9, 6, 4, 6, 6, 4, 6, 9, 1, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 1, 11, 7, 9, 6, 6, 6, 6, 9, 7, 11, 1, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 25 2013

Keywords

Comments

The row sums are: {0, 2, 4, 8, 11, 20, 22, 32, 31, 52, 56, ...}.
Since row n is only defined mod n+1, it would seem better to reduce the row sums mod n+1, which gives A062173. - N. J. A. Sloane, Apr 28 2013

Examples

			{0},
{1, 1},
{1, 2, 1},
{1, 3, 3, 1},
{1, 4, 1, 4, 1},
{1, 5, 4, 4, 5, 1},
{1, 6, 1, 6, 1, 6, 1},
{1, 7, 5, 3, 3, 5, 7, 1},
{1, 8, 1, 2, 7, 2, 1, 8, 1},
{1, 9, 6, 4, 6, 6, 4, 6, 9, 1},
{1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1},
{1, 11, 7, 9, 6, 6, 6, 6, 9, 7, 11, 1},
{1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1},...
		

Crossrefs

Programs

  • Haskell
    a225043 n k = a225043_tabl !! n !! k
    a225043_row n = a225043_tabl !! n
    a225043_tabl = zipWith (map . flip mod) [1..] a007318_tabl
    -- Reinhard Zumkeller, Jun 12 2013
  • Mathematica
    Flatten[Table[Mod[Binomial[m, n], m + 1], {m, 0, 12}, {n, 0, m}]]
  • PARI
    T(m,n)=binomial(m,n)%(m+1) \\ Charles R Greathouse IV, Apr 25 2013
    

Formula

T(m,n) = binomial(m, n) mod m+1.

Extensions

Definition edited by N. J. A. Sloane, Apr 28 2013