OFFSET
0,3
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
a(n) = a(n-3) + 12*n - 20 for n>2.
From Colin Barker, Dec 02 2015: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>4.
G.f.: x*(1+x)^2*(1+2*x) / ((1-x)^3*(1+x+x^2)).
(End)
a(n) + a(-n) = 3*A256320(n).
a(n +8) - a(n -7) = 20*A016777(n).
a(n+16) - a(n-14) = 20*A016969(n).
a(n+23) - a(n-22) = 20*A017197(n).
a(n+31) - a(n-29) = 20*A017641(n).
Generalization of the previous four formulas:
a(n+30*k +8) - a(n-30*k -7) = 20*(4*k+1)*(3*n+1).
a(n+30*k+16) - a(n-30*k-14) = 20*(2*k+1)*(6*n+5).
a(n+30*k+24) - a(n-30*k-21) = 20*(4*k+3)*(3*n+4).
a(n+30*k+32) - a(n-30*k-28) = 20*(2*k+2)*(6*n+11).
E.g.f.: (6*x^2+4*x-1)*exp(x)/3 + (cos(sqrt(3)*x/2)/3 +sqrt(3)*sin(sqrt(3)*x/2)/9)*exp(-x/2). - Robert Israel, Dec 02 2015
MAPLE
seq(n*(2*n-1) + floor(n/3), n=0..100); # Robert Israel, Dec 02 2015
MATHEMATICA
Table[n (2 n - 1) + Floor[n/3], {n, 0, 50}] (* Vincenzo Librandi, Dec 02 2015 *)
LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 6, 16, 29}, 60] (* Harvey P. Dale, Oct 13 2020 *)
PROG
(PARI) concat(0, Vec(x*(1+x)^2*(1+2*x)/((1-x)^3*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Dec 02 2015
(PARI) a(n) = n*(2*n-1) + n\3; \\ Altug Alkan, Dec 01 2015
(Magma) [n*(2*n-1)+Floor(n/3): n in [0..60]]; // Vincenzo Librandi, Dec 02 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 29 2015
EXTENSIONS
Edited by Bruno Berselli, Dec 01 2015
STATUS
approved