OFFSET
0,2
COMMENTS
Equivalently, numbers of the form m*(3*m+2)+1, where m = 0, -1, 1, -2, 2, -3, 3, ... - Bruno Berselli, Jan 05 2016
Also, numbers k such that 3*k-2 is a square. - Bruno Berselli, Jan 30 2018
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
From Bruno Berselli, Jan 05 2016: (Start)
G.f.: (1 + x + 2*x^2 + x^3 + x^4)/((1 + x)^2*(1 - x)^3).
a(n) = (6*n*(n+1) + (2*n+1)*(-1)^n + 7)/8. (End)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Wesley Ivan Hurt, Oct 30 2022
MATHEMATICA
Table[(6 n (n + 1) + (2 n + 1) (-1)^n + 7)/8, {n, 0, 60}] (* Bruno Berselli, Jan 05 2016 *)
PROG
(Haskell)
a257083 n = a257083_list !! n
a257083_list = scanl1 (+) a257088_list
(PARI) vector(60, n, n--; (6*n*(n+1)+(2*n+1)*(-1)^n+7)/8) \\ Bruno Berselli, Jan 05 2016
(Magma) [(6*n*(n+1) + (2*n+1)*(-1)^n + 7)/8 : n in [0..60]]; // Wesley Ivan Hurt, Oct 30 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 17 2015
STATUS
approved