OFFSET
0,2
COMMENTS
From Klaus Brockhaus, May 23 2010: (Start)
Continued fraction expansion of (7+sqrt(229))/18.
Decimal expansion of 142/999. (End)
REFERENCES
C. A. Pickover, The Math Book, 2009; Collatz Conjecture, pp 374-375.
LINKS
Eric Weisstein's World of Mathematics, Collatz Problem
Wikipedia, Collatz conjecture
Index entries for linear recurrences with constant coefficients, signature (0,0,1).
FORMULA
a(3n)=1, a(3n+1)=4, a(3n+2)=2.
G.f.: (1+4*x+2*x^2)/(1-x^3).
a(n) = 4^n mod 7. - Zerinvary Lajos, Nov 25 2009
a(n) = 2^(-n mod 3) = 2^A080425(n). - Wesley Ivan Hurt, Jun 20 2014
a(n) = sqrt(4^(5*n) mod 21). - Gary Detlefs, Jul 07 2014
From Wesley Ivan Hurt, Jun 30 2016: (Start)
a(n) = a(n-3) for n>2.
a(n) = (7 - 4*cos(2*n*Pi/3) + 2*sqrt(3)*sin(2*n*Pi/3))/3. (End)
MAPLE
MATHEMATICA
a[n_] := {1, 4, 2}[[Mod[n, 3] + 1]]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jul 19 2013 *)
LinearRecurrence[{0, 0, 1}, {1, 4, 2}, 105] (* Ray Chandler, Aug 25 2015 *)
PROG
(Sage) [power_mod(2, -n, 7)for n in range(0, 105)] # Zerinvary Lajos, Jun 07 2009
(Sage) [power_mod(4, n, 7)for n in range(0, 105)] # Zerinvary Lajos, Nov 25 2009
(PARI) A153727(n)=[1, 4, 2][n%3+1] \\ M. F. Hasler, Feb 10 2011
(Haskell)
a153727 n = a153727_list !! n
a153727_list = iterate a006370 1 -- Reinhard Zumkeller, Oct 08 2011
(Magma) [2^(-n mod 3) : n in [0..50]]; // Wesley Ivan Hurt, Jun 20 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Dec 30 2008
STATUS
approved