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.

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

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 32, 42, 55, 76, 118, 192, 314, 504, 767, 1120, 1612, 2324, 3412, 5148, 7900, 12169, 18631, 28152, 42024, 62364, 92576, 138141, 207629, 313718, 474796, 717456, 1080320, 1620994, 2427447, 3634800, 5450293, 8188936, 12323172, 18555880, 27930853
Offset: 0

Views

Author

Michael A. Allen, Sep 20 2024

Keywords

Examples

			For n = 6, the 32 subsets are {}, {1}, {2}, {1,2}, {3}, {1,3}, {2,3}, {1,2,3}, {4}, {1,4}, {2,4}, {1,2,4}, {3,4}, {1,3,4}, {2,3,4}, {1,2,3,4}, {5}, {2,5}, {3,5}, {2,3,5}, {4,5}, {2,4,5}, {3,4,5}, {2,3,4,5}, {6}, {3,6}, {4,6}, {3,4,6}, {5,6}, {3,5,6}, {4,5,6}, {3,4,5,6}.
		

Crossrefs

Column k=24 of A376033.

Programs

  • Mathematica
    CoefficientList[Series[(1 + x + 2*x^2 + 3*x^3 + 7*x^4 + 6*x^5 + 3*x^6 - x^7 - 3*x^8 - 6*x^9 - 5*x^10 - 3*x^11)/(1 - x - x^3 + x^4 - x^6 - x^7 - 2*x^8 - 3*x^9 + x^10 + 2*x^11 + 3*x^12),{x,0,38}],x]
    LinearRecurrence[{1, 0, 1, -1, 0, 1, 1, 2, 3, -1, -2, -3}, {1, 2, 4, 8, 16, 24, 32, 42, 55, 76, 118, 192}, 39]

Formula

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