OFFSET
1,2
COMMENTS
Also first differences of main diagonal A129339.
LINKS
FORMULA
a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4; for n > 4, a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3).
G.f.: x*(1-3*x+2*x^2+x^3)/((1-2*x)*(1-3*x+3*x^2)).
a(n) = A057681(n-1) + 2^(n-2), a(1) = 1. - Bruno Berselli, Feb 17 2011
PROG
(Magma) m:=34; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n+1, n]: n in [1..m-1] ];
(PARI) {m=33; v=concat([1, 2, 3, 4], vector(m-4)); for(n=5, m, v[n]=5*v[n-1]-9*v[n-2]+6*v[n-3]); v}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007
STATUS
approved