|
|
A062708
|
|
Write 0,1,2,3,4,... in a triangular spiral; then a(n) is the sequence found by reading the terms along the line from 0 in the direction 0,2,...
|
|
10
|
|
|
0, 2, 13, 33, 62, 100, 147, 203, 268, 342, 425, 517, 618, 728, 847, 975, 1112, 1258, 1413, 1577, 1750, 1932, 2123, 2323, 2532, 2750, 2977, 3213, 3458, 3712, 3975, 4247, 4528, 4818, 5117, 5425, 5742, 6068, 6403, 6747, 7100, 7462, 7833, 8213, 8602, 9000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n*(9*n-5)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(2+7*x)/(1-x)^3. (End)
|
|
EXAMPLE
|
The spiral begins:
.
15
/ \
16 14
/ \
17 3 13
/ / \ \
18 4 2 12
/ / \ \
19 5 0---1 11
/ / \
20 6---7---8---9--10
.
a(1) = 9*1 + 0 - 7 = 2;
a(2) = 9*2 + 2 - 7 = 13;
a(3) = 9*3 + 13 - 7 = 33. (End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
nxt[{n_, a_}]:={n+1, 9(n+1)+a-7}; NestList[nxt, {0, 0}, 50][[All, 2]] (* Harvey P. Dale, Apr 11 2022 *)
|
|
PROG
|
(Magma) [n*(9*n-5)/2: n in [0..50]]; // G. C. Greubel, Sep 02 2019
(Sage) [n*(9*n-5)/2 for n in (0..50)] # G. C. Greubel, Sep 02 2019
(GAP) List([0..50], n-> n*(9*n-5)/2); # G. C. Greubel, Sep 02 2019
|
|
CROSSREFS
|
Cf. numbers of the form n*(n*k-k+4))/2 listed in A226488 (this is case k=9).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|