OFFSET
1,1
EXAMPLE
(2,2):8, (2,3):18, (3,2):24, (2,5):50, (3,3):81, (2,7):98.
MATHEMATICA
max=10^5; p=q=2; Sort[Reap[While[2*q^2 <= max, While[(n=p*q^p) <= max, Sow@n; p=NextPrime@p]; p=2; q=NextPrime@q ]][[2, 1]]] (* Giovanni Resta, May 19 2015 *)
PROG
(JavaScript)
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
results = [];
max = 2 * Math.pow(primes[primes.length-1], 2);
for (i = 0; i < primes.length; i++) {
for (j = 0; j < primes.length; j++) {
p = primes[i];
q = primes[j];
n = p * Math.pow(q, p);
if (n <= max) {
// add it
results.push(n);
} else {
// break out of this loop
break;
}
}
}
// sort results and print them
results.sort(function(a, b){return a-b}).valueOf();
(PARI) is(n)={bittest(6, #n=factor(n)~)||return; #n==1&&return(n[1, 1]+1==n[2, 1]); (n[2, 1]==1&&n[2, 2]==n[1, 1])||(n[2, 2]==1&&n[1, 2]==n[2, 1])} \\ M. F. Hasler, May 04 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
William Brian Repko, Apr 22 2015
STATUS
approved