OFFSET
1,1
FORMULA
a[n]=Min{x; A076228[x]=n]}
EXAMPLE
n=6:a[6]=9 because first in iteration list started with 9, i.e. in {9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}, occurs first n=six sinking below iv=9: at {7, 5, 8, 4, 2, 1}.
MATHEMATICA
f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1); f[1]=1; f0[x_] := Delete[FixedPointList[f, x], -1] f1[x_] := f0[x]-Part[f0[x], 1] g[x_] := Count[Sign[f1[x]], -1] t=Table[0, {256}]; Do[s=g[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 1, 1000}]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 01 2002
STATUS
approved