A257932 Expansion of 1/(1-x-x^2-x^3+x^5+x^7).
1, 1, 2, 4, 7, 12, 22, 38, 67, 118, 207, 363, 638, 1119, 1964, 3447, 6049, 10615, 18629, 32691, 57369, 100676, 176674, 310041, 544085, 954802, 1675561, 2940405, 5160051, 9055258, 15890871, 27886534, 48937456, 85879249, 150707576, 264473359, 464118392, 814471000, 1429296968
Offset: 0
Examples
a(6)=22; these are (42),(24),(411),(141),(114),(33),(321=231=213),(312=132=123),(3111=1311=1131=1113),(222),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111).
Links
- Robert Israel, Table of n, a(n) for n = 0..4090
- Index entries for related partition-counting sequences
- Index entries for linear recurrences with constant coefficients, signature (1,1,1,0,-1,0,-1).
Programs
-
Maple
f:= gfun:-rectoproc({a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7), seq(a(i)=[1, 1, 2, 4, 7, 12,22][i+1],i=0..6)},a(n),remember): map(f, [$0..50]); # Robert Israel, Apr 26 2017
-
Mathematica
LinearRecurrence[{1, 1, 1, 0, -1, 0, -1}, {1, 1, 2, 4, 7, 12, 22}, 39] (* Robert P. P. McKone, Feb 08 2021 *)
-
PARI
Vec(1/((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)) + O(x^100)) \\ Colin Barker, May 17 2015
Formula
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7).
G.f.: 1 / ((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)). - Colin Barker, May 17 2015
Comments