RosettaCodeData/Task/Yellowstone-sequence/11l/yellowstone-sequence-2.11l

14 lines
233 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
F yellow(n)
V a = [1, 2, 3]
V b = Set([1, 2, 3])
V i = 4
L n > a.len
I i !C b & gcd(i, a.last) == 1 & gcd(i, a[(len)-2]) > 1
a.append(i)
b.add(i)
i = 4
i++
R a
print(yellow(30))