OFFSET
1,1
COMMENTS
The 3 X 3 and 5 X 5 spirals are
.
7---8---9
|
6 1---2
| |
5---4---3
.
with corners 7 + 9 + 5 + 3 = 24
and
.
21--22--23--24--25
|
20 7---8---9--10
| | |
19 6 1---2 11
| | | |
18 5---4---3 12
| |
17--16--15--14--13
.
with corners 21 + 25 + 17 + 13 = 76.
An issue arises when considering a 1 X 1 spiral. For ease, a 1 X 1 spiral happens to have no corners so the corresponding value might be considered as undefined (namely, undefined for n = 0).
However, from a theoretical perspective if n is allowed to be 0, meaning that a 1 X 1 spiral can have corners, the formulas below that include A114254 might need reconsideration. With the current formula a(n) = 16*n^2 + 4*n + 4, a(0) = 4, meaning that a 1 X 1 spiral (with value 1) has 4 corners with value 1, giving sum 4. This might pave the way to a discussion, considered parallel with A114254. With the given equations, a 1 X 1 spiral happens to have a corner sum of 4. However, a 1 X 1 spiral has a diagonal sum of 1, from A114254. This seems as to be a contradiction; namely, the first term of A114254 should at least be 4 in this case, as corners constitute a subset of diagonal elements.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Minh Nguyen, 2-adic Valuations of Square Spiral Sequences, Honors Thesis, Univ. of Southern Mississippi (2021).
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 16*n^2 + 4*n + 4.
From Colin Barker, Sep 10 2019: (Start)
G.f.: 4*x*(6 + x + x^2) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3.
(End)
E.g.f.: -4 + 4*exp(x)*(1 + 5*x + 4*x^2). - Stefano Spezia, Sep 11 2019
EXAMPLE
For n=1 (our first value) namely for a 3 X 3 spiral, we get a(1) = 24.
For n=2, for a 5 X 5 spiral, we get a(2) = 76.
MATHEMATICA
Table[ 16n^2+4n+4, {n, 42}] (* Metin Sariyar, Sep 14 2019 *)
PROG
(PARI) a(n) = 16*n^2 + 4*n + 4;
(PARI) Vec(4*x*(6 + x + x^2) / (1 - x)^3 + O(x^40)) \\ Colin Barker, Sep 10 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yigit Oktar, Sep 10 2019
STATUS
approved