OFFSET
1,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..12301 (rows 1..1000 of triangle, flattened).
H. M. Farkas, "Variants of the 3N+1 Conjecture and Multiplicative Semigroups", in Entov, Pinchover and Sageev, Geometry, Spectral Theory, Groups, and Dynamics, Contemporary Mathematics, vol. 387, American Mathematical Society, 2005, p. 121.
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, American Mathematical Society, 2010, p. 74.
FORMULA
T(n,1) = 2*n-1; T(n,k) = A349407((T(n,k-1)+1)/2), where n >= 1 and k >= 2.
EXAMPLE
Written as an irregular triangle, the sequence begins:
n\k 1 2 3 4 5 6 7
-------------------------------
1: 1
2: 3 1
3: 5 3 1
4: 7 11 17 9 3 1
5: 9 3 1
6: 11 17 9 3 1
7: 13 7 11 17 9 3 1
8: 15 5 3 1
9: 17 9 3 1
10: 19 29 15 5 3 1
11: 21 7 11 17 9 3 1
12: 23 35 53 27 9 3 1
MATHEMATICA
FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
Array[Most[FixedPointList[FarkasStep, 2*# - 1]] &, 15] (* Paolo Xausa, Sep 03 2024 *)
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Paolo Xausa, Dec 22 2021
STATUS
approved