OFFSET
0,2
COMMENTS
The bisections A104249(n) = 1, 3, 8, ... and A143689(n+1) = 2, 6, 13, 23, ... are in the following hexagonal spiral:
29--28--28--27--27
/ \
29 17--17--16--16 26
/ / \ \
30 18 9---8---8 15 26
/ / / \ \ \
30 18 9 3---3 7 15 25
/ / / / \ \ \ \
31 19 10 4 1 2 7 14 25
/ / / / / / / /
19 10 4 1---2 6 14 24
\ \ \ / / /
20 11 5---5---6 13 24
\ \ / /
20 11--12--12--13 23
\ /
21--21--22--22--23
.
a(n) mod 9 = A140265(n) mod 9.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(2n) = (3*n^2 + n + 2)/2. a(2n+1) = (3*n^2 + 5*n + 4)/2.
a(-n) = a(n).
a(n) = a(n-1) + A026741(n).
G.f.: (1 + x - x^2 + x^3 + x^4) / ((1 - x)^3*(1 + x)^2). - Colin Barker, Jun 05 2019
a(n) = 1 + A001318(n). - Peter Bala, Feb 04 2021
E.g.f.: ((8 + 7*x + 3*x^2)*cosh(x) + (9 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Feb 05 2021
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 2, 3, 6, 8}, 100] (* Paolo Xausa, Nov 13 2023 *)
PROG
(PARI) Vec((1 + x - x^2 + x^3 + x^4) / ((1 - x)^3*(1 + x)^2) + O(x^50)) \\ Colin Barker, Jun 05 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 18 2018
STATUS
approved