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.

A079973 Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i=1..n, with k=1, r=4, I={0,3}.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 5, 6, 8, 14, 16, 27, 36, 51, 77, 103, 155, 216, 309, 448, 628, 912, 1292, 1849, 2652, 3769, 5413, 7713, 11031, 15778, 22513, 32222, 46004, 65766, 94004, 134283, 191992, 274291, 392041, 560287, 800615, 1144320, 1635193, 2336976
Offset: 0

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {2,3,5}.
For n>=2, a(n) is number of compositions of n-2 with elements from the set {1,2,3} such that no two odd numbers appear consecutively. - Armend Shabani, Mar 01 2017

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-1/(x^5 + x^3 + x^2 - 1), {x, 0, 44}], x] (* Michael De Vlieger, Mar 02 2017 *)

Formula

a(n) = a(n-2) + a(n-3) + a(n-5).
G.f.: -1/(x^5 + x^3 + x^2 - 1).