Back to Cosmos

Newman-Conway Sequence

code/mathematical_algorithms/src/newman_conway/README.md

latest499 B
Original Source

Newman-Conway Sequence

The recursive sequence defined by its recurrence relation

Explaination

Recurrence Relation

P(1) = 1,
P(2) = 1,
P(n) = P (P(n-1) ) + P( n - P(n-1) )

Pattern

1, 1, 2, 2, 3, 4, 4, 4, 5, 6, ...

Complexity

To compute n<sup>th</sup> Newman-Conway Number.
Time Complexity: O(n)

Space Complexity: O(n)


<p align="center"> A massive collaborative effort by <a href="https://github.com/OpenGenus/cosmos">OpenGenus Foundation</a> </p>