OFFSET
1,3
COMMENTS
a(n) is the first successor in the 3x+1 trajectory of 4*n-3 that is congruent to 1 mod 4. - Ruud H.G. van Tol, Jul 16 2023
LINKS
Ruud H.G. van Tol, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 4*A257480(n) - 3. - L. Edson Jeffery, Mar 29 2021
MATHEMATICA
v[y_] := IntegerExponent[y, 2]; f[x_] := (3*x + 1)/2^v[3*x + 1]; s[n_] := -1 + (3/2)^(-1 + v[1 + f[4*n - 3]])*(1 + f[4*n - 3]); Table[s[n], {n, 70}] (* L. Edson Jeffery, Mar 29 2021 *)
PROG
(PARI) a(n) = my(x=3*n-2, v=valuation(x, 2)); x>>=v; v=valuation(x+1, 2)-1; ((x>>v)+1)*3^v-1; \\ Ruud H.G. van Tol, Jul 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
L. Edson Jeffery, May 03 2015
EXTENSIONS
New name by L. Edson Jeffery, Mar 29 2021
STATUS
approved