OFFSET
0,3
COMMENTS
The continuant function is defined in A072347. The successive record values in this sequence occur at n=0,2,5,8 and, for k>=3, at n=3^k-3^(k-1)-1, 3^k-3^(k-2)-1 and 3^k-1 and are given in A073301.
a(3^n-1) = A000129(n+1) for n>=0. - Alois P. Heinz, Aug 06 2013
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..6560 (6560 = 3^8-1)
Wikipedia, Continuant
MAPLE
c:= proc() option remember;
if nargs=0 then 1
elif nargs=1 then args[1]
else args[-1]*c(seq(args[i], i=1..nargs-1))
+c(seq(args[i], i=1..nargs-2))
fi
end:
a:= n-> `if`(n=0, 1, c(convert(n, base, 3)[])):
seq(a(n), n=0..120); # Alois P. Heinz, Aug 06 2013
CROSSREFS
KEYWORD
AUTHOR
John W. Layman, Jul 23 2002
STATUS
approved