OFFSET
0,2
LINKS
Patrick De Geest, World!Of Numbers
Index entries for linear recurrences with constant coefficients, signature (4,-3).
FORMULA
G.f.: (1-3*x^2)/((1-x)*(1-3*x)).
a(n) = Sum_{k=0..n} binomial(n, k)*0^(k(n-k))*3^k.
From R. J. Mathar, Aug 04 2008: (Start)
a(n) = A034472(n), n>0.
a(n) = A094388(n-1), n>1.
a(n+1) - a(n) = A110593(n+1). (End)
a(n) = 3*a(n-1) - 2, with a(1)=4. - Vincenzo Librandi, Dec 29 2010
From J. Conrad, Nov 25 2015: (Start)
For n>0, a(n) = 2 * (A011782(0) + A011782(n) + Sum_{x=1..n-1} Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k)))).
Alternatively, for n>0, a(n) = A027649(n) - 2 * Sum_{x=1..n-1}Sum_{k=0..x-1}(binomial(x-1,k)*(A011782(k+1) + A011782(n-x+k))). (End)
E.g.f.: -1 + exp(x) + exp(3*x). - G. C. Greubel, Jun 22 2021
MATHEMATICA
Join[{1}, LinearRecurrence[{4, -3}, {4, 10}, 30]] (* Harvey P. Dale, Mar 29 2015 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((1-3*x^2)/((1-x)*(1-3*x))) \\ Altug Alkan, Dec 04 2015
(Magma) [1] cat [3^n + 1: n in [1..30]]; // G. C. Greubel, Jun 22 2021
(Sage) [1]+[3^n + 1 for n in (1..30)] # G. C. Greubel, Jun 22 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Feb 07 2005
STATUS
approved