|
|
A073300
|
|
If n=pqr...st in ternary, a(n)=value of the continuant [p,q,r,...,s,t].
|
|
2
|
|
|
1, 1, 2, 1, 2, 3, 1, 3, 5, 1, 2, 3, 1, 3, 5, 1, 4, 7, 2, 3, 4, 2, 5, 8, 2, 7, 12, 1, 2, 3, 1, 3, 5, 1, 4, 7, 2, 3, 4, 2, 5, 8, 2, 7, 12, 3, 4, 5, 3, 7, 11, 3, 10, 17, 1, 3, 5, 1, 4, 7, 1, 5, 9, 3, 5, 7, 3, 8, 13, 3, 11, 19, 5, 7, 9, 5, 12, 19, 5, 17, 29, 1, 2, 3, 1, 3, 5, 1, 4, 7, 2, 3, 4, 2, 5, 8, 2, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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)[])):
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|