Yellowstone sequence: Difference between revisions

m
Rust - reformatted with rustfmt
(Rust solution extended to plot the first 100 numbers in the sequence)
m (Rust - reformatted with rustfmt)
Line 1,153:
 
use num::integer::gcd;
use std::collections::HashSet;
use plotters::prelude::*;
use std::collections::HashSet;
 
fn yellowstone_sequence() -> impl std::iter::Iterator<Item = u32> {
Line 1,196:
chart.draw_series(LineSeries::new(
yellowstone_sequence().take(100).enumerate(),
&BLUE))?;,
))?;
Ok(())
}
Line 1,208 ⟶ 1,209:
match plot_yellowstone("yellowstone.png") {
Ok(()) => {}
Err(error) => eprintln!("Error: {}", error),
}
}</lang>
1,777

edits