Anonymous user
Yellowstone sequence: Difference between revisions
m
→{{header|REXX}}: simplified the logic.
(→{{header|REXX}}: added the REXX computer programming language for this task.) |
m (→{{header|REXX}}: simplified the logic.) |
||
Line 79:
do j=1 until #==m; prev= # - 1
if j<5 then do; #= #+1; @.#= j; !.#= j; !.j= 1; $= strip($ j); iterate; end
do
if gcd(k, @.#)\==1 | gcd(k, @.prev)<2 then iterate /*not meet
end
say $ /*display a list of a Yellowstone seq. */
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
gcd: parse arg x,y;
{{out|output|text= when using the default input:}}
<pre>
|