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.

A123245 Triangle A079487 with reversed rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 3, 1, 1, 3, 4, 5, 4, 3, 1, 1, 3, 5, 7, 7, 6, 4, 1, 1, 4, 7, 10, 11, 10, 7, 4, 1, 1, 4, 8, 13, 16, 17, 14, 10, 5, 1, 1, 5, 11, 18, 24, 26, 24, 18, 11, 5, 1
Offset: 0

Views

Author

Roger L. Bagula, Oct 07 2006

Keywords

Comments

Row sums give Fibonacci numbers (A000045).

Examples

			{1},
{1, 1},
{1, 1, 1},
{1, 1, 2, 1},
{1, 2, 2, 2, 1},
{1, 2, 3, 3, 3, 1},
{1, 3, 4, 5, 4, 3, 1},
{1, 3, 5, 7, 7, 6, 4, 1},
{1, 4, 7, 10, 11, 10, 7, 4, 1},
{1, 4, 8, 13, 16, 17, 14, 10, 5, 1},
{1, 5, 11, 18, 24, 26, 24, 18, 11, 5, 1}
		

Crossrefs

Programs

  • Mathematica
    p[0, x] = 1; p[1, x] = x + 1;
    p[k_, x_] := p[k, x] = If[Mod[k, 2] == 0, x*p[k - 1, x] + p[k - 2, x], p[k - 1, x] + x^2*p[k - 2, x]];
    Table[CoefficientList[p[n, x], x], {n, 0, 10}] // Flatten

Formula

p(k, x) = x*p(k - 1, x) + p(k - 2, x) for k even, otherwise p(k, x) = p(k - 1, x) + x^2*p(k - 2, x).

Extensions

Edited by Joerg Arndt, May 26 2015
Offset corrected by Andrey Zabolotskiy, Sep 22 2017