login
A257083
Partial sums of A257088.
6
1, 2, 6, 9, 17, 22, 34, 41, 57, 66, 86, 97, 121, 134, 162, 177, 209, 226, 262, 281, 321, 342, 386, 409, 457, 482, 534, 561, 617, 646, 706, 737, 801, 834, 902, 937, 1009, 1046, 1122, 1161, 1241, 1282, 1366, 1409, 1497, 1542, 1634, 1681, 1777, 1826, 1926, 1977
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
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
Cf. A246695 (partial sums), A257088.
Cf. A056109: numbers of the form m*(3*m+2)+1 for nonnegative m.
Sequence in context: A354975 A280228 A254057 * A054974 A072481 A032471
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 17 2015
STATUS
approved