cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A257404 Numbers of the form p * q^p where p and q are primes, in increasing order.

This page as a plain text file.
%I A257404 #27 Jun 23 2022 20:34:11
%S A257404 8,18,24,50,81,98,160,242,338,375,578,722,896,1029,1058,1215,1682,
%T A257404 1922,2738,3362,3698,3993,4418,5618,6591,6962,7442,8978,10082,10658,
%U A257404 12482,13778,14739,15309,15625,15842,18818
%N A257404 Numbers of the form p * q^p where p and q are primes, in increasing order.
%e A257404 (2,2):8, (2,3):18, (3,2):24, (2,5):50, (3,3):81, (2,7):98.
%t A257404 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 *)
%o A257404 (JavaScript)
%o A257404 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];
%o A257404 results = [];
%o A257404 max = 2 * Math.pow(primes[primes.length-1],2);
%o A257404 for (i = 0; i < primes.length; i++) {
%o A257404     for (j = 0; j  < primes.length; j++) {
%o A257404         p = primes[i];
%o A257404         q = primes[j];
%o A257404         n = p * Math.pow(q,p);
%o A257404         if (n <= max) {
%o A257404             // add it
%o A257404             results.push(n);
%o A257404         } else {
%o A257404             // break out of this loop
%o A257404             break;
%o A257404         }
%o A257404     }
%o A257404 }
%o A257404 // sort results and print them
%o A257404 results.sort(function(a, b){return a-b}).valueOf();
%o A257404 (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
%Y A257404 Cf. some subsequences: A079704, A104126.
%K A257404 nonn
%O A257404 1,1
%A A257404 _William Brian Repko_, Apr 22 2015