cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A309408 #22 Aug 18 2019 12:24:56
%S A309408 0,1,1,2,3,5,7,10,13,18,23,29,36,44,53,63,74,85,98,111,125,140,157,
%T A309408 174,192,211,231,251,273,296,319,343,369,395,423,451,481,510,541,573,
%U A309408 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 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.
%C A309408 Inspired by A278586.
%F A309408 Lim_{n -> inf} (a(n)/(n^2)) = log(phi) = A002390.
%F A309408 a(n) = n^2*log(phi) - n*log(n) + O(n), phi = (1+sqrt(5))/2.
%F A309408 Lim_{n -> inf} (a(n) - n^2*log(phi) + n*log(n))/ n = -0.4681... .
%t A309408 f[n_] := Length[NestWhileList[# - Ceiling[#/n] &, Fibonacci[n], # > 0 &]] - 1; f /@ Range[0,70] (* _Amiram Eldar_, Aug 08 2019 *)
%o A309408 (Python)
%o A309408 n, f1, f0 = 0, 0, 1
%o A309408 while n <= 20000:
%o A309408     fn, a = f1, 0
%o A309408     while fn > 0:
%o A309408         fn, a = fn - (fn+n-1)//n, a+1
%o A309408     print(n,a)
%o A309408     n, f1, f0 = n+1, f0, f1+f0
%o A309408 (PARI) f(x, n) = x - ceil(x/n);
%o A309408 a(n) = my(nb=0, x=fibonacci(n)); while(x, x = f(x, n); nb++); nb; \\ _Michel Marcus_, Aug 03 2019
%Y A309408 Cf. A000045, A002390, A278586.
%K A309408 nonn,easy
%O A309408 0,4
%A A309408 _A.H.M. Smeets_, Jul 29 2019