OFFSET
1,3
COMMENTS
This sequence is similar to A073524, approximate squaring. However, for the cubing map it is easy to show that fractions of the form odd/2 never yield an integer. Hence if an iterate ever has this form, then we know it will never yield an integer. The computations, similar to A073524, must be done modulo n^max for some max > 2*a(n)+2.
EXAMPLE
a(3)=3 because 4/3 -> 8/3 -> 64/3 -> 9728.
MATHEMATICA
Stuck[x_] := OddQ[Numerator[x]] && (Denominator[x]==2); Table[lim=50; While[k=0; x=1+1/n; m=n^lim; While[2k<lim-3 && !IntegerQ[x] && !Stuck[x], x=Mod[x*Ceiling[x^2], m]; k++ ]; 2k>=lim-3, lim=2*lim]; If[Stuck[x], -1, k], {n, 200}]
CROSSREFS
KEYWORD
sign
AUTHOR
T. D. Noe, Apr 10 2006
STATUS
approved