OFFSET
0,4
COMMENTS
A144391(n) = -1, 3, 13, 29, 51, ... is in the hexagonal spiral begining with -1 (like from 0 in A000567):
.
55--54--53--52--51
/ \
56 32--31--30--29 50
/ / \ \
57 33 15--14--13 28 49
/ / / \ \ \
58 34 16 4---3 12 27 48
/ / / / \ \ \ \
59 35 17 5 -1 2 11 26 47
/ / / / / / / /
36 18 6 0---1 10 25 46
\ \ \ / / /
37 19 7---8---9 24 45
\ \ / /
38 20--21--22--23 44
\ /
39--40--41--42--43
.
A000567(n) = 0, 1, 8, 21, 40, ... is in the first hexagonal spiral.
The bisections 0, 1, 8, 21, ... and -1, 3, 13, 29, ... are on the respective main antidiagonals.
a(-n) = 0, 1, 5, 9, 16, 23, ... . The bisections n*(3*n + 2) and 3*n^2 - n - 1 are in both spirals on main diagonals.
The bisections of a(n) are in the second spiral: ... 29, 13, 3, -1, 0, 1, 8, 21, ... .
The bisections of a(-n) are in the first and in the second spiral: ... 33, 16, 5, 0, 1, 9, 23, ... .
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n+1) = a(n) + (6*n^2 - 3*(-1)^n - 1)/4, n=0,1,2, ... , a(0) = 0.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n>3.
From Colin Barker, Sep 14 2018: (Start)
G.f.: -x*(1 - 3*x - x^2) / ((1 - x)^3*(1 + x)).
a(n) = (-4*n + 3*n^2) / 4 for n even.
a(n) = (-3 - 4*n + 3*n^2) / 4 for n odd.
(End)
a(n) = (-3 + 3*(-1)^n - 8*n + 6*n^2)/8. - Colin Barker, Sep 14 2018
E.g.f.: (x*(3*x - 1)*cosh(x) + (3*x^2 - x - 3)*sinh(x))/4. - Stefano Spezia, Mar 15 2020
MAPLE
seq(op([3*n^2-2*n, 3*n^2+n-1]), n=0..30); # Muniru A Asiru, Sep 19 2018
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {0, -1, 1, 3 }, 40] (* Stefano Spezia, Sep 16 2018 *)
PROG
(PARI) concat(0, Vec(-x*(1 - 3*x - x^2) / ((1 - x)^3*(1 + x)) + O(x^40))) \\ Colin Barker, Sep 14 2018
(GAP) Flat(List([0..30], n->[3*n^2-2*n, 3*n^2+n-1])); # Muniru A Asiru, Sep 19 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 11 2018
STATUS
approved