OFFSET
1,1
COMMENTS
The numbers of the natural series are written line by line in the form of a numerical pyramid: the first line contains the number 1, the second line contains the next two numbers 2 and 3, the third line contains the next three numbers 4, 5 and 6, etc.; that is, the line starting with the number k contains the k following numbers. In this numerical pyramid, the contour of a "multi-story Christmas tree" is distinguished, each floor of which occupies three lines. The numbers of the sequence are the sum of all the numbers that fall into the contour of the Christmas tree, which has n floors.
LINKS
Nicolay Avilov, Problem 2128 (in Russian).
Nicolay Avilov, Explanatory drawing
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n*(27*n^3 + 66*n^2 + 49*n + 26) / 8.
G.f.: x*(21 + 46*x + 16*x^2 - 2*x^3)/(1 - x)^5. - Stefano Spezia, Dec 25 2022
EXAMPLE
a(1) = 1 + 2 + 3 + 4 + 5 + 6 = 21;
a(2) = a(1) + (8 + 9 + 12 + 13 + 14 + 17 +18 + 19 + 20) = 151.
PROG
(Python)
def a(n): return n*(27*n**3 + 66*n**2 + 49*n + 26) // 8
print([a(n) for n in range(1, 36)]) # Michael S. Branicky, Dec 25 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Dec 25 2022
STATUS
approved