%I #31 May 10 2024 16:50:59
%S 1,1,17,5,13,1,29,17,25,17,161,17,37,5,65,53,49,13,125,29,61,1,101,53,
%T 73,29,269,41,85,17,137,161,97,25,233,53,109,17,173,89,121,161,1457,
%U 65,133,17,209,161,145,37,341,77,157,5,245,125,169,65,593,89,181,53,281,485,193,49,449,101,205,13
%N a(n) = -1 + (3/2)^(-1 + v(1 + F(4*n - 3)))*(1 + F(4*n - 3)), where v(y) is the 2-adic valuation of y, F(x) = (3*x + 1)/2^v(3*x + 1), and x == 1 (mod 2).
%C 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
%H Ruud H.G. van Tol, <a href="/A254070/b254070.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = 4*A257480(n) - 3. - _L. Edson Jeffery_, Mar 29 2021
%t 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 *)
%o (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
%Y Cf. A257480, A253676, A254068.
%K nonn
%O 1,3
%A _L. Edson Jeffery_, May 03 2015
%E New name by _L. Edson Jeffery_, Mar 29 2021