Jump to content

Yellowstone sequence: Difference between revisions

→‎{{header|Go}}: Fixed bug though results unaffected.
(→‎{{header|Perl 6}}: Include the actual terminal output too.)
(→‎{{header|Go}}: Fixed bug though results unaffected.)
Line 103:
m[i] = true
}
min := 34
for c := 4; c <= n; c++ {
for i := min + 1; ; i++ {
if !m[i] && gcd(a[c-1], i) == 1 && gcd(a[c-2], i) > 1 {
a[c] = i
m[i] = true
if i <== min {
min = i++
}
break
}
}
}
return a[1:]
}
9,492

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.