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]
Computing a second-order recurrence relation recursively and without memoization requires L(n) computations for the n-th item of the series.
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 .
The first few Leonardo numbers are
References
- ↑ EWD797
- ↑ Dijkstra, Edsger W. Smoothsort – an alternative to sorting in situ (EWD-796a). E.W. Dijkstra Archive. Center for American History, University of Texas at Austin. (original; transcription)
- ↑ EWD796a
External links
- "Sloane's A001595 ", The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
|
This article is issued from Wikipedia - version of the Sunday, April 03, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.