Notebooks 2.0 is here.

Published
Edited
Dec 12, 2018
1 fork
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
function gcd(a, b) {
while (b) [a, b] = [b, a % b];
return a;
}
Insert cell
edges = {
const edges = [];
for (let i = 2; i <= n; ++i) {
for (let j = i + 1; j <= n; ++j) {
if (gcd(i, j) > 1) {
edges.push([i, j]);
}
}
}
return edges;
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more