OFFSET
0,3
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1).
FORMULA
O.g.f.: x*(1 + x^2)*(1 + x)^2/((1 - x)^3*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(-n-1) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7) = a(n-5) + 8*(n-2).
a(5*k+r) = 20*k^2 + 4*(2*r+1)*k + r^2, where 0 <= r <= 4. Example: for r=3, a(5*k+3) = (2*k+1)*(10*k+9), which gives: 9, 57, 145, 273, 441, 649 etc. Also, a(n) belongs to A047462, in fact: for r = 0 or 4, a(n) == 0 (mod 8); for r = 1 or 3, a(n) == 1 (mod 8); for r = 2, a(n) == 4 (mod 8).
a(n) = a(-n) + A047462(n).
a(n) = n^2 - floor((n-2)^2/5).
MATHEMATICA
Table[Floor[4 n (n + 1)/5], {n, 0, 60}]
PROG
(PARI) vector(60, n, n--; floor(4*n*(n+1)/5))
(Python) [int(4*n*(n+1)/5) for n in range(60)]
(Sage) [floor(4*n*(n+1)/5) for n in range(60)]
(Maxima) makelist(floor(4*n*(n+1)/5), n, 0, 60);
(Magma) [4*n*(n+1) div 5: n in [0..60]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jan 16 2017
STATUS
approved