|
|
A137928
|
|
The even principal diagonal of a 2n X 2n square spiral.
|
|
14
|
|
|
2, 4, 10, 16, 26, 36, 50, 64, 82, 100, 122, 144, 170, 196, 226, 256, 290, 324, 362, 400, 442, 484, 530, 576, 626, 676, 730, 784, 842, 900, 962, 1024, 1090, 1156, 1226, 1296, 1370, 1444, 1522, 1600, 1682, 1764, 1850, 1936, 2026, 2116, 2210, 2304, 2402, 2500, 2602, 2704, 2810
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This is concerned with 2n X 2n square spirals of the form illustrated in the Example section.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*n + 4*floor((n-1)^2/4) = 2*n + 4*A002620(n-1).
G.f.: 2*x*(1 + x^2) / ( (1 + x)*(1 - x)^3 ).
Sum_{n>=1} 1/a(n) = Pi*tanh(Pi/2)/4 + Pi^2/24. - Amiram Eldar, Jul 07 2022
|
|
EXAMPLE
|
Example with n = 2:
.
7---8---9--10
| |
6 1---2 11
| | |
5---4---3 12
|
16--15--14--13
.
a(1) = 2(1) + 4*floor((1-1)/4) = 2;
a(2) = 2(2) + 4*floor((2-1)/4) = 4.
|
|
MAPLE
|
|
|
MATHEMATICA
|
LinearRecurrence[{2, 0, -2, 1}, {2, 4, 10, 16}, 60] (* Harvey P. Dale, Aug 28 2017 *)
|
|
PROG
|
(Python) a = lambda n: 2*n + 4*floor((n-1)**2/4)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|