login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087666 Consider recurrence b(0) = n/3, b(k+1) = b(k)*floor(b(k)); a(n) is the least k such that b(k) is an integer, or -1 if no integer is ever reached. 9
0, 3, 4, 0, 1, 1, 0, 3, 2, 0, 3, 7, 0, 1, 1, 0, 2, 3, 0, 2, 2, 0, 1, 1, 0, 5, 5, 0, 5, 6, 0, 1, 1, 0, 9, 2, 0, 8, 3, 0, 1, 1, 0, 2, 5, 0, 2, 2, 0, 1, 1, 0, 3, 3, 0, 6, 3, 0, 1, 1, 0, 4, 2, 0, 6, 4, 0, 1, 1, 0, 2, 4, 0, 2, 2, 0, 1, 1, 0, 6, 4, 0, 3, 6, 0, 1, 1, 0, 3, 2, 0, 3, 4, 0, 1, 1, 0, 2, 3, 0, 2, 2, 0, 1, 1, 0, 4, 7, 0, 6, 6, 0, 1, 1, 0, 5, 2, 0, 4, 3, 0, 1, 1, 0, 2 (list; graph; refs; listen; history; internal format)
OFFSET

6,2

COMMENTS

It is conjectured that an integer is always reached if the initial value n/3 is >= 2.

LINKS

J. C. Lagarias and N. J. A. Sloane, Approximate squaring (pdf, ps), Experimental Math., 13 (2004), 113-128.

MAPLE

(Gives right answer as long as answer is < M. This is better than the Mathematica or PARI programs): M := 50; f := proc(n) local c, k, tn, tf; global M; k := n/3; c := 0; while whattype(k) <> 'integer' do tn := floor(k); tf := k-tn; tn := tn mod 3^50; k := tn*(tn+tf); c := c+1; od: c; end; (from N. J. A. Sloane (njas(AT)research.att.com))

MATHEMATICA

f[n_] := If[ Mod[3n, 3] == 0, 0, Length[ NestWhileList[ #1*Floor[ #1] &, n, !IntegerQ[ #2] &, 2]] - 1]; Table[f[n/3], {n, 6, 120}] (from Robert G. Wilson v)

PROG

(PARI) a(n)=if(n<0, 0, c=n/3; x=0; while(frac(c)>0, c=c*floor(c); x++); x)

CROSSREFS

Cf. A083863 (integer reached), A086336 and A087663 (records), A057016, A087710, A088706 (inverse).

Sequence in context: A155061 A131099 A098800 * A061353 A016653 A096088

Adjacent sequences:  A087663 A087664 A087665 * A087667 A087668 A087669

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Sep 27 2003

EXTENSIONS

More terms and PARI program from Benoit Cloitre, Sep 29 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 23:34 EST 2012. Contains 205860 sequences.