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!)
A309408 Start with X = F(n) = A000045(n). Repeatedly replace X with X - ceiling(X/n); a(n) is the number of steps to reach 0. 0

%I #22 Aug 18 2019 12:24:56

%S 0,1,1,2,3,5,7,10,13,18,23,29,36,44,53,63,74,85,98,111,125,140,157,

%T 174,192,211,231,251,273,296,319,343,369,395,423,451,481,510,541,573,

%U 606,640,675,710,747,785,823,863,903,944,987,1030,1074,1119,1165,1212,1260,1309,1359,1409,1462,1514,1568,1622,1678,1734,1791

%N Start with X = F(n) = A000045(n). Repeatedly replace X with X - ceiling(X/n); a(n) is the number of steps to reach 0.

%C Inspired by A278586.

%F Lim_{n -> inf} (a(n)/(n^2)) = log(phi) = A002390.

%F a(n) = n^2*log(phi) - n*log(n) + O(n), phi = (1+sqrt(5))/2.

%F Lim_{n -> inf} (a(n) - n^2*log(phi) + n*log(n))/ n = -0.4681... .

%t f[n_] := Length[NestWhileList[# - Ceiling[#/n] &, Fibonacci[n], # > 0 &]] - 1; f /@ Range[0,70] (* _Amiram Eldar_, Aug 08 2019 *)

%o (Python)

%o n, f1, f0 = 0, 0, 1

%o while n <= 20000:

%o fn, a = f1, 0

%o while fn > 0:

%o fn, a = fn - (fn+n-1)//n, a+1

%o print(n,a)

%o n, f1, f0 = n+1, f0, f1+f0

%o (PARI) f(x, n) = x - ceil(x/n);

%o a(n) = my(nb=0, x=fibonacci(n)); while(x, x = f(x, n); nb++); nb; \\ _Michel Marcus_, Aug 03 2019

%Y Cf. A000045, A002390, A278586.

%K nonn,easy

%O 0,4

%A _A.H.M. Smeets_, Jul 29 2019

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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)