OFFSET
0,2
COMMENTS
This is a modified Collatz-Terras map (A060322), called in the Vaillant and Delarue link f.
The Collatz conjecture: iterations of the map f = a: N_0 -> N_0 with n -> a(n) lead always to 0.
The minimal number k with a^{[k]}(n) = 0 is given by A324037(n).
The tree CfTree, related to this map, giving the branches which lead to 0 for each vertex label of level n >= 0 is given in A324246.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..20000
Nicolas Vaillant and Philippe Delarue, The hidden face of the 3x+1 problem. Part I: Intrinsic algorithm, April 26 2019.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
FORMULA
a(n) = (3*n+1)/2 if n is odd, 3*n/4 if n == 0 (mod 4), and (n-2)/4 if n == 2 (mod 4).
a(n) = A349414(n) + n. - Ruud H.G. van Tol, Dec 08 2021
G.f.: x*(2 + 5*x^2 + 3*x^3 + 4*x^4 + x^5 + x^6)/(1 - x^4)^2. - Stefano Spezia, Dec 08 2021
MATHEMATICA
a[n_]:=If[OddQ@n, (3n+1)/2, If[Mod[n, 4]==0, 3n/4, (n-2)/4]]; Array[a, 51, 0] (* Giorgos Kalogeropoulos, Dec 08 2021 *)
PROG
(PARI) A324245(n) = if(n%2, (1+3*n)/2, if(!(n%4), 3*(n/4), (n-2)/4)); \\ (After Mathematica-code) - Antti Karttunen, Dec 09 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolas Vaillant, Philippe Delarue, Wolfdieter Lang, May 09 2019
EXTENSIONS
More terms from Antti Karttunen, Dec 09 2021
STATUS
approved