login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035614 Horizontal para-Fibonacci sequence: says which column of Wythoff array (starting column count at 0) contains n+1. 14

%I #43 Sep 18 2022 14:31:54

%S 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,

%T 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,

%U 0,1,2,0,3,0,1,6,0,1,2,0,3

%N Horizontal para-Fibonacci sequence: says which column of Wythoff array (starting column count at 0) contains n+1.

%C This is probably the same as the "Fibonacci ruler function" mentioned by Knuth. - _N. J. A. Sloane_, Aug 03 2012

%C From _Amiram Eldar_, Mar 10 2021: (Start)

%C a(n) is the number of the trailing zeros in the Zeckendorf representation of (n+1) (A014417).

%C The asymptotic density of the occurrences of k is 1/phi^(k+2), where phi is the golden ratio (A001622).

%C The asymptotic mean of this sequence is phi. (End)

%D D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.3, p. 82, solution to Problem 179.

%H Reinhard Zumkeller, <a href="/A035614/b035614.txt">Table of n, a(n) for n = 0..10000</a>

%H Casey Mongoven, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AMI_41_from175to192.pdf">Sonification of multiple Fibonacci-related sequences</a>, Annales Mathematicae et Informaticae, 41 (2013) pp. 175-192.

%H N. J. A. Sloane, <a href="/classic.html#WYTH">Classic Sequences</a>

%F The segment between the first M and the first M+1 is given by the segment before the first M-1.

%F a(n) = A122840(A014417(n + 1)). - _Indranil Ghosh_, Jun 09 2017

%t 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 *)

%o (Haskell)

%o a035614 = a122840 . a014417 . (+ 1) -- _Reinhard Zumkeller_, Mar 10 2013

%o (Python)

%o from sympy import fibonacci

%o def a122840(n): return len(str(n)) - len(str(int(str(n)[::-1])))

%o def a014417(n):

%o k=0

%o x=0

%o while n>0:

%o k=0

%o while fibonacci(k)<=n: k+=1

%o x+=10**(k - 3)

%o n-=fibonacci(k - 1)

%o return x

%o def a(n): return a122840(a014417(n + 1)) # _Indranil Ghosh_, Jun 09 2017, after Haskell code by _Reinhard Zumkeller_

%Y Cf. A000045, A001622, A014417, A019586, A035513, A035612, A122840, A139764.

%K nonn,nice,easy

%O 0,3

%A _J. H. Conway_ and _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:00 EDT 2024. Contains 371797 sequences. (Running on oeis4.)