login
a(n) is the least initial value of a 3x+1 trajectory in which n is the largest (peak) term or a(n) = 0 if n cannot be a peak value (i.e., when n = 2k+1, n = 4k+2, n = 16k+12, etc.).
1

%I #9 Jun 13 2022 13:23:12

%S 1,2,0,4,0,0,0,8,0,0,0,0,0,0,0,3,0,0,0,20,0,0,0,24,0,0,0,0,0,0,0,32,0,

%T 0,0,0,0,0,0,13,0,0,0,0,0,0,0,48,0,0,0,7,0,0,0,56,0,0,0,0,0,0,0,21,0,

%U 0,0,68,0,0,0,72,0,0,0,0,0,0,0,80,0,0,0,84,0,0,0,19,0,0,0,0,0,0,0,96,0,0,0

%N a(n) is the least initial value of a 3x+1 trajectory in which n is the largest (peak) term or a(n) = 0 if n cannot be a peak value (i.e., when n = 2k+1, n = 4k+2, n = 16k+12, etc.).

%t c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1); c[1]=1; fpl[x_] := Max[Delete[FixedPointList[c, x], -1]] t=Table[fpl[w], {w, 1, 15000}]; Table[Min[Flatten[Position[t, j]]], {j, 1, 256}]

%Y Cf. A025586.

%K nonn

%O 1,2

%A _Labos Elemer_, Sep 11 2003