OFFSET
0,1
COMMENTS
Let N_1 be the set of odd natural numbers and v(y) the 2-adic valuation of y. Define the map F : N_1 -> N_1 by F(x) = (3*x+1)/2^v(3*x+1) (see A075677). Let F^(k)(x) denote k-fold iteration of F, with recurrence F^(k)(x) = F(F^(k-1)(x)), k > 0, and initial condition F^(0)(x) = x. Then, for n>0, a(n) is the least m such that F^(n)(4*m-3) == 1 (mod 4). Cf. A257499.
Let k == 1 mod 4, and k(r) be the r-th iteration at which k appears in a Collatz sequence. When n >= 2 and k(r) == [2^(n+1) - a(n)] mod 2^(n+1), then n is the number of halving steps following k(r+1). For instance, since a(5) = 11, there are 5 halving steps following k(r+1) when k(r) == 53 mod 64, because 2^(5+1) = 64 and 64-11 = 53; e.g., k(r) = 117: 117 -> 352 -> 176 -> 88 -> 44 -> 22 -> 11. - Bob Selcoe, Feb 09 2017
LINKS
FORMULA
G.f.: (2-x-2*x^2)/((x-1)*(2*x-1)*(2*x+1)). - R. J. Mathar, Jul 25 2015
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) for n > 2. - Wesley Ivan Hurt, Nov 05 2015
a(n) = 4*a(n-2) - 1. - Bob Selcoe, Feb 09 2017
a(n) = 2^(n+1) - A096773(n+1). - Ruud H.G. van Tol, Sep 04 2023
MAPLE
MATHEMATICA
a[n_] := (1 + 2^n*(3 + 2*(-1)^n))/3; Table[a[n], {n, 0, 29}]
LinearRecurrence[{1, 4, -4}, {2, 1, 7}, 30] (* Harvey P. Dale, Aug 03 2024 *)
PROG
(PARI) vector(30, n, n--; (1 + 2^n*(3 + 2*(-1)^n))/3) \\ Altug Alkan, Nov 05 2015
(Magma) [(1 + 2^n*(3 + 2*(-1)^n))/3: n in [0..50]]; // Wesley Ivan Hurt, Nov 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
L. Edson Jeffery, May 04 2015
STATUS
approved