Yellowstone sequence: Difference between revisions
→The Yellowstone Permutation
mNo edit summary |
|||
Line 7:
For n >= 4,
a(n) - the smallest number not already in sequence such that a(n) is relatively prime to a(n-1) and is not relatively prime to a(n-2).
The sequence is a permutation of the natural numbers, and gets its name from what its authors felt was a spiking, fountain like appearance of a plot of the sequence.
;Example:
Line 26 ⟶ 28:
Extra: Demonstrate how to plot, with x = n and y coordinate a(n), the first 100 Yellowstone numbers.
=={{header|Julia}}==
|