OFFSET
1,2
COMMENTS
For order v, the number of blocks is v*(v-1)*(v-2)/24.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = (n*(1+3*n)*(1+3*(-1)^n+6*n))/16.
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7).
G.f.: x*(x^5+4*x^4+22*x^3+13*x^2+13*x+1) / ((x-1)^4*(x+1)^3).
EXAMPLE
For n=3, A047235(n+1)=10 and the number of blocks in SQS(10) is 30.
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 14, 30, 91, 140, 285, 385}, 50] (* Harvey P. Dale, Jul 29 2015 *)
PROG
(PARI) Vec(x*(x^5+4*x^4+22*x^3+13*x^2+13*x+1)/((x-1)^4*(x+1)^3) + O(x^100))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Aug 11 2013
STATUS
approved