login
A050104
a(n) = floor(a(n-1)/4) if this is not among 0, a(1), ..., a(n-2); otherwise a(n) = 3*a(n-1).
6
1, 3, 9, 2, 6, 18, 4, 12, 36, 108, 27, 81, 20, 5, 15, 45, 11, 33, 8, 24, 72, 216, 54, 13, 39, 117, 29, 7, 21, 63, 189, 47, 141, 35, 105, 26, 78, 19, 57, 14, 42, 10, 30, 90, 22, 66, 16, 48, 144, 432, 1296, 324, 972, 243, 60, 180, 540, 135
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Digit.
MATHEMATICA
Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 4]], r, 3 #[[-1]]]] &, {0, 1}, 57] (* Ivan Neretin, Jul 31 2016 *)
CROSSREFS
Cf. A050000 and references therein.
Sequence in context: A019675 A050129 A070343 * A175993 A021722 A293383
KEYWORD
nonn
STATUS
approved