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.

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.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Oct 20 2024

Keywords

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).

Examples

			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.
		

Crossrefs

Cf. A000005, A000045, A007895, A328208, A376615 (binary analog), A377209, A377210.

Programs

  • 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]
  • 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)));}

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).