login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
3
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, 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, 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
OFFSET
1,12
COMMENTS
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.
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).
LINKS
FORMULA
a(n) = 0 if and only if n is in A000045 (by definition).
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).
a(n) >= 3 if and only if n is in A377209 \ A000079.
a(n) >= 4 if and only if n is in A377210 \ A000079.
a(n) < A000005(n).
EXAMPLE
a(12) = 2 since 12/z(12) = 4 and 4/z(4) = 2 is a Fibonacci number that is reached after 2 iterations.
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.
MATHEMATICA
zeck[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
a[n_] := a[n] = Module[{z = zeck[n]}, If[z == 1, 0, If[!Divisible[n, z], 1, 1 + a[n/z]]]]; Array[a, 100]
PROG
(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
a(n) = {my(z = zeck(n)); if(z == 1, 0, if(n % z, 1, 1 + a(n/z))); }
CROSSREFS
Cf. A000005, A000045, A007895, A328208, A376615 (binary analog), A377209, A377210.
Sequence in context: A111330 A225152 A117447 * A328775 A053250 A364259
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Oct 20 2024
STATUS
approved