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.

Showing 1-2 of 2 results.

A225682 Triangle read by rows: T(n,k) (0 <= k <= n) = chi(k)*binomial(n,k), where chi(k) = 1,-1,0 according as k == 0,1,2 mod 3.

Original entry on oeis.org

1, 1, -1, 1, -2, 0, 1, -3, 0, 1, 1, -4, 0, 4, -1, 1, -5, 0, 10, -5, 0, 1, -6, 0, 20, -15, 0, 1, 1, -7, 0, 35, -35, 0, 7, -1, 1, -8, 0, 56, -70, 0, 28, -8, 0, 1, -9, 0, 84, -126, 0, 84, -36, 0, 1, 1, -10, 0, 120, -210, 0, 210, -120, 0, 10, -1, 1, -11, 0, 165, -330, 0, 462, -330, 0, 55, -11, 0, 1, -12, 0, 220, -495, 0, 924, -792, 0, 220, -66, 0, 1
Offset: 0

Views

Author

Keywords

Comments

Corresponding to row n of this triangle, define a generating function G_n(x) = 1/(Sum_{k=0..n} T(n,k)*x^k).
Then G_n(x) is the g.f. for the number of words of length n over an alphabet of size n which do not contain any strictly decreasing factor (consecutive subword) of length 3.
For example, G_2, G_3, G_4, G_5, G_6 are g.f.'s for A000079, A076264, A072335, A200781, A200782.

Examples

			Triangle begins:
[1],
[1, -1],
[1, -2, 0],
[1, -3, 0, 1],
[1, -4, 0, 4, -1],
[1, -5, 0, 10, -5, 0],
[1, -6, 0, 20, -15, 0, 1],
[1, -7, 0, 35, -35, 0, 7, -1],
[1, -8, 0, 56, -70, 0, 28, -8, 0],
...
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local k,s;
    s:=k->if k mod 3 = 0 then 1 elif k mod 3 = 1 then -1 else 0; fi;
    [seq(s(k)*binomial(n,k),k=0..n)];
    end;
    [seq(f(n),n=0..12)];
  • Mathematica
    chi[k_] := Switch[Mod[k, 3], 0, 1, 1, -1, 2, 0]; t[n_, k_] := chi[k]*Binomial[n, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

A200781 G.f.: 1/(1-5*x+10*x^3-5*x^4).

Original entry on oeis.org

1, 5, 25, 115, 530, 2425, 11100, 50775, 232275, 1062500, 4860250, 22232375, 101698250, 465201250, 2127983750, 9734098125, 44526969375, 203681015625, 931704015625, 4261920875000, 19495429065625, 89178510250000, 407931862578125, 1866014626609375, 8535765175875000, 39045399804843750, 178606512071015625, 817004981729375000
Offset: 0

Views

Author

R. H. Hardin, Nov 22 2011

Keywords

Comments

Number of words of length n over an alphabet of size 5 which do not contain any strictly decreasing factor (consecutive subword) of length 3. For alphabets of size 2, 3, 4, 6 see A000079, A076264, A072335, A200782.
Equivalently, number of 0..4 arrays x(0..n-1) of n elements without any two consecutive increases.

Examples

			Some solutions for n=5:
..1....3....4....0....1....0....4....0....2....1....4....1....2....2....4....4
..3....4....4....2....1....0....3....3....1....4....1....1....4....4....3....3
..3....1....0....2....0....2....0....3....3....0....4....3....0....1....4....4
..2....0....2....4....4....0....3....2....0....0....3....2....0....2....1....3
..4....4....2....2....0....3....3....2....1....0....4....1....3....1....0....2
		

Crossrefs

The g.f. corresponds to row 5 of triangle A225682.
Column 4 of A200785.

Programs

  • PARI
    Vec(1/(1-5*x+10*x^3-5*x^4) + O(x^30)) \\ Jinyuan Wang, Mar 10 2020

Formula

a(n) = 5*a(n-1) - 10*a(n-3) + 5*a(n-4).

Extensions

Edited by N. J. A. Sloane, May 21 2013
Showing 1-2 of 2 results.