OFFSET
1,2
COMMENTS
The numerical pyramid is constructed from natural numbers as follows: the first line contains the number 1, the second line contains the numbers 2 and 3, the third line contains the next three numbers, and so on.
LINKS
Nicolay Avilov, Square frames for a(1) - a(6)
Nicolay Avilov, Pyramid with frame (in Russian).
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (8*n^3 - 12*n^2 + 13*n - 9)/3, where n > 1.
G.f.: x*(1 + 7*x + 8*x^2 - x^3 + x^4)/(1 - x)^4. - Stefano Spezia, Dec 16 2022
EXAMPLE
For n = 4 we have a numerical pyramid with numbers from 1 to 36 and its diamond frame, and the sum of the numbers that lie along the frame is a(4):
.
1
/ \
2 3
/ \
4 5 6
/ \
7 8 9 10
\ /
11 12 13 14 15
\ /
16 17 18 19 20 21
\ /
22 23 24 25 26 27 28
.
a(4) = 1 + 2 + 3 + 4 + 6 + 7 + 10 + 12 + 14 + 18 + 19 + 25 = 121.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Dec 16 2022
STATUS
approved