OFFSET
0,3
COMMENTS
a(n+1) - 2*a(n) = -1, 1, 1, -3, -3, -13, -13, -29, -29, ...
Hexagonal spiral for A000265:
.
17--35---9--37
/
33 17---9--19---5
/ / \
1 1 3---7---1 21
/ / / \ \
31 15 5 1---1 9 11
\ \ \ / / /
15 7 1---3 5 23
\ \ / /
29 13---3--11 3
\ /
7--27--13--25
.
The two sequences are perpendicular.
a(n+1) - a(n) = 0, 2, 4, 4, 8, 6, 12, ... = 2*A029578(n+2).
A003215 is a bisection of 1, 1, 13, 7, 49, 19, 109, 37, ... .
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
From Colin Barker, Nov 14 2019: (Start)
G.f.: (1 + 4*x^3 + x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
a(n) = (5 + 3*(-1)^n - 2*(1 + (-1)^n)*n + 6*n^2) / 8.
(End)
E.g.f.: (1/8)*exp(-x)*(3 + 2*x + exp(2*x)*(5 + 4*x + 6*x^2)). - Stefano Spezia, Nov 14 2019 after Colin Barker
a(-n) = 1, 1, 5, 7, 15, 19, ... = interleave 1 + n + 3*n^2, 1 + 3*n*(1+n), both in the spiral.
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 1, 3, 7, 11}, 42] (* Amiram Eldar, Nov 23 2019 *)
Module[{nn=20, a, b}, a=Table[1-n+3 n^2, {n, 0, nn}]; b=Table[1+3n(1+n), {n, 0, nn}]; Riffle[a, b]] (* Harvey P. Dale, Apr 30 2023 *)
PROG
(PARI) Vec((1 + 4*x^3 + x^4) / ((1 - x)^3*(1 + x)^2) + O(x^40)) \\ Colin Barker, Nov 15 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 14 2019
STATUS
approved