OFFSET
0,2
COMMENTS
...1;
...2,...1;
...3,...3,...1;
...7,...5,...4,...1;
..17,..10,...7,...5,...1;
..40,..24,..13,...9,...6,...1;
..93,..57,..31,..16,..11,...7,...1;
From the second, the sum of a row gives the first term of the following one. Diagonal differences are the first term upon. First column is a(n).
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).
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
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 *)
PROG
(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
(Sage)
@CachedFunction
def A095263(n): return sum( binomial(n+j+2, 3*j+2) for j in (0..n//2) )
[A135364(n) for n in (0..50)] # G. C. Greubel, Apr 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Dec 09 2007
EXTENSIONS
More terms from Richard Choulet, Jan 06 2008
STATUS
approved