OFFSET
1,2
FORMULA
EXAMPLE
The semi-Fibonacci sequence (A030067) starts:
[(1), 1, (2), 1, 3, 2, (5), 1, 6, 3, 9, 2, 11, 5, (16), 1, ...],
and obeys the recurrence:
This sequence also equals row sums of triangle A129100:
1;
1, 1;
2, 2, 1;
5, 6, 4, 1;
16, 24, 20, 8, 1;
69, 136, 136, 72, 16, 1;
430, 1162, 1360, 880, 272, 32, 1; ...
where columns of A129100 shift left under matrix square,
so that A129100^2 starts:
1;
2, 1;
6, 4, 1;
24, 20, 8, 1;
136, 136, 72, 16, 1;
1162, 1360, 880, 272, 32, 1; ...
PROG
(PARI) /* Generated as column 0 of triangle A129100: */ a(n)=local(A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(r=1, m, for(c=1, r, if(r==c || r==1 || r==2, B[r, c]=1, if(c==1, B[r, 1]=sum(i=1, r-1, A[r-1, i]), B[r, c]=(A^(2^(c-1)))[r-c+1, 1])); )); A=B); return(A[n+1, 1])
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Mar 29 2007
STATUS
approved