cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A308709 Start with 3, divide by 3, multiply by 2, multiply by 3, multiply by 2, repeat.

This page as a plain text file.
%I A308709 #42 Nov 03 2020 11:37:50
%S A308709 3,1,2,6,12,4,8,24,48,16,32,96,192,64,128,384,768,256,512,1536,3072,
%T A308709 1024,2048,6144,12288,4096,8192,24576,49152,16384,32768,98304,196608,
%U A308709 65536,131072,393216,786432,262144,524288,1572864,3145728,1048576
%N A308709 Start with 3, divide by 3, multiply by 2, multiply by 3, multiply by 2, repeat.
%C A308709 The division by 3 is always possible since it is always preceded by a multiplication by 3.
%C A308709 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.
%H A308709 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,4).
%F A308709 G.f.: x*(3+x+2*x^2+6*x^3)/(1-4*x^4).
%e A308709 3; /3 => 1; *2 => 2; *3 => 6;  *2 => 12;
%e A308709    /3 => 4; *2 => 8; *3 => 24; *2 => 48 ...
%t A308709 LinearRecurrence[{0, 0, 0, 4},{3, 1, 2, 6}, 50]
%o A308709 (Python 3)
%o A308709 def A308709List(init):
%o A308709     a = init
%o A308709     while True:
%o A308709         yield a
%o A308709         a //= 3
%o A308709         yield a
%o A308709         a <<= 1
%o A308709         yield a
%o A308709         a *= 3
%o A308709         yield a
%o A308709         a <<= 1
%o A308709 a = A308709List(3)
%o A308709 print([next(a) for _ in range(42)]) # _Peter Luschny_, Aug 05 2019
%Y A308709 Cf. A307407, A322469.
%K A308709 nonn,easy
%O A308709 1,1
%A A308709 _Georg Fischer_, Aug 05 2019