Public
Edited
Dec 31, 2022
Insert cell
Insert cell
Insert cell
{
const result = [];
for (let x = 1_000_000; x <= 1_500_000; x++) {
let max = 0;
let k = 0;
for (let i = 1; i <= x ** 0.5; i++) {
if (x % i === 0) {
const j = Math.floor(x / i);
if (j !== i && Math.abs(j - i) <= 110) {
k++;
if (Math.max(i, j) > max) {
max = Math.max(i, j);
}
}
}
}
if (k >= 3) {
result.push({ x: x, max: max });
}
}
return result;
}
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