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.

A127836 Triangle read by rows: row n gives coefficients (lowest degree first) of P_n(x), where P_0(x) = P_1(x) = 1; P_n(x) = P_{n-1}(x) + x^(n-1)*P_{n-2}(x).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5
Offset: 0

Views

Author

N. J. A. Sloane, Apr 07 2007

Keywords

Comments

P_n(x) has degree A002620(n).
Row sums are the Fibonacci numbers (A000045). - Emeric Deutsch, May 12 2007
T(n,k) is the number of Fibonacci words of length n-1 in which the sum of the positions of the 0's is equal to k. A Fibonacci binary word is a binary word having no 00 subword. Examples: T(5,4) = 2 because we have 1110 and 0101; T(7,6) = 3 because we have 111110, 101011 and 011101. - Emeric Deutsch, Jan 04 2009

Examples

			Triangle begins:
   1;
   1;
   1, 1;
   1, 1, 1;
   1, 1, 1, 1, 1;
   1, 1, 1, 1, 2, 1, 1;
   1, 1, 1, 1, 2, 2, 2, 1, 1, 1;
   1, 1, 1, 1, 2, 2, 3, 2, 2, 2, 2, 1, 1;
   1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1;
   1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 4, 4, 3, 3, 2, 2, 1, 1;
   ...
		

Crossrefs

Rows converge to A003114 (coefficients in expansion of the first Rogers-Ramanujan identities). Cf. A128915, A119469.

Programs

  • Maple
    P[0]:=1; P[1]:=1; d:=[0,0]; M:=14; for n from 2 to M do P[n]:=expand(P[n-1]+q^(n-1)*P[n-2]);
    lprint(seriestolist(series(P[n],q,M^2))); d:=[op(d),degree(P[n],q)]; od: d;
  • Mathematica
    P[0] = P[1] = 1; P[n_] := P[n] = P[n-1] + x^(n-1) P[n-2];
    Table[CoefficientList[P[n], x], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jul 23 2018 *)
  • Maxima
    P(n, x) := if n = 0 or n = 1 then 1 else P(n - 1, x) + x^(n  - 1)*P(n - 2, x)$ create_list(ratcoef(expand(P(n, x)), x, k), n, 0, 10, k, 0, floor(n^2/4)); /* Franck Maminirina Ramaharo, Nov 30 2018 */