OFFSET
1,9
COMMENTS
2*a(n-1) for n > 1 is the number of subsets of {1..n} that contain 5 even numbers.
In general, if a(n) is the number of subsets of {1..n} that contain k odd numbers, then a(n) = binomial((n+1)/2, k)*2^((n-1)/2) for n odd; a(n) = binomial((n/2), k)*2^(n/2) for n even, and 2*a(n-1), n > 1, is the number of subsets of {1..n} that contain k even numbers.
In terms of k, the number a(n) of subsets of {1..n} that contain k even numbers is a(n) = binomial((n-1)/2, k)*2^((n+1)/2) for n odd; a(n) = binomial((n/2), k)* 2^(n/2) for n even. Note that a triangle can be made for different values of k and n.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,12,0,-60,0,160,0,-240,0,192,0,-64).
FORMULA
a(n) = binomial((n+1)/2, 5) * 2^((n-1)/2), n odd;
a(n) = binomial((n/2), 5) * 2^(n/2), n even.
From Colin Barker, Jan 17 2020: (Start)
G.f.: 16*x^9*(1 + 2*x) / (1 - 2*x^2)^6.
a(n) = 12*a(n-2) - 60*a(n-4) + 160*a(n-6) - 240*a(n-8) + 192*a(n-10) - 64*a(n-12) for n>12. (End)
From Amiram Eldar, Mar 24 2022: (Start)
Sum_{n>=9} 1/a(n) = (5/64)*(12*log(2)-7).
Sum_{n>=9} (-1)^(n+1)/a(n) = (5/192)*(12*log(2)-7). (End)
EXAMPLE
a(9)=16 and the 16 subsets are {1,3,5,7,9}, {1,2,3,5,7,9}, {1,3,4,5,7,9}, {1,3,5,6,7,9}, {1,3,5,7,8,9},{1,2,3,4,5,7,9},{1,2,3,5,6,7,9}, {1,2,3,5,7,8,9}, {1,3,4,5,6,7,9}, {1,3,4,5,7,8,9}, {1,3,5,6,7,8,9}, {1,2,3,4,5,6,7,9}, {1,2,3,4,5,7,8,9}, {1,2,3,5,6,7,8,9}, {1,3,4,5,6,7,8,9},{1,2,3,4,5,6,7,8,9}.
MATHEMATICA
a[n_] := If[OddQ[n], Binomial[(n + 1)/2, 5]*2^((n - 1)/2), Binomial[n/2, 5]*2^(n/2)]; Array[a, 38] (* Amiram Eldar, Jan 17 2020 *)
PROG
(PARI) concat([0, 0, 0, 0, 0, 0, 0, 0], Vec(16*x^9*(1 + 2*x) / (1 - 2*x^2)^6 + O(x^40))) \\ Colin Barker, Jan 17 2020
(Magma) [IsOdd(n) select Binomial((n+1) div 2, 5)*2^((n-1) div 2) else Binomial((n div 2), 5)*2^(n div 2): n in [1..38]]; // Marius A. Burtea, Jan 17 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jan 16 2020
STATUS
approved