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.

A375733 Integers of the form p^(q^r) where p, q, r are distinct primes.

Original entry on oeis.org

390625, 1953125, 5764801, 40353607, 214358881, 815730721, 2357947691, 6975757441, 10604499373, 16983563041, 78310985281, 118587876497, 322687697779, 500246412961, 847288609443, 852891037441, 1801152661463, 3512479453921, 7984925229121, 11688200277601, 14507145975869
Offset: 1

Views

Author

Paul Duckett, Aug 25 2024

Keywords

Comments

a(15) is the first term not an eighth or ninth power.

Examples

			390625 is a term because it equals 5^(2^3).
118587876497 is a term because it equals 17^(3^2).
		

Crossrefs

Subsequence of A217709.

Programs

  • Maple
    N:= 10^20: # for terms <= N
    with(priqueue):
    initialize(pq):
    if 2^(3^5) < N then insert([-2^(3^5),2,3,5],pq) fi:
    if 2^(5^3) < N then insert([-2^(5^3),2,5,3],pq) fi:
    if 3^(2^5) < N then insert([-3^(2^5),3,2,5],pq) fi:
    if 3^(5^2) < N then insert([-3^(5^2),3,5,2],pq) fi:
    if 5^(2^3) < N then insert([-5^(2^3),5,2,3],pq) fi:
    if 5^(3^2) < N then insert([-5^(3^2),5,3,2],pq) fi:
    Res:= NULL:
    while pq[0] > 0 do
      t:= extract(pq);
      Res:= Res, -t[1];
      q:= nextprime(t[2]);
      while member(q,{t[3],t[4]}) do q:= nextprime(q) od;
      v:= q^(t[3]^t[4]);
      if v <= N then insert([-v,q,t[3],t[4]],pq) fi;
      if t[2] = 2 then
        q:= nextprime(t[3]);
        if q = t[4] then q:= nextprime(q) fi;
        v:= 2^(q^t[4]);
        if v <= N then insert([-v,2,q,t[4]],pq) fi;
      fi;
      if {t[2],t[3]} = {2,3} then
        q:= nextprime(t[4]);
        v:= t[2]^(t[3]^q);
        if v <= N then insert([-v,t[2],t[3],q],pq) fi;
      fi
    od:
    Res; # Robert Israel, Aug 27 2024
  • Mathematica
    seq[max_] := Module[{ps = Select[Range[Floor[Surd[max, 8]]], PrimeQ], t}, t = Select[Tuples[ps, {3}], UnsameQ @@ # &]; t = Select[t, #[[1]] < Surd[max, (#[[2]]^#[[3]])] &]; Sort[Select[(#[[1]]^(#[[2]]^#[[3]])) & /@ t, # <= max &]]]; seq[10^14] (* Amiram Eldar, Aug 27 2024 *)