OFFSET
0,4
COMMENTS
LINKS
Luce ETIENNE, Permutations
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1,-1,1).
FORMULA
G.f.: x^2*(1+3*x+x^2+3*x^3+x^4)/((1-x)^3*(1+x)^2*(1+x^2)). - Robert Israel, Sep 15 2016
a(n) = (18*n^2-18*n+1-3*(2*n-1)*(-1)^n-4*(-1)^((2*n-1+(-1)^n)/4))/32. Therefore: a(2k) = (18*k^2-12*k+1-(-1)^k)/8, a(2k+1) = (18*k^2+12*k+1-(-1)^k)/8.
E.g.f.: ((9*x^2 - 3*x - 1)*sinh(x) + (9*x^2 + 3*x + 2)*cosh(x) - 2*(sin(x) + cos(x)))/16. - Stefano Spezia, Nov 07 2022
MATHEMATICA
Flatten[Table[{3 n (3 n - 1), 3 n (3 n + 1), (3 n + 1)^2, (3 n + 2)^2}, {n, 0, 15}]] (* Bruno Berselli, Sep 15 2016 *)
PROG
(Magma) &cat [[3*n*(3*n-1), 3*n*(3*n+1), (3*n+1)^2, (3*n+2)^2]: n in [0..15]]; // Bruno Berselli, Sep 15 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luce ETIENNE, Sep 14 2016
STATUS
approved