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.

A331575 a(n) is the number of subsets of {1..n} that contain 4 even and 4 odd numbers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 25, 75, 225, 525, 1225, 2450, 4900, 8820, 15876, 26460, 44100, 69300, 108900, 163350, 245025, 353925, 511225, 715715, 1002001, 1366365, 1863225, 2484300, 3312400, 4331600, 5664400, 7282800, 9363600, 11860560, 15023376, 18779220, 23474025, 28997325
Offset: 0

Views

Author

Enrique Navarrete, Jan 20 2020

Keywords

Examples

			a(9)=5 and the 5 subsets are {1,2,3,4,5,6,7,8}, {1,2,3,4,5,6,8,9}, {1,2,3,4,6,7,8,9}, {1,2,4,5,6,7,8,9}, {2,3,4,5,6,7,8,9}.
		

Crossrefs

Cf. A288876 (even bisection, shifted).

Programs

  • Magma
    [IsEven(n) select Binomial((n div 2),4)^2 else Binomial((n-1) div 2,4)*Binomial((n+1) div 2,4): n in [0..41]]; // Marius A. Burtea, Jan 21 2020
  • Maple
    a:= n-> ((b, q)-> b(q, 4)*b(n-q, 4))(binomial, iquo(n, 2)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    a[n_] := If[OddQ[n], Binomial[(n - 1)/2, 4]*Binomial[(n + 1)/2, 4], Binomial[n/2, 4]^2]; Array[a, 42, 0] (* Amiram Eldar, Jan 21 2020 *)
    LinearRecurrence[{2,6,-14,-14,42,14,-70,0,70,-14,-42,14,14,-6,-2,1},{0,0,0,0,0,0,0,0,1,5,25,75,225,525,1225,2450},50] (* Harvey P. Dale, Jul 20 2025 *)
  • PARI
    a(n) = if (n%2, binomial((n-1)/2,4)*binomial((n+1)/2,4), binomial(n/2,4)^2); \\ Michel Marcus, Jan 21 2020
    
  • PARI
    concat([0,0,0,0,0,0,0,0], Vec(x^8*(1 + 3*x + 9*x^2 + 9*x^3 + 9*x^4 + 3*x^5 + x^6) / ((1 - x)^9*(1 + x)^7) + O(x^40))) \\ Colin Barker, Jan 21 2020
    

Formula

a(n) = binomial(n/2,4)^2, n even;
a(n) = binomial((n-1)/2,4)*binomial((n+1)/2,4), n odd.
From Colin Barker, Jan 21 2020: (Start)
G.f.: x^8*(1 + 3*x + 9*x^2 + 9*x^3 + 9*x^4 + 3*x^5 + x^6) / ((1 - x)^9*(1 + x)^7).
a(n) = 2*a(n-1) + 6*a(n-2) - 14*a(n-3) - 14*a(n-4) + 42*a(n-5) + 14*a(n-6) - 70*a(n-7) + 70*a(n-9) - 14*a(n-10) - 42*a(n-11) + 14*a(n-12) + 14*a(n-13) - 6*a(n-14) - 2*a(n-15) + a(n-16) for n>15.
(End)
E.g.f.: (cosh(x)-sinh(x))*(1575+1350*x+630*x^2+204*x^3+54*x^4+12*x^5+4*x^6+(-1575+1800*x-1080*x^2+456*x^3-156*x^4+48*x^5-16*x^6+8*x^7+2*x^8)*(cosh(2*x)+sinh(2*x)))/294912. - Stefano Spezia, Jan 27 2020