OFFSET
1,1
COMMENTS
Such pairs are called amicable constant word self powers in the Cobeli paper.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..230
Cristian Cobeli, DOI^2, arXiv:1911.09003 [math.HO], 2019.
Cristian Cobeli, DOI^2, Romanian Journal Of Pure And Applied Mathematics, Tome LXVI, No. 3-4, 2021.
EXAMPLE
8=2^3 and 9=3^2 is such a pair because their decimal lengths are both 1, which is a repdigit; so 8 is a term.
81=2^9 and 512=9^2 is such a pair because their decimal lengths are 2 and 3, which are repdigits; so 81 is a term.
368^4=18339659776 and 4^368 is such a pair because their decimal lengths are 11 and 222, which are repdigits; so 18339659776 is a term. See Cobeli paper.
MATHEMATICA
repQ[n_] := Length[Union[IntegerDigits[IntegerLength[n]]]] == 1; q[n_] := n > 1 && repQ[n] && Module[{f = FactorInteger[n], e, g, d, x, y, ans = False}, e = f[[;; , 2]]; g = GCD @@ e; If[g > 1, Do[x = Surd[n, y]; If[y^x > n && repQ[y^x], ans = True; Break[]], {y, Rest @ Divisors[g]}]]; ans]; Select[Range[10000], q] (* Amiram Eldar, Apr 24 2022 *)
PROG
(PARI) iscw(n) = (#Set(digits(#Str(n))) == 1);
isokd(na, r, k) = fordiv(k, d, if (d < k, my(nb = (k/d)^(r^d)); if ((na < nb) && iscw(nb), return(1)); ); );
isok(na) = if (iscw(na), my(k, r); if (k=ispower(na, , &r), if (isokd(na, r, k), return(1)); ));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Apr 14 2022
STATUS
approved