OFFSET
1,1
COMMENTS
Detailed instructions for drawing the lines. Along the edges of an equilateral triangle with side n, points are marked that divide the edges into unit segments. Draw all infinite straight lines that connect those points and are parallel to the edges of the triangle. For n = 1..5, the link shows the construction of these lines.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Nicolay Avilov, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = n*(5*n + 3)/2 + 3;
From Stefano Spezia, Nov 23 2023: (Start)
O.g.f.: x*(7 - 5*x + 3*x^2)/(1 - x)^3.
E.g.f.: exp(x)*(3 + 4*x + 5*x^2/2) - 3. (End)
EXAMPLE
a(1) = 1 + 3 + 3 = 7;
a(2) = 2^2 + 3*3 + 3 = 16;
a(5) = 5^2 + 3*9 + 3*6 + 3 = 73.
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {7, 16, 30}, 100] (* Paolo Xausa, Oct 16 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolay Avilov, Jul 20 2023
EXTENSIONS
Edited by Peter Munn, Sep 02 2023
STATUS
approved