OFFSET
1,1
COMMENTS
The division by 3 is always possible since it is always preceded by a multiplication by 3.
This sequence arises in the "3x+1" (Collatz) problem. In the rows of A322469, the terms of this sequence appear at the end of any first row which is longer than all previous rows.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,4).
FORMULA
G.f.: x*(3+x+2*x^2+6*x^3)/(1-4*x^4).
EXAMPLE
3; /3 => 1; *2 => 2; *3 => 6; *2 => 12;
/3 => 4; *2 => 8; *3 => 24; *2 => 48 ...
MATHEMATICA
LinearRecurrence[{0, 0, 0, 4}, {3, 1, 2, 6}, 50]
PROG
(Python 3)
def A308709List(init):
a = init
while True:
yield a
a //= 3
yield a
a <<= 1
yield a
a *= 3
yield a
a <<= 1
a = A308709List(3)
print([next(a) for _ in range(42)]) # Peter Luschny, Aug 05 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Georg Fischer, Aug 05 2019
STATUS
approved