let x = 1n;
let n = 0;

while (true) {
    x = x * x + 1n;
    n++;

    if (x.toString(2).length > 70000) {
        break;
    }
}

console.log(n);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: