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-4 of 4 results.

A079999 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,-1,3} for all i=1,...,n.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 4, 4, 5, 7, 10, 16, 22, 29, 40, 60, 84, 118, 165, 230, 330, 466, 653, 919, 1297, 1831, 2585, 3640, 5124, 7233, 10201, 14380, 20272, 28572, 40289, 56816, 80096, 112912, 159196, 224449, 316456, 446164, 629004, 886821, 1250329, 1762801
Offset: 0

Views

Author

Vladimir Baltic, Feb 10 2003

Keywords

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
    LinearRecurrence[{0,0,1,1,2,1,0,-1,0,-1},{1,0,0,0,1,1,1,1,1,4},50] (* Harvey P. Dale, Dec 12 2024 *)

Formula

Recurrence: a(n) = a(n-3) + a(n-4) + 2*a(n-5) + a(n-6) - a(n-8) - a(n-10) for n>=10.
G.f.: (1 - x^3 - x^5)/(1 - x^3 - x^4 - 2*x^5 - x^6 + x^8 + x^10).

A375981 Number of subsets of {1,2,...,n} such that no two elements differ by 1, 4, or 5.

Original entry on oeis.org

1, 2, 3, 5, 8, 11, 14, 19, 25, 34, 49, 70, 99, 141, 196, 270, 375, 520, 723, 1014, 1420, 1985, 2777, 3874, 5396, 7526, 10496, 14642, 20449, 28555, 39860, 55647, 77660, 108356, 151214, 211028, 294507, 411071, 573763, 800796, 1117679, 1559895, 2177002
Offset: 0

Views

Author

Michael A. Allen, Sep 04 2024

Keywords

Comments

a(n) is the number of compositions of n+5 into parts 1, 6, 8, 9, 12, 15, 18, 21, ...

Examples

			For n = 6, the 14 subsets are {}, {1}, {2}, {3}, {1,3}, {4}, {1,4}, {2,4}, {5}, {2,5}, {3,5}, {6}, {3,6}, {4,6}.
The a(4) = 8 compositions of 9 into parts 1, 6, 8, 9, ... are 1+1+1+1+1+1+1+1+1, 1+1+1+6, 1+1+6+1, 1+6+1+1, 6+1+1+1, 1+8, 8+1, 9.
		

Crossrefs

See comments for other sequences related to restricted combinations.
Cf. A376743.

Programs

  • Mathematica
    CoefficientList[Series[(1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 - x^8 - x^9 - x^10)/(1 - x - x^3 + x^4 - x^6 - x^8 + x^11),{x,0,42}],x]
    LinearRecurrence[{1, 0, 1, -1, 0, 1, 0, 1, 0, 0, -1}, {1, 2, 3, 5, 8, 11, 14, 19, 25, 34, 49}, 42]

Formula

a(n) = a(n-1) + a(n-3) - a(n-4) + a(n-6) + a(n-8) - a(n-11) for n >= 11.
G.f.: (1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 - x^8 - x^9 - x^10)/(1 - x - x^3 + x^4 - x^6 - x^8 + x^11).

A377715 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,3,4} for all i=1,...,n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 3, 1, 0, 0, 1, 6, 6, 1, 1, 1, 10, 20, 10, 5, 6, 15, 50, 50, 25, 30, 36, 105, 175, 125, 115, 141, 231, 490, 525, 435, 541, 673, 1246, 1820, 1695, 1901, 2361, 3361, 5501, 6301, 6601, 8295, 10440, 15820, 21410, 23286
Offset: 0

Views

Author

Michael A. Allen, Nov 04 2024

Keywords

Examples

			a(5) = 1: 45123.
a(6) = 1: 561234.
		

References

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

Crossrefs

See A376743 for other sequences related to strongly restricted permutations.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^3 - x^5 - x^6 + x^9)/(1 - x^3 - 2*x^5 - 2*x^6 + x^8 + 2*x^9 + x^10 + x^11 + x^12 - x^15),{x,0,56}],x]
    LinearRecurrence[{0, 0, 1, 0, 2, 2, 0, -1, -2, -1, -1, -1, 0, 0, 1}, {1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 3, 1, 0, 0}, 57]

Formula

a(n) = a(n-3) + 2*a(n-5) + 2*a(n-6) - a(n-8) - 2*a(n-9) - a(n-10) - a(n-11) - a(n-12) + a(n-15) for n >= 15.
G.f.: (1 - x^3 - x^5 - x^6 + x^9)/(1 - x^3 - 2*x^5 - 2*x^6 + x^8 + 2*x^9 + x^10 + x^11 + x^12 - x^15).

A378005 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,4,5} for all i=1,...,n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 1, 6, 6, 1, 0, 0, 1, 10, 20, 10, 1, 1, 1, 15, 50, 50, 15, 6, 7, 21, 105, 175, 105, 36, 42, 49, 196, 490, 490, 231, 183, 217, 392, 1176, 1764, 1246, 785, 946, 1141, 2646, 5292, 5418, 3613, 3664, 4390, 6601, 14112, 19614
Offset: 0

Views

Author

Michael A. Allen, Nov 13 2024

Keywords

Examples

			a(6) = 1: 561234.
a(7) = 1: 6712345.
		

References

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

Crossrefs

See A376743 for other sequences related to strongly restricted permutations.

Programs

  • Mathematica
    CoefficientList[Series[1/((1-x^7-x^6-x^13/(1-x^7-x^6/(1-x^7/(1-x^3))))), {x, 0, 65}],x]

Formula

a(n) = a(n-3) + 2*a(n-6) + 3*a(n-7) - 2*a(n-9) - 2*a(n-10) - a(n-12) - 2a(n-13) - 3*a(n-14) + a(n-15) + a(n-16) + a(n-17) + a(n-21) for n >= 21.
G.f.: (1 - x)*(1 + x + x^2 - x^6 - 3*x^7 - 3*x^8 - 2*x^9 - x^10 - x^11 - x^12 - x^13)/(1 - x^3 - 2*x^6 - 3*x^7 + 2*x^9 + 2*x^10 + x^12 + 2*x^13 + 3*x^14 - x^15 - x^16 - x^17 - x^21).
Showing 1-4 of 4 results.