NestList
✖
NestList

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Create a list by applying f to x from 0 to 4 times:

https://wolfram.com/xid/0e7qutg6-me4

Repeatedly apply Cos to to a number:

https://wolfram.com/xid/0e7qutg6-kt5xa9

The function to nest can be a pure function:

https://wolfram.com/xid/0e7qutg6-gft

Scope (4)Survey of the scope of standard use cases
Nesting a function can build a formula:

https://wolfram.com/xid/0e7qutg6-2u05s4

Nesting can return a single number:

https://wolfram.com/xid/0e7qutg6-2i7ycf

The nested function can operate on a list:

https://wolfram.com/xid/0e7qutg6-4up6f6

Use the operator form to create a list from different starting expressions:

https://wolfram.com/xid/0e7qutg6-fuy528

https://wolfram.com/xid/0e7qutg6-15vvfa


https://wolfram.com/xid/0e7qutg6-gubzmj


https://wolfram.com/xid/0e7qutg6-4y0q68

Generalizations & Extensions (1)Generalized and extended use cases
Applications (15)Sample problems that can be solved with this function

https://wolfram.com/xid/0e7qutg6-fvp


https://wolfram.com/xid/0e7qutg6-ekd


https://wolfram.com/xid/0e7qutg6-gvd

Growth of annually compounded capital:

https://wolfram.com/xid/0e7qutg6-e8b3i6


https://wolfram.com/xid/0e7qutg6-n7a


https://wolfram.com/xid/0e7qutg6-ctc


https://wolfram.com/xid/0e7qutg6-xnx


https://wolfram.com/xid/0e7qutg6-j52


https://wolfram.com/xid/0e7qutg6-vw7


https://wolfram.com/xid/0e7qutg6-iib

Linear congruential pseudorandom generator:

https://wolfram.com/xid/0e7qutg6-ut2


https://wolfram.com/xid/0e7qutg6-e87


https://wolfram.com/xid/0e7qutg6-jxjc1l


https://wolfram.com/xid/0e7qutg6-ut7

Successively append to a list:

https://wolfram.com/xid/0e7qutg6-wa2


https://wolfram.com/xid/0e7qutg6-ozc

Operations on a pair of values:

https://wolfram.com/xid/0e7qutg6-y8

Properties & Relations (5)Properties of the function, and connections to other functions
Nest gives the last element of NestList:

https://wolfram.com/xid/0e7qutg6-h77


https://wolfram.com/xid/0e7qutg6-e2o

Nesting zero times simply returns to the original argument:

https://wolfram.com/xid/0e7qutg6-1us7n5

FixedPointList goes on until the result no longer changes:

https://wolfram.com/xid/0e7qutg6-dz2


https://wolfram.com/xid/0e7qutg6-mtc

NestWhileList goes on while a condition is true:

https://wolfram.com/xid/0e7qutg6-lzz6m2

FoldList automatically inserts second arguments from a list:

https://wolfram.com/xid/0e7qutg6-lz


https://wolfram.com/xid/0e7qutg6-bk1

Neat Examples (4)Surprising or curious use cases

https://wolfram.com/xid/0e7qutg6-sjq


https://wolfram.com/xid/0e7qutg6-tbcaw9


https://wolfram.com/xid/0e7qutg6-vt2


https://wolfram.com/xid/0e7qutg6-q5o


https://wolfram.com/xid/0e7qutg6-hk5


https://wolfram.com/xid/0e7qutg6-90


https://wolfram.com/xid/0e7qutg6-v8j

Wolfram Research (1988), NestList, Wolfram Language function, https://reference.wolfram.com/language/ref/NestList.html (updated 2024).
Text
Wolfram Research (1988), NestList, Wolfram Language function, https://reference.wolfram.com/language/ref/NestList.html (updated 2024).
Wolfram Research (1988), NestList, Wolfram Language function, https://reference.wolfram.com/language/ref/NestList.html (updated 2024).
CMS
Wolfram Language. 1988. "NestList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/NestList.html.
Wolfram Language. 1988. "NestList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/NestList.html.
APA
Wolfram Language. (1988). NestList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NestList.html
Wolfram Language. (1988). NestList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NestList.html
BibTeX
@misc{reference.wolfram_2025_nestlist, author="Wolfram Research", title="{NestList}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/NestList.html}", note=[Accessed: 21-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_nestlist, organization={Wolfram Research}, title={NestList}, year={2024}, url={https://reference.wolfram.com/language/ref/NestList.html}, note=[Accessed: 21-May-2025
]}