OFFSET
0,1
COMMENTS
A087666: Consider the recurrence b(0) = n/3, b(n) = b(n-1)*floor(b(n-1)); sequence gives number of steps to reach an integer, or -1 if no integer is ever reached. - Robert G. Wilson v, Oct 10 2003 & Mar 10 2004
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..60
MAPLE
See the Maple program in A087666 for the best way to compute this sequence. - N. J. A. Sloane
MATHEMATICA
f[n_] := Block[{c = 1, k = n/3}, If[ IntegerQ[k], 0, While[tn = Floor[k]; tf = k - tn; tn = Mod[tn, 3^100]; k = tn(tn + tf); ! IntegerQ[k], c++ ]; c++ ]]; a = Table[0, {50}]; Do[ b = f[n]; If[ a[[b + 1]] == 0, a[[b + 1]] = n; Print[b, " = ", n]], {n, 6, 10^7}]; a (* Robert G. Wilson v, Mar 10 2004, using the idea from N. J. A. Sloane's Maple code in A087666 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 30 2003
EXTENSIONS
More terms from Robert G. Wilson v, Oct 10 2003, Mar 10 2004
STATUS
approved
