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!)
A068119 Number of steps to reach an integer starting with n + 1/4 and iterating the map x -> x*ceiling(x). 12

%I #14 Jul 29 2013 03:48:35

%S 3,3,1,3,2,2,1,7,4,4,1,2,2,4,1,6,3,5,1,5,2,2,1,4,6,3,1,2,2,3,1,7,3,4,

%T 1,3,2,2,1,7,4,7,1,2,2,5,1,3,3,10,1,4,2,2,1,3,5,11,1,2,2,3,1,5,3,3,1,

%U 3,2,2,1,4,4,6,1,2,2,4,1,4,3,6,1,6,2,2,1,6,7,3,1,2,2,3,1,4,3,5,1,3,2,2,1,4

%N Number of steps to reach an integer starting with n + 1/4 and iterating the map x -> x*ceiling(x).

%C If the initial value is n + 1/2 we get A001511.

%C S(n)=sum(k=1, n, a(k)) seems to be asymptotic to 3*n. S(n)=3n for in A074069.

%C The sign of 3n-S(n) seems to change often: 3n-S(n) gives A074077. Is 3n-S(n) bounded? - _Benoit Cloitre_, Sep 05 2002

%H Reinhard Zumkeller, <a href="/A068119/b068119.txt">Table of n, a(n) for n = 1..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.

%F a(n) = 1 if n == 3 (mod 4); a(n) = 2 if n == 5, 6, 12, 13 (mod 16); a(n) = 3 if n == 1, 2, 4, 17, 26, 30, 33, 36, 48, 49, 56, 62 (mod 64);...

%t ce[n_] := Length[NestWhileList[#*Ceiling[#] &, n + 1/4, ! IntegerQ[#] &]] - 1; ce /@ Range[104] (* _Jayanta Basu_, Jul 29 2013 *)

%o (PARI) a(n)=if(n<0,0,s=n+1/4; c=0; while(frac(s)>0,s=s*ceil(s); c++); c)

%o (Haskell)

%o import Data.Ratio ((%), denominator)

%o a068119 n = fst $ until ((== 1) . denominator . snd)

%o (\(i, x) -> (i + 1, f x)) (0, fromInteger n + 1%4)

%o where f x = x * fromIntegral (ceiling x)

%o -- _Reinhard Zumkeller_, May 26 2013

%Y Cf. A073524, A074069, A074077

%K nonn

%O 1,1

%A _Benoit Cloitre_, Aug 30 2002

%E Corrected by Diego Torres (torresvillarroel(AT)hotmail.com), Aug 31 2002

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 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)