OFFSET
0,2
COMMENTS
LINKS
V. Zhuravlev and P. Samovol, Mathematical enigmas of king Solomon's stamp, Kvant 1 (2012), 40-43. (in Russian)
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
For even n, a(n) = n*(6*n^2+9*n-4)/2; for odd n, a(n) = (n+1)*(6*n^2+3*n+1)/2 - 4*n.
For n>=4, a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-2) + 3*a(n-3) - a(n-4).
a(n) = (1-(-1)^n-8*n+18*n^2+12*n^3)/4. G.f.: -2*x*(2*x+1)*(x^2-4*x-3) / ((x-1)^4*(x+1)). - Colin Barker, Sep 29 2013
E.g.f.: (x*(11 + 27*x + 6*x^2)*cosh(x) + (1 + 11*x + 27*x^2 + 6*x^3)*sinh(x))/2. - Stefano Spezia, Mar 20 2022
PROG
(PARI) { a(n) = if(n%2, (n+1)*(6*n^2+3*n+1)/2- 4*n, n*(6*n^2+9*n-4)/2 ) }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Max Alekseyev, Sep 26 2013
STATUS
approved