(Translated by https://www.hiragana.jp/)
A035614 - OEIS
login
A035614
Horizontal para-Fibonacci sequence: says which column of Wythoff array (starting column count at 0) contains n+1.
14
0, 1, 2, 0, 3, 0, 1, 4, 0, 1, 2, 0, 5, 0, 1, 2, 0, 3, 0, 1, 6, 0, 1, 2, 0, 3, 0, 1, 4, 0, 1, 2, 0, 7, 0, 1, 2, 0, 3, 0, 1, 4, 0, 1, 2, 0, 5, 0, 1, 2, 0, 3, 0, 1, 8, 0, 1, 2, 0, 3, 0, 1, 4, 0, 1, 2, 0, 5, 0, 1, 2, 0, 3, 0, 1, 6, 0, 1, 2, 0, 3
OFFSET
0,3
COMMENTS
This is probably the same as the "Fibonacci ruler function" mentioned by Knuth. - N. J. A. Sloane, Aug 03 2012
From Amiram Eldar, Mar 10 2021: (Start)
a(n) is the number of the trailing zeros in the Zeckendorf representation of (n+1) (A014417).
The asymptotic density of the occurrences of k is 1/phi^(k+2), where phi is the golden ratio (A001622).
The asymptotic mean of this sequence is phi. (End)
REFERENCES
D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.3, p. 82, solution to Problem 179.
LINKS
Casey Mongoven, Sonification of multiple Fibonacci-related sequences, Annales Mathematicae et Informaticae, 41 (2013) pp. 175-192.
N. J. A. Sloane, Classic Sequences
FORMULA
The segment between the first M and the first M+1 is given by the segment before the first M-1.
a(n) = A122840(A014417(n + 1)). - Indranil Ghosh, Jun 09 2017
MATHEMATICA
max = 81; wy = Table[(n-k)*Fibonacci[k] + Fibonacci[k+1]*Floor[ GoldenRatio*(n - k + 1)], {n, 1, max}, {k, 1, n}]; a[n_] := Position[wy, n][[1, 2]]-1; Table[a[n], {n, 1, max}] (* Jean-François Alcover, Nov 02 2011 *)
PROG
(Haskell)
a035614 = a122840 . a014417 . (+ 1) -- Reinhard Zumkeller, Mar 10 2013
(Python)
from sympy import fibonacci
def a122840(n): return len(str(n)) - len(str(int(str(n)[::-1])))
def a014417(n):
k=0
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return x
def a(n): return a122840(a014417(n + 1)) # Indranil Ghosh, Jun 09 2017, after Haskell code by Reinhard Zumkeller
KEYWORD
nonn,nice,easy
STATUS
approved