JSFiddle - React, Tailwind, and code Playground
by Hensixteen
JavaScript
var terms = [];
var counter = 0;
var num;
var a = 2;
var b = 2;
for(a=2; a<=100; a++) {
for(b=2; b<=100; b++) {
num = Math.pow(a, b);
if(terms.indexOf(num) == -1) {
terms[counter] = num;
counter++;
}
}
}
console.log(Math.pow(2, 100));
console.log(Math.pow(2, 99));
console.log(Math.pow(2, 98));
console.log(terms);
console.log(terms.length);