Leonardo number
The Leonardo numbers are a sequence of numbers given by the recurrence:
Edsger W. Dijkstra[1] used them as an integral part of his smoothsort algorithm,[2] and also analyzed them in some detail.[3]
Relation to Fibonacci numbers
The Leonardo numbers are related to the Fibonacci numbers by the relation .
From this relation it is straightforward to derive a closed-form expression for the Leonardo numbers, analogous to Binet's formula for the Fibonacci numbers:
where the golden ratio and are the roots of the quadratic polynomial .
gollark: It's just so ææææææ.
gollark: If it wasn't for people needing to use different languages I would NOT support Unicode.
gollark: I have to admit I kind of agree?
gollark: > packed UTF-16 datawhich is bad but differently.
gollark: > (One reason for this policy of replacement is that internally, a Text value is represented as packed UTF-16 data. Values in the range U+D800 through U+DFFF are used by UTF-16 to denote surrogate code points, and so cannot be represented. The functions replace invalid scalar values, instead of dropping them, as a security measure. For details, see Unicode Technical Report 36, §3.5.)
References
- "E.W.Dijkstra Archive: Fibonacci numbers and Leonardo numbers. (EWD 797)". www.cs.utexas.edu. Retrieved 2020-08-11.
- Dijkstra, Edsger W. Smoothsort – an alternative to sorting in situ (EWD-796a) (PDF). E.W. Dijkstra Archive. Center for American History, University of Texas at Austin. (transcription)
- "E.W.Dijkstra Archive: Smoothsort, an alternative for sorting in situ (EWD 796a)". www.cs.utexas.edu. Retrieved 2020-08-11.
External links
- OEIS sequence A001595
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.