login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A135364
First column of a triangle - see Comments lines.
11
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,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).
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(n) = A034943(n) + A034943(n+1). - R. J. Mathar, Apr 09 2008
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
a(n) = 2*A095263(n-1) -3*A095263(n-2) +2*A095263(n-3) with a(0) = 1. - 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 *)
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) )
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
KEYWORD
nonn
AUTHOR
Paul Curtz, Dec 09 2007
EXTENSIONS
More terms from Richard Choulet, Jan 06 2008
STATUS
approved