Published
Edited
Sep 14, 2022
1 star
Insert cell
Insert cell
{
let i=1n, n=1n;
let twins = [];
while (i<1000n) {
i=i+1n;
if ((4n*n+i+4n)%(i*(i+2n))==0n) twins.push(String(i)+","+String(i+2n))
n=n*i;
}
return twins
}
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