login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. 11

%I

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

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

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

%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. A019586, A035513, A035614.

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 9 16:50 EDT 2020. Contains 335545 sequences. (Running on oeis4.)