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.
%I A377208 #7 Oct 20 2024 13:55:19 %S A377208 0,0,0,1,0,1,1,0,1,1,1,2,0,2,1,1,1,2,1,1,0,2,1,3,1,1,2,1,1,2,1,1,1,0, %T A377208 1,3,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,0,2,1,2,1,3,1,1,1,1,1,3,1,1, %U A377208 2,1,1,3,1,1,1,2,1,2,1,2,3,1,1,2,1,1,1,1,0,3,1,2,2,2,1,2,1,1,2,1 %N A377208 a(n) is the number of iterations that n requires to reach a noninteger or a Fibonacci number under the map x -> x / z(x), where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k; a(n) = 0 if n is a Fibonacci number. %C A377208 The Fibonacci numbers are the fixed points of the map, since z(Fibonacci(k)) = 1 for all k >= 1. Therefore they are arbitrarily assigned the value a(Fibonacci(k)) = 0. %C A377208 Each number n starts a chain of a(n) integers: n, n/z(n), (n/z(n))/z(n/z(n)), ..., of them the first a(n)-1 integers are Zeckendorf-Niven numbers (A328208). %H A377208 Amiram Eldar, <a href="/A377208/b377208.txt">Table of n, a(n) for n = 1..10000</a> %F A377208 a(n) = 0 if and only if n is in A000045 (by definition). %F A377208 a(n) >= 2 if and only if n is in A328208 \ A000079 (i.e., n is a Zeckendorf-Niven number that is not a Fibonacci number). %F A377208 a(n) >= 3 if and only if n is in A377209 \ A000079. %F A377208 a(n) >= 4 if and only if n is in A377210 \ A000079. %F A377208 a(n) < A000005(n). %e A377208 a(12) = 2 since 12/z(12) = 4 and 4/z(4) = 2 is a Fibonacci number that is reached after 2 iterations. %e A377208 a(36) = 3 since 36/z(36) = 18, 18/z(18) = 9 and 9/z(9) = 9/2 is a noninteger that is reached after 3 iterations. %t A377208 zeck[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* _Alonso del Arte_ at A007895 *) %t A377208 a[n_] := a[n] = Module[{z = zeck[n]}, If[z == 1, 0, If[!Divisible[n, z], 1, 1 + a[n/z]]]]; Array[a, 100] %o A377208 (PARI) zeck(n) = if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s) \\ _Charles R Greathouse IV_ at A007895 %o A377208 a(n) = {my(z = zeck(n)); if(z == 1, 0, if(n % z, 1, 1 + a(n/z)));} %Y A377208 Cf. A000005, A000045, A007895, A328208, A376615 (binary analog), A377209, A377210. %K A377208 nonn,easy,base %O A377208 1,12 %A A377208 _Amiram Eldar_, Oct 20 2024