login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087705 First integer > n reached under iteration of map x -> (5/3)*floor(x) when started at n, or -1 if no such integer is ever reached. 10

%I #21 Sep 02 2023 04:36:38

%S 5,5,10,35,10,30,35,15,905,30,20,35,105,25,905,210,30,85,55,35,60,105,

%T 40,2410,905,45,210,80,50,85,405,55,155,160,60,280,105,65,110,2410,70,

%U 905,335,75,210,130,80,135,230,85,660,405,90,1160,155,95,160,2085,100

%N First integer > n reached under iteration of map x -> (5/3)*floor(x) when started at n, or -1 if no such integer is ever reached.

%C It is conjectured that an integer is always reached.

%H Robert Israel, <a href="/A087705/b087705.txt">Table of n, a(n) for n = 2..10000</a>

%H J. C. Lagarias and N. J. A. Sloane, Approximate squaring (<a href="http://neilsloane.com/doc/apsq.pdf">pdf</a>, <a href="http://neilsloane.com/doc/apsq.ps">ps</a>), Experimental Math., 13 (2004), 113-128.

%p f2 := proc(x,y) x*floor(y); end; r := 5/3; h := proc(x) local n,y; global r; y := f2(r,x); for n from 1 to 20 do if whattype(y) = 'integer' then RETURN([x,n,y]); else y := f2(r,y); fi; od: RETURN(['NULL','NULL','NULL']); end; [seq(h(n)[3],n=2..60)];

%o (Python)

%o from fractions import Fraction

%o def A087705(n):

%o x = Fraction(n,1)

%o while x.denominator > 1 or x<=n:

%o x = Fraction(5*x.__floor__(),3)

%o return int(x) # _Chai Wah Wu_, Sep 01 2023

%Y Cf. A087704, A087706.

%K nonn

%O 2,1

%A _N. J. A. Sloane_, Sep 29 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)