OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Ivaylo Kortezov, Sets of Paths between Vertices of a Polygon, Mathematics Competitions, Vol. 35 (2022), No. 2, ISSN:1031-7503, pp. 35-43.
Index entries for linear recurrences with constant coefficients, signature (8,-22,24,-9).
FORMULA
a(n) = (n/4)*(3^(n-1) + 3).
From Andrew Howroyd, Nov 23 2025: (Start)
a(n) = n + Sum_{k=2..n} binomial(n,k)*A001792(k-2).
E.g.f.: exp(x)*(x*exp(2*x) + 3*x)/4.
G.f.: x*(1 - 5*x + 7*x^2)/((1 - x)*(1 - 3*x))^2. (End)
EXAMPLE
PROG
(PARI) a(n) = (n/4)*(3^(n-1) + 3) \\ Andrew Howroyd, Nov 23 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ivaylo Kortezov, Feb 18 2023
STATUS
approved
