A135364 First column of a triangle - see Comments lines.
1, 2, 3, 7, 17, 40, 93, 216, 502, 1167, 2713, 6307, 14662, 34085, 79238, 184206, 428227, 995507, 2314273, 5380032, 12507057, 29075380, 67592058, 157132471, 365288677, 849193147, 1974134558, 4589306057, 10668842202
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Richard Choulet, Transformation à la Curtz. Curtz like Transformation, March 2008.
- Index entries for linear recurrences with constant coefficients, signature (3,-2,1).
Programs
-
Magma
I:=[3,7,17]; [1,2] cat [n le 3 select I[n] else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..51]]; // G. C. Greubel, Apr 19 2021
-
Maple
a:= n-> `if`(n=0, 1, (<<7|3|2>> .<<3|1|0>, <-2|0|1>, <1|0|0>>^(n-1))[1, 3]): seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
-
Mathematica
LinearRecurrence[{3,-2,1}, {1,2,3,7,17}, 51] (* G. C. Greubel, Oct 11 2016; Apr 19 2021 *)
-
Sage
@CachedFunction def A095263(n): return sum( binomial(n+j+2, 3*j+2) for j in (0..n//2) ) def A135364(n): return 1 if n==0 else 2*A095263(n-1) -3*A095263(n-2) +2*A095263(n-3) [A135364(n) for n in (0..50)] # G. C. Greubel, Apr 19 2021
Formula
From Richard Choulet, Jan 06 2008: (Start)
a(n+1) = a(n) + a(n-1) + (n-1)*a(1) + (n-2)*a(2) + ... + 2*a(n-2) for n>=3.
O.g.f.: 1 + x*(2 - 3*x + 2*x^2) / (1 - 3*x + 2*x^2 - x^3).
a(n+3) = 3*a(n+2) - 2*a(n+1) + a(n). (End)
a(0) = 1, a(n) = term (1,3) in the 1 X 3 matrix [7,3,2].[3,1,0; -2,0,1; 1,0,0]^(n-1) (n>0). - Alois P. Heinz, Jul 24 2008
Extensions
More terms from Richard Choulet, Jan 06 2008
Comments