\section{The equation \texorpdfstring{$x^3+y^3=3z^n$}{x\unichar{"00B3}+y\unichar{"00B3}=3z\unichar{"207F}}}\label{sec:3zp} The methods of Parts~I, II and~III, together with Frey curves and descents on curves of genus one and two, also apply to the equations \[ x^3+y^3=3^kz^n\qquad(k\ge1), \] and in particular to $x^3+y^3=3z^n$. A \emph{solution} of $x^3+y^3=3^kz^n$ is a triple $(a,b,c)$ of integers with $\gcd(a,b)=1$, $c\ne0$ and $a^3+b^3=3^kc^n$. For $k=1$ this is the same as a solution in coprime nonzero integers: $a=0$ would give $\pm1=3c^n$, and a prime dividing $a$ and $b$ divides $c$. For $k\ge3$ the condition $\gcd(a,b)=1$ is stronger than $\gcd(a,b,c)=1$ (for instance $6^3+3^3=3^5$), and it is the one we use. From \cref{sec:3zp-elementary} to \cref{sec:3zp-aux}, and from \cref{sec:3zp-frey} on, the exponent is a prime $p$. \subsection{Results}\label{sec:3zp-results} \begin{theorem}\label{thm:3zp-family} For every integer $n\ge3$, the equation $x^3+y^3=3z^n$ has no solution in coprime nonzero integers. For $n=2$ there are solutions, for example $11^3+(-2)^3=3\cdot21^2$. \end{theorem} \Cref{thm:3zp-family} follows from the cases $k=1$ of the next three theorems and the classical case $n=3$. The theorems also treat $x^3+y^3=3^kz^n$ with $k\ge2$; these cases are used in \cref{cor:3zp-k5} and in \cref{rem:3zp-open,rem:3zp-k}. \begin{theorem}\label{thm:3zp-unconditional} Let $p\ge7$ be a prime and $k\ge1$ an integer. \begin{enumerate}[(a)] \item If $2k-3$ is not a nonzero square modulo $p$, then $x^3+y^3=3^kz^p$ has no solution. In particular, for every prime $p\equiv3\pmod 4$ with $p\ge7$, $x^3+y^3=3z^p$ has no solution in coprime nonzero integers. \item For every prime $p$ with $7\le p<10^8$, $x^3+y^3=3z^p$ has no solution in coprime nonzero integers. \item For $3\le k\le7$ and every prime $p$ with $7\le p\le10^6$, $x^3+y^3=3^kz^p$ has no solution. \end{enumerate} \end{theorem} Part (a) is Freitas's symplectic argument \cite[\S2]{Freitas16}, applied to the twist by $-3$ of Kraus's Frey curve; parts (b) and (c) come from a criterion of Kraus's type \cite[Th\'eor\`eme~3.1]{Kraus98} with an auxiliary prime $q\equiv1\pmod p$, checked by computer (\cref{prop:3zp-aux} and the Supplement, items~S14--S16). In part~(c), the pairs $(k,p)=(3,7),(5,7),(7,11),(7,23)$ come from part~(a): for them $2k-3$ is not a nonzero square modulo~$p$, and for $(5,7)$ and $(7,11)$ it is divisible by~$p$. \begin{theorem}\label{thm:3zp-45}\leavevmode \begin{enumerate}[(a)] \item If $x,y,z$ are integers with $\gcd(x,y)=1$ and $x^3+y^3=3z^4$, then $(x,y,z)=\pm(1,-1,0)$. For every odd $k\ge1$, $x^3+y^3=3^kz^4$ has no solution. \item If $x,y,z$ are integers with $\gcd(x,y)=1$ and $x^3+y^3=3z^5$, then $(x,y,z)=\pm(1,-1,0)$. For every $k\ge1$ with $k\equiv1$ or $3\pmod 5$, $x^3+y^3=3^kz^5$ has no solution. \item The solutions of $x^3+y^3=9z^5$ are $(2,1,1)$, $(1,2,1)$, $(-2,-1,-1)$ and $(-1,-2,-1)$. For every $k\ge7$ with $k\equiv2\pmod 5$, $x^3+y^3=3^kz^5$ has no solution. \end{enumerate} \end{theorem} The proofs of \cref{thm:3zp-45} (\cref{sec:3zp-45}) are descents in the manner of Bruin's treatment of $x^3+y^3=z^4$ and $x^3+y^3=z^5$ \cite{Bruin00}: to the elliptic curve $v^2=u^3+27u$ for the exponent $4$, and to the curves $y^2=x^5-2^8\cdot3^j$ of genus two, $j=9,3,1$, for the exponent $5$, where for $j=1$ we use Chabauty's method at $7$. \begin{theorem}\label{thm:3zp-large} Let $p\ge17$ be a prime and $k\ge1$ an integer. Then $x^3+y^3=3^kz^p$ has no solution with $3\mid z$, and no solution at all if $k=1$ or $k\ge8$. In particular, for every prime $p\ge17$, $x^3+y^3=3z^p$ has no solution in coprime nonzero integers. \end{theorem} For $p\equiv1\pmod 3$ the proof of \cref{thm:3zp-large} is that of \cref{thm:three-main}; for $p\equiv2\pmod 3$ it uses the extension of that proof to an inert prime (\cref{prop:3zp-inert,prop:3zp-notscalar,sec:3zp-three}). \begin{proof}[Proof of \cref{thm:3zp-family}] If $(a,b,c)$ is a solution of $x^3+y^3=3z^n$ in coprime nonzero integers and $m\mid n$, then $(a,b,c^{n/m})$ is one of exponent $m$. Every $n\ge3$ has a divisor $m\in\{3,4\}$ or a prime divisor $p\ge5$. For $m=3$ there is no solution: the cubic curve $X^3+Y^3=3Z^3$ has only the rational point $(1:-1:0)$. This is classical: the curve is isomorphic to the elliptic curve $y^2=x^3-3888$ (Cremona label 243b2), which has rank $0$ and trivial torsion (the Supplement, item~S17). The exponents $4$ and $5$ are \cref{thm:3zp-45}~(a), (b). The primes $7\le p<10^8$ are \cref{thm:3zp-unconditional}~(b), the primes $p\equiv3\pmod 4$ are \cref{thm:3zp-unconditional}~(a), and the remaining primes, which are larger than $10^8$ and congruent to $1$ modulo $4$, are \cref{thm:3zp-large}. Of these, \cref{thm:3zp-large} uses \cref{lem:3zp-lift} only for $p\equiv2\pmod3$, that is, for $p\equiv5\pmod{12}$. So \cref{lem:3zp-lift} is needed only when $n$ is divisible neither by $3$ nor by $4$ and all its prime factors $p\ge5$ satisfy $p\equiv5\pmod{12}$ and $p>10^8$. \end{proof} \begin{remark}[what is not settled]\label{rem:3zp-open} For the exponent $4$, $x^3+y^3=3^kz^4$ has no solution for $k$ odd (\cref{thm:3zp-45}~(a)), nor for $k\equiv0\pmod 4$, where it reads $x^3+y^3=(3^{k/4}z)^4$ and Bruin's theorem \cite[Theorem~1]{Bruin00} applies. For $k\equiv2\pmod 4$ it reads $x^3+y^3=9(3^{(k-2)/4}z)^4$, and the equation $x^3+y^3=9z^4$ remains open. Besides $2^3+1^3=9\cdot1^4$ it has the solution $71^3+(-23)^3=9\cdot14^4$. \Cref{lem:3zp-descent} leads to the curve $Y^2=4X^4-3$, and the map $(X,Y)\mapsto(X/3,Y)$ takes it isomorphically to the curve $C_{4,-1}\colon Y^2=324X^4-3$ of \cite[\S3]{Bruin00}, of rank one. For the exponent $5$ every $k$ is settled (\cref{thm:3zp-45}~(b), (c), and \cref{cor:3zp-k5} for $k\equiv0,4\pmod 5$). For prime exponents $p\ge7$, \cref{rem:3zp-k} describes what remains; in particular, for $k=2$ and every prime $p\ge7$ it is open whether $(2,1,1)$, $(1,2,1)$ and their negatives are the only solutions. \end{remark} For $k=1$ the equation is, to our knowledge, not treated in the literature on twisted sums of two cubes, where the twisting prime is at least $5$ \cite{BennettLucaMulholland11,BennettBruniFreitas18}. The equations $x^r+y^r=3z^n$ with $r\in\{5,7,13\}$ have been solved for all $n\ge2$ by Billerey, Chen, Dieulefait and Freitas, with Demb\'el\'e for $r=13$ \cite{BCDF19,BCDDF23}, \cite[Theorem~1.2]{BCDF-II}; \cref{thm:3zp-family} is the corresponding result for $r=3$. The obstruction is the one recalled in \cref{sec:intro}, the identity that \cite[Remark~1.7]{BCDF-I} writes as $2^3+1^3=3\cdot3^1=3^2$. For the exponents $4$ and $5$ the nearest results we know of are Bruin's for the coefficient $1$ \cite{Bruin00} and, for the coefficient $2$, those of Bai and Zhang on $x^3+y^3=2z^{2n}$ with $n\ge2$ \cite{BaiZhang14} and of Wilcox on $2x^3+2y^3=z^4$ \cite[Proposition~A.4]{Wilcox24}. \subsection{Notation, and elementary facts}\label{sec:3zp-elementary} Let $(a,b,c)$ be a solution of $x^3+y^3=3^kz^p$ with $p\ge5$. We write \[ \nu\eqdef v_3(a^3+b^3)=k+p\,v_3(c),\qquad S\eqdef a+b,\qquad T\eqdef\frac{a^2-ab+b^2}{3}. \] Besides Kraus's Frey curve $E_{a,b}$ and the curve $W=E_{2,1}$ of \cref{sec:intro} we use the curves \[ E'_{a,b}\colon\ Y^2=X^3-(a-b)X^2+TX,\qquad W'=E'_{2,1}\colon\ Y^2=X^3-X^2+X . \] The curve $E'_{a,b}$ is the quadratic twist of $E_{a,b}$ by $-3$, and $W'$, of conductor $24$ (Cremona label 24a4), is the twist of $W$ by $-3$; Freitas denotes these curves $E$ and $W$ \cite[\S2]{Freitas16}. A solution is \emph{normalized} if either $a$ is even, $b$ is odd and $b\equiv1\pmod 4$, or $a$ and $b$ are odd and $a\equiv1\pmod 4$. Every solution becomes normalized after exchanging $a$ and $b$, replacing $(a,b,c)$ by $(-a,-b,-c)$, or both ($p$ is odd); each of the first two operations replaces $E_{a,b}$ and $E'_{a,b}$ by their quadratic twists by $-1$, and the two together leave these curves unchanged. \begin{lemma}\label{lem:3zp-elementary} Let $(a,b,c)$ be a solution of $x^3+y^3=3^kz^p$ with $p\ge5$. \begin{enumerate}[(i)] \item $ab\ne0$, $a+b\ne0$, $3\mid a+b$, $3\nmid ab$ and $\gcd(c,ab)=1$. \item $v_3(a^2-ab+b^2)=1$; $T$ is an integer prime to $3$ and to $a+b$; $v_3(a+b)=\nu-1$ and $\nu\ge2$. In particular $3\mid c$ if $k=1$. \item $a+b=3^{k-1}c_1^p$ and $T=c_2^p$ with integers $c_1,c_2$ such that $c=c_1c_2$. \item In $\OO$, $a+b\omega=(1-\omega)\gamma^p$ for some $\gamma\in\OO$, and $\Nm(\gamma)^p=T$. \end{enumerate} \end{lemma} \begin{proof} (i) If $a=0$ then $b=\pm1$ and $\pm1=3^kc^p$, which is impossible; $a+b\ne0$ because $c\ne0$. Since $a^3+b^3\equiv a+b\pmod 3$, $3\mid a+b$, and then $3\mid a$ would give $3\mid b$. A prime dividing $c$ and $a$ divides $b^3$. (ii) $a^2-ab+b^2=(a+b)^2-3ab$ with $9\mid(a+b)^2$ and $3\nmid ab$. A prime $\ell\ne3$ dividing $a+b$ and $3T$ divides $3ab$, hence $a$ and $b$. So $\nu=v_3(a+b)+1\ge2$, and for $k=1$ this gives $p\,v_3(c)\ge1$. (iii) $\bigl((a+b)/3^{k-1}\bigr)\cdot T=c^p$, the two factors are coprime integers, $v_3\bigl((a+b)/3^{k-1}\bigr)=p\,v_3(c)$, $T>0$, and $p$ is odd. (iv) Put $\pi=1-\omega$, so $\pi^2=-3\omega$. In the factorization $a^3+b^3=(a+b)(a+b\omega)(a+b\omega^2)$, the differences $(a+b)-(a+b\omega)=b\pi$ and $\omega(a+b)-(a+b\omega)=-a\pi$, their complex conjugates, and $(a+b\omega)-(a+b\omega^2)=b(\omega-\omega^2)=b\omega\pi$ and $\omega(a+b\omega)-(a+b\omega^2)=a(\omega-1)=-a\pi$ show that a common divisor of two factors divides $\pi\gcd(a,b)=\pi$. Moreover $v_\pi(a+b)=2(\nu-1)\ge2$ and $a+b\omega=(a+b)-b\pi$, so $v_\pi(a+b\omega)=v_\pi(a+b\omega^2)=1$. Hence $(a+b)/\pi^{2(\nu-1)}$, $(a+b\omega)/\pi$ and $(a+b\omega^2)/\pi$ are pairwise coprime, and their product is a unit times $\bigl(c/3^{v_3(c)}\bigr)^p$. As $\OO$ is a principal ideal domain whose unit group $\mu_6$ consists of $p$-th powers ($\gcd(p,6)=1$), $(a+b\omega)/\pi=\gamma^p$ with $\gamma\in\OO$. Taking norms, $3T=a^2-ab+b^2=3\Nm(\gamma)^p$. \end{proof} \begin{lemma}\label{lem:3zp-curve} Let $(a,b,c)$ be a solution of $x^3+y^3=3^kz^p$ with $p\ge5$, and $E'=E'_{a,b}$. \begin{enumerate}[(a)] \item $E'$ is an elliptic curve with the rational point $(0,0)$ of order $2$; $c_4(E')=-2^4ab$, $\Delta(E')=-2^4\cdot3^{2k-3}c^{2p}$, and $j(E')=2^83^3a^3b^3/(a^3+b^3)^2$. \item At a prime $\ell\ge5$: $E'$ has good reduction if $\ell\nmid c$; if $\ell\mid c$, the model is minimal, the reduction is multiplicative and $v_\ell(\Delta_{\min})=2p\,v_\ell(c)$. \item At $3$: the model is minimal, the reduction is multiplicative, and $v_3(\Delta_{\min})=2\nu-3=2k-3+2p\,v_3(c)\ge1$. \item At $2$, if $a$ is even and $b$ odd (so that $c$ is odd): the model is minimal, $v_2(\Delta_{\min})=4$, $v_2(j(E'))=8+3v_2(a)>0$, and the Kodaira type and the exponent of the conductor are $\mathrm{II}$ and $4$ if $b\equiv3\pmod 4$; $\mathrm{III}$ and $3$ if $b\equiv1\pmod4$ and $v_2(a)=1$; $\mathrm{IV}$ and $2$ if $b\equiv1\pmod 4$ and $4\mid a$. \item At $2$, if $a$ and $b$ are odd and $a\equiv1\pmod 4$ (so that $c$ is even and $M\eqdef v_2(a+b)=p\,v_2(c)\ge5$): the reduction is multiplicative and $v_2(\Delta_{\min})=2M-8$. \end{enumerate} In particular, for a normalized solution the conductor of $E'$ is $2^e\cdot3\cdot\prod_{\ell\mid c,\,\ell\ge5}\ell$, with $e=3$ if $v_2(a)=1$, $e=2$ if $4\mid a$, and $e=1$ if $ab$ is odd. \end{lemma} \begin{proof} (a) These are identities in $\Q(a,b)$; the model of $E'$ is that of the twist of $E_{a,b}$ by $-3$ ($c_4$ and $c_6$ multiplied by $1/9$ and $-1/27$), and $(a^3+b^3)^2/27=3^{2k-3}c^{2p}$. (b), (c) If $\ell\ge5$ divides $\Delta(E')$ then $\ell\mid c$, and then $\ell\nmid c_4(E')$ by \cref{lem:3zp-elementary}~(i); likewise $3\nmid c_4(E')$ and $v_3(\Delta(E'))=2\nu-3\ge1$. An integral model whose $c_4$ is a unit at $\ell$ is minimal at $\ell$ and has multiplicative reduction there if $\ell$ divides its discriminant. (d) Here $a_1=a_3=a_6=0$, $a_2=b-a$ and $a_4=T$ are odd, and $v_2(\Delta)=4$. The reduction $Y^2=X^3+X^2+X$ is singular at $(1,1)$, and the translation $X=x+1$, $Y=y+1$ gives $y^2+2y=x^3+a_2'x^2+a_4'x+a_6'$ with $a_2'=a_2+3$, $a_4'=a_4+2a_2+3$ and $a_6'=a_2+a_4$, all even; as $b_2=4a_2'$ is even, the reduction is additive. Tate's algorithm \cite[IV.9]{SilvermanAT} stops with type $\mathrm{II}$ (exponent $v_2(\Delta)=4$) if $4\nmid a_6'$; otherwise with type $\mathrm{III}$ (exponent $3$) if $a_4'\equiv2\pmod 4$, as then $b_8=4a_2'a_6'+4a_2'-a_4'^2\equiv-a_4'^2\not\equiv0\pmod 8$; and otherwise with type $\mathrm{IV}$ (exponent $2$), as $b_6=4(1+a_6')$ is not divisible by $8$. In particular the model is minimal. As $b^2\equiv1\pmod 8$, $3T\equiv a^2-ab+1\pmod 4$, so $T\equiv1\pmod4$ if $v_2(a)=1$ and $T\equiv3\pmod 4$ if $4\mid a$. Hence $a_6'\equiv b-1\pmod 4$ in both cases, and $a_4'\equiv T+1\pmod 4$ is $\equiv2$ if $v_2(a)=1$ and $\equiv0$ if $4\mid a$. (e) Here $b\equiv-a\pmod{32}$, $r\eqdef(a-b)/2\equiv a\equiv1\pmod 4$, $D\eqdef(a+b)^2/12$ is an integer divisible by $2^8$, and $X^2-(a-b)X+T=(X-r)^2+D$. The substitution $X=4x+r$, $Y=8y+4x$ turns $E'$ into $y^2+xy=x^3+\frac{r-1}4x^2+\frac D{16}x+\frac{rD}{64}$, an integral model with $c_4=-ab$ odd and discriminant $\Delta(E')/2^{12}$, of valuation $2M-8>0$. \end{proof} \subsection{The elliptic step}\label{sec:3zp-elliptic} \begin{lemma}\label{lem:3zp-irreducible} Let $(a,b,c)$ be a solution of $x^3+y^3=3^kz^p$ with $p\ge7$. Then $\rhob_{E'_{a,b},p}$ is absolutely irreducible. \end{lemma} \begin{proof} The representation is odd, so if it is not absolutely irreducible it is reducible over $\F_p$, and $E'=E'_{a,b}$ has a rational subgroup of order $p$; with the point $(0,0)$ it has a rational cyclic subgroup of order $2p$. By the theorems of Mazur \cite{Mazur78} and Kenku \cite{Kenku82}, for a prime $p\ge7$ an elliptic curve over $\Q$ with rational isogenies of degrees $2$ and $p$ exists only for $p=7$, and then $j\in\{-15^3,255^3\}$ (the two noncuspidal rational points of $X_0(14)$). But $v_3(j(E'))=3-2\nu<0$ by \cref{lem:3zp-curve}~(a) and \cref{lem:3zp-elementary}~(ii), so $j(E')$ is not an integer. \end{proof} \begin{theorem}\label{thm:3zp-elliptic} Let $p\ge7$ be a prime, $k\ge1$, and $(a,b,c)$ a normalized solution of $x^3+y^3=3^kz^p$. Then: \begin{enumerate}[(i)] \item $p\nmid 2k-3$; \item $c$ is odd, $a$ is even with $v_2(a)=1$, and $b\equiv1\pmod 4$; \item $\rhob_{E'_{a,b},p}\isom\rhob_{W',p}$, equivalently $\rhob_{E_{a,b},p}\isom\rhob_{W,p}$; \item $p\nmid c$; \item if $p\ne7$, then $7\nmid abc$ and $a^3\equiv b^3\pmod 7$. \end{enumerate} Statements \textup{(i)}, \textup{(iv)} and \textup{(v)} hold for every solution, since they do not change under the operations that normalize it. \end{theorem} \begin{proof} The curve $E'=E'_{a,b}$ is modular \cite{BCDT01} and $\rhob_{E',p}$ is irreducible (\cref{lem:3zp-irreducible}). Let $N$ be the conductor of $E'$. By Ribet's level-lowering theorem \cite{Ribet90}, $\rhob_{E',p}$ is isomorphic to the mod~$p$ representation of a newform of weight $2$ and level dividing $N'=N/\prod\ell$, the product over the primes $\ell$ exactly dividing $N$ with $p\mid v_\ell(\Delta_{\min})$. We use the theorem in this complete form, valid for $p\ge3$ (see \cite{Ribet94}), as do \cite{Kraus98,Freitas16}. By \cref{lem:3zp-curve}, every prime $\ell\ge5$ dividing $N$ is removed, $3$ is removed exactly when $p\mid 2k-3$, and $2$ is never removed (in case (e) of that lemma, $v_2(\Delta_{\min})=2p\,v_2(c)-8$ is prime to $p$). So $N'=2^e3^\delta$ with $e\in\{1,2,3\}$ as in \cref{lem:3zp-curve}, and $\delta=0$ if $p\mid 2k-3$, $\delta=1$ otherwise. There is no cusp form of weight $2$ on $\Gamma_0(M)$ for any proper divisor $M$ of $24$, and $S_2(\Gamma_0(24))$ is spanned by the newform of $W'$: these spaces have dimension equal to the genus of $X_0(M)$, which is $0$ for the proper divisors $M$ of $24$ and $1$ for $M=24$ \cite[\S3.1 and Theorem~3.5.1]{DiamondShurman}. Hence $\delta=1$ and $e=3$, which gives (i) and (ii), and $\rhob_{E',p}\isom\rhob_{W',p}$, both being semisimple with the same traces of Frobenius. Twisting by $-3$ gives the statement for $E_{a,b}$ and $W$. (iv) Suppose $p\mid c$. Then $E'$ has multiplicative reduction at $p$, and the semisimplification of $\rhob_{E',p}|_{G_{\Q_p}}$ is $\phi\bar\varepsilon_p\oplus\phi$ with $\phi$ unramified and $\phi^2=1$ (Tate curve). The curve $W'$ has good reduction at $p$. If it were supersingular, $\rhob_{W',p}|_{I_p}$ would be the sum of the two fundamental characters of level $2$ \cite[Proposition~12]{Serre72}, not $\bar\varepsilon_p\oplus1$. So it is ordinary, $\rhob_{W',p}|_{G_{\Q_p}}$ has semisimplification $\lambda^{-1}\bar\varepsilon_p\oplus\lambda$ with $\lambda$ unramified and $\lambda(\Frob_p)\equiv a_p(W')\pmod p$, and comparing the unramified constituents gives $a_p(W')\equiv\pm1\pmod p$. But $a_p(W')$ is even ($W'$ has a rational point of order $2$), so $a_p(W')\mp1$ is odd, nonzero, and of absolute value at most $2\sqrt p+10$, and for $n$ odd the sign goes into $c$; and $c\ne0$ because $z\ne0$. If $k=1$ then $v_3(c^n)=v_3(x+y)\ge1$, so $3\mid c$, and $3\mid z$ because $n\,v_3(z)=v_3(x+y)\ge1$. Finally $4(x^2-xy+y^2)=(x+y)^2+3(x-y)^2$ gives $12b^n=3^{2k-2}c^{2n}+3(x-y)^2$, and we divide by $3c^{2n}$. (For $n=p\ge5$ prime, $c$ and $b$ are the integers $c_1$ and $c_2$ of \cref{lem:3zp-elementary}~(iii); in the rest of this subsection, except in the case $k=0$ of the proof of \cref{cor:3zp-k5}, $b$ and $c$ have the meaning given here.) \end{proof} We shall move between the curves $Y^2=4X^n-3^j$ by the following maps, which send rational points to rational points and affine points to affine points: for $m\in\Z$, $(X,Y)\mapsto(X/3^{2m},Y/3^{nm})$ goes from $Y^2=4X^n-3^j$ to $Y^2=4X^n-3^{j-2nm}$; for $n=4$, $(X,Y)\mapsto(X/3^m,Y/3^{2m})$ goes to $Y^2=4X^4-3^{j-4m}$; and $(X,Y)\mapsto(4X,16Y)$ goes from $Y^2=4X^5-3^j$ to the curve \[ \Gamma_j\colon\ y^2=x^5-2^8\cdot3^j . \] So for $n=5$ only $j=(2k-3)\bmod 10\in\{1,3,5,7,9\}$ matters, and for $n=4$ only $(2k-3)\bmod4$. \subsubsection*{The exponent 4} \begin{proof}[Proof of \cref{thm:3zp-45}~(a)] If $z=0$ then $y=-x$ and $|x|=\gcd(x,y)=1$. Let $z\ne0$ and $k$ odd. Then $2k-3\equiv3\pmod 4$, and \cref{lem:3zp-descent} with the maps above gives an affine rational point of \[ H\colon\ Y^2=4X^4-3^7 . \] At such a point $Y+2X^2\ne0$ (otherwise $Y^2-4X^4=0$), so we may put $u=(Y+2X^2)/9$ and $v=2X(Y+2X^2)/27$. From $(Y-2X^2)(Y+2X^2)=-3^7$ we get $Y-2X^2=-3^5/u$, hence $4X^2=9u+3^5/u$, and $v^2=4X^2(Y+2X^2)^2/27^2=u^3+27u$. So the elliptic curve \[ E\colon\ v^2=u^3+27u \] has a rational point with $u\ne0$. We show that $E(\Q)=\{O,(0,0)\}$, which is a contradiction. \emph{Torsion.} As $27$ is not divisible by a fourth power, is not $4$, and $-27$ is not a square, $E(\Q)_{\mathrm{tors}}=\{O,(0,0)\}$ \cite[Proposition~X.6.1(a)]{SilvermanAEC}. \emph{Rank.} We use the descent by the $2$-isogeny $\phi\colon E\to\hat E$, $\hat E\colon y^2=x^3-108x$ \cite[X.4.9]{SilvermanAEC}. With the maps $\alpha\colon E(\Q)\to\Q^\times/\Q^{\times2}$ and $\alpha'\colon \hat E(\Q)\to\Q^\times/\Q^{\times2}$ defined there, $\operatorname{rank}E(\Q)=\log_2\bigl(|\alpha(E(\Q))|\cdot|\alpha'(\hat E(\Q))|/4\bigr)$ \cite[Chapter~III, \S6]{SilvermanTate}. The image of $\alpha$ lies in $\{\pm1,\pm3\}$ and contains $1$ and $\alpha(0,0)=27\equiv3$; a class $d$ lies in it only if $N^2=dM^4+(27/d)e^4$ has a rational solution with $(M,e)\ne(0,0)$, and for $d=-1,-3$ the right side is negative. So $|\alpha(E(\Q))|=2$. The image of $\alpha'$ lies in $\{\pm1,\pm2,\pm3,\pm6\}$ and contains $1$ and $\alpha'(0,0)=-108\equiv-3$; a class $d$ lies in it only if $N^2=dM^4-(108/d)e^4$ has a solution in every completion of $\Q$ with $(M,e)\ne(0,0)$, and we may take $(M,e)$ primitive. For $d=-1$ and $d=2$ there is no solution in $\Q_3$: if $3\nmid M$ the right side is $\equiv d\equiv2\pmod 3$; if $3\mid M$ then $3\nmid e$ and the right side has $3$-adic valuation $3$. For $d=-2$ there is no solution in $\Q_2$: the right side is $2(27e^4-M^4)$; if exactly one of $M,e$ is even it has $2$-adic valuation $1$, and if both are odd, $27e^4-M^4\equiv10\pmod{16}$ and the right side is $4w$ with $w\equiv5\pmod 8$. As the image is a group containing $-3$, it contains neither $-1$ nor $3$, neither $2$ nor $-6$, and neither $-2$ nor $6$; so $|\alpha'(\hat E(\Q))|=2$, and $\operatorname{rank}E(\Q)=0$. Item~S18 of the Supplement checks these local conditions by exhaustion. \end{proof} The map $(X,Y)\mapsto(X/3,Y/9)$ is an isomorphism from $H$ to the curve $C_{4,1}\colon Y^2=4X^4-27$ of \cite[\S\S2--3]{Bruin00}, one of the three curves of genus one to which Bruin's descent reduces $x^3+y^3=z^4$; Bruin notes that the other two, $C_{4,-1}$ and $C_{4,0}$, have rank one, and treats that equation through curves of higher genus. The proof above shows that $C_{4,1}$ has no affine rational point. \subsubsection*{The exponent 5: a 2-descent} Let $j\in\{1,3,5,7,9\}$, $f(x)=x^5-A$ with $A=2^8\cdot3^j$, $J_j$ the Jacobian of $\Gamma_j$ (which has one point $\infty$ at infinity), $L=\Q[T]/(f(T))$ and $\theta$ the class of $T$. We use the $2$-descent on Jacobians of curves $y^2=f(x)$ with $f$ of odd degree \cite{Schaefer95,Stoll01} (see also \cite[Chapter~6]{CasselsFlynn96}). For a field $F\supseteq\Q$, the map that sends the class of $P_1+\dots+P_r-r\infty$ (the $P_i$ affine with $y(P_i)\ne0$) to $\prod_i(x(P_i)-\theta)$ induces an injective homomorphism $J_j(F)/2J_j(F)\to(L\otimes F)^\times/(L\otimes F)^{\times2}$, with image in the kernel of the norm to $F^\times/F^{\times2}$. For a place $v$ of $\Q$ let $\mathcal I_v$ be the image for $F=\Q_v$. Then $\dim_{\F_2}\mathcal I_v=\dim J_j(\Q_v)[2]$ for $v$ odd, $\dim \mathcal I_2=\dim J_j(\Q_2)[2]+2$ and $\dim \mathcal I_\infty=\dim J_j(\R)[2]-2$, where $\dim J_j(\Q_v)[2]$ is the number of irreducible factors of $f$ over $\Q_v$ minus one. At an odd prime of good reduction $\mathcal I_v$ is the unramified subgroup. The Selmer group \[ \mathrm{Sel}^2(J_j/\Q)=\{\delta\in L^\times/L^{\times2}:\ \Nm(\delta)\in\Q^{\times2},\ \delta\in \mathcal I_v\text{ in }(L\otimes\Q_v)^\times/(L\otimes\Q_v)^{\times2}\text{ for all }v\} \] contains the image of $J_j(\Q)/2J_j(\Q)$. The torsion subgroup $J_j(\Q)_{\mathrm{tors}}$ injects into $J_j(\F_\ell)$ for every odd prime $\ell$ of good reduction, that is $\ell\nmid30$ \cite[Appendix]{Katz81}. \begin{proposition}\label{prop:3zp-gamma93} For $j=9$ and $j=3$, $\mathrm{Sel}^2(J_j/\Q)=0$ and $J_j(\Q)=0$. Hence $\Gamma_9(\Q)=\Gamma_3(\Q)=\{\infty\}$. \end{proposition} \begin{proof} \emph{$j=9$.} Here $L=\Q(\eta)$ with $\eta^5=12$ and $\theta=3\eta^4$; its discriminant is $2^4\cdot3^4\cdot5^5$, and $2$, $3$, $5$ are totally ramified in $L$. The polynomial $f$ is irreducible over $\Q_2$ and $\Q_3$ (its Newton polygons have one slope, $8/5$ and $9/5$) and over $\Q_5$ ($A\equiv23\pmod{25}$ is not a fifth power in $\Q_5$, since the fifth powers of $5$-adic units are $\equiv\pm1,\pm7\pmod{25}$), and it has one real root. Hence $\mathcal I_3=\mathcal I_5=\mathcal I_\infty=0$ and $\dim \mathcal I_2=2$: an element of the Selmer group is a square at the primes above $3$ and $5$ and positive at the real place of $L$, and it has even valuation at every prime of $L$ not above $2$. The class group of $L$ is trivial: the Minkowski bound is below $125.3$, and each of the $29$ prime ideals of norm at most $125$ is principal, with an explicit generator. The units $\varepsilon_1=\frac12\eta^4-\frac52\eta^3+3\eta^2-5\eta-1$ and $\varepsilon_2=-\frac12\eta^4+2\eta^3-4\eta^2+4\eta-1$ have norm $-1$, and no product of a nonempty subset of $\{-1,\varepsilon_1,\varepsilon_2\}$ is a square in $L$; since a subgroup $V\ni-1$ of finite index in $\OO_L^\times$ has odd index if and only if $V\cap\OO_L^{\times2}=V^2$, the elements $-1,\varepsilon_1,\varepsilon_2$ span $\OO_L^\times/\OO_L^{\times2}$. Finally $2\OO_L=\mathfrak p_2^5$ with $\mathfrak p_2=(\pi_2)$, $\pi_2=\frac12\eta^4+\frac12\eta^3+\eta^2+2\eta+2$. So the classes with even valuation away from $2$ form the $\F_2$-space with basis $-1,\varepsilon_1,\varepsilon_2,\pi_2$. Of its sixteen elements, exactly $1$, $-\varepsilon_1$, $-\varepsilon_2$, $\varepsilon_1\varepsilon_2$ have square norm, are positive at the real place and are squares at the primes above $3$ and $5$. The group $\mathcal I_2$ is spanned by the images of the points of $\Gamma_9(\Q_2)$ with $x=-199$ and $x=-196$, and it contains none of $-\varepsilon_1,-\varepsilon_2,\varepsilon_1\varepsilon_2$. So $\mathrm{Sel}^2(J_9/\Q)=0$ and $J_9(\Q)$ is finite of odd order. As $\#J_9(\F_7)=50$ and $\#J_9(\F_{41})=2131$ are coprime, $J_9(\Q)=0$. \emph{$j=3$.} Here $L=\Q(\xi)$ with $\xi^5=6$ and $\theta=2\xi^3$, again of discriminant $2^4\cdot3^4\cdot5^5$; $f$ is irreducible over $\Q_2$, $\Q_3$ (slopes $8/5$, $3/5$) and $\Q_5$ ($A\equiv12\pmod{25}$), with one real root. The same computation applies: the class group is trivial (each of the $34$ prime ideals of norm at most $125$ is principal, with an explicit generator), $-1$ and two units of norm $1$ span $\OO_L^\times/\OO_L^{\times2}$, $2\OO_L=(\pi_2)^5$ with $\pi_2=-2+\xi-\xi^2$, four of the sixteen classes pass the conditions at the norm, the real place, $3$ and $5$, and only the trivial one lies in $\mathcal I_2$, which is spanned by the images of the points of $\Gamma_3(\Q_2)$ with $x=-199$ and $x=-196$. So $\mathrm{Sel}^2(J_3/\Q)=0$; and $\#J_3(\F_7)=50$, $\#J_3(\F_{11})=41$ give $J_3(\Q)=0$. In both cases $P\mapsto[P-\infty]$ embeds $\Gamma_j(\Q)$ in $J_j(\Q)=0$. The computations in the fields $L$ and in the groups $J_j(\F_\ell)$ are items~S19 and~S20 of the Supplement. \end{proof} \begin{proof}[Proof of \cref{thm:3zp-45}~(b)] If $z=0$ then $(x,y,z)=\pm(1,-1,0)$. Let $z\ne0$ and $k\equiv1$ or $3\pmod5$. Then $(2k-3)\bmod10$ is $9$ or $3$, and \cref{lem:3zp-descent} with the maps above gives an affine rational point of $\Gamma_9$ or $\Gamma_3$, which \cref{prop:3zp-gamma93} excludes. \end{proof} The curves $\Gamma_7$, $\Gamma_5$ and $\Gamma_3$ are the curves $C_1$, $C_2$ and $C_3$ of \cite[\S4]{Bruin00}, which arise there from $x^3+y^3=z^5$. Bruin shows that $C_3$ has only its point at infinity, and the proof above for $\Gamma_3$ is independent of his. The curves $\Gamma_9$ and $\Gamma_1$ do not occur in \cite{Bruin00}. \subsubsection*{The exponent 5 with the coefficient 9} For $k\equiv2\pmod 5$ the curve is $\Gamma_1\colon y^2=x^5-768$, which has the rational points $(4,\pm16)$, coming from $2^3+1^3=9\cdot1^5$. Write $J=J_1$, $D=[(4,16)-\infty]\in J(\Q)$, and let $\iota$ be the hyperelliptic involution. \begin{proposition}\label{prop:3zp-gamma1} $\Gamma_1(\Q)=\{\infty,(4,16),(4,-16)\}$. \end{proposition} \begin{proof} \emph{Step 1: $J(\Q)$ is infinite cyclic.} Here $L=\Q(768^{1/5})=\Q(18^{1/5})$, of discriminant $2^4\cdot3^4\cdot5^3$ and signature $(1,2)$; its class group is trivial (Minkowski bound below $25.1$; every prime ideal of norm at most $25$ has an explicit generator). Over $\Q_2$ and $\Q_3$, $f=x^5-768$ is irreducible. Over $\Q_5$ it has a root ($768\equiv3^5\pmod{25}$) and an irreducible factor of degree $4$, and it has one real root. So $\mathcal I_3=\mathcal I_\infty=0$, $\dim \mathcal I_2=2$ and $\dim \mathcal I_5=1$, and the Selmer group lies in the group of classes with even valuation at every prime not above $2$, $3$ or $5$, of dimension $7$ over $\F_2$ (generated by $-1$, two units and generators of the primes above $2$, $3$ and of the two primes above $5$). The group $\mathcal I_2$ is spanned by the images of the points of $\Gamma_1(\Q_2)$ with $x=-300/7$ and $x=-299/5$, and $\mathcal I_5$ by the image of the point of $\Gamma_1(\Q_5)$ with $x=-299/2$. These local conditions leave a Selmer group of dimension $1$, whose nonzero element is the image of the point $D'$ of Step~2. As $f$ is irreducible over $\Q$, $J(\Q)[2]=0$, so $J(\Q)$ has rank at most $1$. The orders $\#J(\F_\ell)$, $7\le\ell\le71$, have greatest common divisor $1$, so $J(\Q)_{\mathrm{tors}}=0$; as $D\ne0$, $J(\Q)=\Z G$ for a generator $G$. \emph{Step 2: a half of $D$.} Let $Q_{1,2}=(\pm4i,16\pm32i)$ and $D'=[Q_1+Q_2-2\infty]\in J(\Q)$, the class of the Mumford pair $(x^2+16,\,8x+16)$; it is rational because $f-(8x+16)^2=(x^2+16)(x^3-16x-64)$. With $q=-2x^2+8x-16$ one has $f-q^2=(x-4)(x^2+16)^2$, and $q(\pm4i)=16\pm32i\ne0$, so the function $y-q(x)$ has divisor $2Q_1+2Q_2+(4,-16)-5\infty$. Hence $2D'=-[(4,-16)-\infty]=D$. Write $D'=mG$. The image of $D'$ under the descent map is the class of $\theta^2+16$, which is not a square in $L$: at the prime of degree one above $17$ at which $\theta\equiv12$, it reduces to $7$, a non-square modulo $17$. So $D'\notin2J(\Q)$ and $m$ is odd. Further $\#J(\F_7)=50$, and the reduction $\bar D'$ has order $25$, so the $5$-primary part of $J(\F_7)$ is cyclic, generated by $\bar D'$, and $\bar D'\notin5J(\F_7)$; hence $5\nmid m$. \emph{Step 3: sieving.} The image of $J(\Q)$ in $J(\F_7)$ is $\langle\bar G\rangle=\langle\bar D'\rangle$, of order $25$, as $\gcd(m,50)=1$. The points of $\Gamma_1(\F_7)$ are $\infty$, $(0,\pm3)$, $(3,0)$, $(4,\pm2)$, $(6,\pm1)$. The classes $[\bar R-\infty]$ for $\bar R=(3,0),(6,\pm1)$ are not in $\langle\bar D'\rangle$, so no rational point reduces to these. For the others $[\bar R-\infty]=t\bar D'$ with $t\equiv0$ ($\infty$), $2$ ($(4,2)$), $23$ ($(4,-2)$), $15$ ($(0,3)$), $10$ ($(0,-3)$) modulo $25$. For $R\in\Gamma_1(\Q)$ write $[R-\infty]=nG$ and $\tau=n/m\in\Z_5$. For every prime $\ell\nmid30$, the projection $\pi_\ell$ of $J(\F_\ell)$ onto its $5$-primary part satisfies $\pi_\ell([\bar R-\infty])=\tau\,\pi_\ell(\bar D')$, and at $\ell=7$, $\tau\equiv t\pmod{25}$. At $\ell=149$, $\#J(\F_{149})=22\,500=2^2\cdot3^2\cdot5^4$, $\pi_{149}(\bar D')$ has order $25$, and the values of $\tau$ modulo $25$ realized by the points of $\Gamma_1(\F_{149})$ are $0,2,5,9,16,20,23$. So $t\not\equiv10,15$, and every rational point reduces modulo $7$ to $\infty$ or $(4,\pm2)$. The computations of Steps~1--3 are item~S21 of the Supplement. \emph{Step 4: Chabauty's method at $7$.} Let $\omega_i=x^i\,dx/(2y)$ ($i=0,1$), a basis of the regular differentials, and $\log\colon J(\Q_7)\to\Q_7^2$ the logarithm with respect to it, a homomorphism with $\log([P-\infty])=\bigl(\int_\infty^P\omega_0,\int_\infty^P\omega_1\bigr)$ (Coleman integrals); on a residue disc the integrals are given by termwise integration of power series \cite{Coleman85,McCallumPoonen12}. Put $(L_0,L_1)=\log(D)$. We computed it, without general Coleman integration, as $\log(25D)/25$: the multiple $25D$, computed over $\Q$ by Cantor's algorithm, is $[P_1+P_2-2\infty]$ with $x(P_1),x(P_2)\in\Z_7$, both $\equiv6\pmod 7$, and $P_2$ in the residue disc of $\iota P_1$; as $\iota^*\omega_i=-\omega_i$ and $\iota(\infty)=\infty$, $\log(25D)=\int_{\iota P_2}^{P_1}(\omega_0,\omega_1)$ is an integral inside one residue disc, where $x^i/(2y)$ is a power series in $x-x(P_2)$ with coefficients in $\Z_7$. Working modulo $7^{40}$ with $80$ terms (the terms left out have valuation at least $79$), this gives \[ L_0=2\cdot7+7^2+6\cdot7^3+O(7^4),\qquad L_1=5\cdot7+5\cdot7^2+5\cdot7^3+O(7^4) \] (the Supplement, item~S22; \cref{app:computations} lists the checks). Since $J(\Q)=\Z G$ and $D=2mG\ne0$, the differential $\eta=L_1\omega_0-L_0\omega_1$ satisfies $\int_\infty^R\eta=0$ for every $R\in\Gamma_1(\Q)$. Divided by $7$, $\eta/7=\alpha\omega_0+\beta\omega_1$ with $\alpha,\beta\in\Z_7$ and $\alpha\equiv\beta\equiv5\pmod 7$. On the disc of $\infty$ take the parameter $t=x^2/y$; then $1/x=t^2(1+t^{10}g(t))$ with $g\in\Z[[t]]$, and $\omega_0=-t^2(1+O(t^{10}))\,dt$, $\omega_1=-(1+O(t^{10}))\,dt$ with coefficients in $\Z[\frac12]$. So $F(t)=\int_\infty^{P(t)}\eta/7=\sum_{i\ge1}\lambda_it^i$ with $\lambda_1=-\beta\not\equiv0\pmod7$ and $i\lambda_i\in\Z_7$. On the discs of $(4,\pm16)$ take $s=x-4$: then $y=\pm16\bigl(1+(f(4+s)-256)/256\bigr)^{1/2}$ has coefficients in $\Z_7$, and $F(s)=\int_{(4,\pm16)}^{P(s)}\eta/7=\sum_{i\ge1}\lambda_is^i$ with $\lambda_1=(\alpha+4\beta)/(\pm32)\not\equiv0\pmod 7$ and $i\lambda_i\in\Z_7$ (note that $\int_\infty^{(4,\pm16)}\eta=0$). On each disc write the parameter as $7r$ with $r\in\Z_7$: the coefficient of $r$ is $7\lambda_1$, of valuation $1$, and that of $r^i$ has valuation at least $i-v_7(i)\ge2$ for $i\ge2$. By Strassmann's theorem $F$ has at most one zero on each disc, and the known point is one. With Step~3, $\Gamma_1(\Q)=\{\infty,(4,\pm16)\}$. \end{proof} \begin{proof}[Proof of \cref{thm:3zp-45}~(c)] Let $(x,y,z)$ be a solution of $x^3+y^3=3^kz^5$ with $k\equiv2\pmod5$. If $k=2$, \cref{lem:3zp-descent} gives the point $(X,Y)=(b/c^2,(x-y)/c^5)$ of $Y^2=4X^5-3$, and $(4X,16Y)\in\Gamma_1(\Q)$ is affine, so $X=1$ by \cref{prop:3zp-gamma1}. Then $b=c^2$, and $\gcd(b,c)=1$ gives $c=\pm1$, $b=1$: $x+y=\pm3$ and $x^2-xy+y^2=3$, so $(x-y)^2=1$, and $(x,y,z)$ is one of the four solutions listed ($z=c$). If $k=5m+2$ with $m\ge1$, the point $(X/3^{2m},Y/3^{5m})$ of $Y^2=4X^5-3$ gives in the same way $X=3^{2m}$, that is $b=3^{2m}c^2$, against $3\nmid b$. \end{proof} \subsubsection*{The exponent 5 with \texorpdfstring{$k\equiv0$ or $4\pmod 5$}{k = 0 or 4 mod 5}} For $k\equiv4\pmod 5$ the curve is $\Gamma_5\colon y^2=x^5-62\,208$, and for $k\equiv0\pmod 5$, $k\ge5$, it is $\Gamma_7\colon y^2=x^5-559\,872$. The curve $\Gamma_5$ has the rational points $(12,\pm432)$, since $12^5-62\,208=186\,624=432^2$.\footnote{In the version of \cite{Bruin00} posted by its author, the $X$-coordinate $12$ found in Lemma~10 is set aside in the sentence that follows, and Lemma~8 states $C_2(\Q)=\{\infty\}$; Theorem~2 there is not affected, since these two points give only solutions with $xy=0$, as in the proof of \cref{cor:3zp-k5} below.} We use the notation of the $2$-descent above, with $j=5$ and $j=7$; in both cases $f$ is irreducible over $\Q$, so $J_j(\Q)[2]=0$. \begin{proposition}\label{prop:3zp-gamma5} $\Gamma_5(\Q)=\{\infty,(12,432),(12,-432)\}$. \end{proposition} \begin{proof} Write $J=J_5$ and $D=[(12,432)-\infty]\in J(\Q)$. \emph{Step 1: $J(\Q)$ is infinite cyclic.} Here $L=\Q(2^{1/5})$, with $\theta=6\cdot2^{3/5}$, of discriminant $2^4\cdot5^5$ and signature $(1,2)$; its class group is trivial (Minkowski bound below $14$; each of the five prime ideals of norm at most $13$ has an explicit generator), and $-1$ and two units of norm $1$ span $\OO_L^\times/\OO_L^{\times2}$. The polynomial $f=x^5-62\,208$ is irreducible over $\Q_2$ (its Newton polygon has the one slope $8/5$) and over $\Q_5$ ($62\,208\equiv8\pmod{25}$ is not a fifth power in $\Q_5$); over $\Q_3$ it is the product of a linear factor and an irreducible quartic factor, as $62\,208=2^8\cdot3^5$ is a fifth power in $\Q_3$; and it has one real root. So $\mathcal I_5=\mathcal I_\infty=0$, $\dim \mathcal I_3=1$ and $\dim \mathcal I_2=2$; $\mathcal I_3$ is spanned by the image of the point of $\Gamma_5(\Q_3)$ with $x=-300/11$, and $\mathcal I_2$ by the images of the points of $\Gamma_5(\Q_2)$ with $x=-300/7$ and $x=-299/5$. The local conditions leave a Selmer group of dimension $1$, so $J(\Q)$ has rank at most $1$. As $\#J(\F_7)=50$ and $\#J(\F_{11})=101$ are coprime, $J(\Q)_{\mathrm{tors}}=0$; as $D\ne0$, $J(\Q)=\Z G$ for a generator $G$. Write $D=mG$. The reduction $\bar D$ has order $50=\#J(\F_7)$, so it generates $J(\F_7)$, and therefore $\gcd(m,50)=1$. \emph{Step 2: sieving.} For $R\in\Gamma_5(\Q)$ write $[R-\infty]=nG$ and $\tau=n/m$, an element of $\Z_2$ and of $\Z_5$. For every prime $\ell\nmid30$, the projection $\pi_\ell$ of $J(\F_\ell)$ onto its $\{2,5\}$-primary part satisfies $\pi_\ell([\bar R-\infty])=\tau\,\pi_\ell(\bar D)$, because $m[R-\infty]=nD$ and $m$ is invertible on that part. So $\tau$ modulo the order of $\pi_\ell(\bar D)$ is among the residues realized by the points of $\Gamma_5(\F_\ell)$. Combining these conditions for the primes $7\le\ell\le199$ modulo $2000=2^4\cdot5^3$, a common multiple of the orders of $\pi_\ell(\bar D)$ for these primes, leaves only $\tau\equiv0,\pm1\pmod{50}$ (the primes $7$, $19$, $59$, $79$ and $199$ suffice; with $\ell\le149$ only, $\tau\equiv\pm10$ would also remain). At these five primes the order of $\pi_\ell(\bar D)$ and the residues of $\tau$ modulo it that the points of $\Gamma_5(\F_\ell)$ realize are: \begin{center}\small \begin{tabular}{@{}rrl@{}} \toprule $\ell$ & order of $\pi_\ell(\bar D)$ & residues of $\tau$ realized by $\Gamma_5(\F_\ell)$\\ \midrule $7$ & $50$ & $0, 1, 10, 22, 25, 28, 40, 49$\\ $19$ & $20$ & $0, 1, 10, 19$\\ $59$ & $4$ & $0, 1, 3$\\ $79$ & $80$ & $0, 1, 79$\\ $199$ & $100$ & $0, 1, 99$\\ \bottomrule \end{tabular} \end{center} At $\ell=7$, where $\bar D$ generates $J(\F_7)$, this gives $[\bar R-\infty]\in\{0,\pm\bar D\}$, so $\bar R$ is $\infty$ or $(5,\pm5)$, the reductions of $(12,\pm432)$. The computations of Steps~1 and~2 are item~S23 of the Supplement. \emph{Step 3: Chabauty's method at $7$.} With $\omega_0,\omega_1$ and $\log$ as in Step~4 of the proof of \cref{prop:3zp-gamma1}, put $(L_0,L_1)=\log(D)$. We computed it as $\log(50D)/50$. The multiple $50D$, computed over $\Q$ by Cantor's algorithm, is $[P_1+P_2-2\infty]$ with $x(P_1),x(P_2)$ the roots of a polynomial $u$ with $7$-integral coefficients and $u\equiv(x-4)^2\pmod 7$. As $f(4)\equiv3$ is not a square modulo $7$, $P_1$ and $P_2$ are conjugate over the unramified quadratic extension of $\Q_7$, and $P_1$ and $\iota P_2$ lie in one residue disc; so $\log(50D)=\int_{\iota P_2}^{P_1}(\omega_0,\omega_1)$ is an integral inside one residue disc, computed as in Step~4 of the proof of \cref{prop:3zp-gamma1} (modulo $7^{40}$, with $120$ terms). This gives \[ L_0=3\cdot7+5\cdot7^2+2\cdot7^3+O(7^4),\qquad L_1=5\cdot7+6\cdot7^2+3\cdot7^3+O(7^4) \] (the Supplement, item~S24). So $\eta=L_1\omega_0-L_0\omega_1$ satisfies $\int_\infty^R\eta=0$ for every $R\in\Gamma_5(\Q)$, and $\eta/7=\alpha\omega_0+\beta\omega_1$ with $\alpha,\beta\in\Z_7$, $\alpha\equiv5$ and $\beta\equiv4\pmod 7$. On the disc of $\infty$, with the parameter $t=x^2/y$ as in the proof of \cref{prop:3zp-gamma1}, the linear coefficient of $\int_\infty\eta/7$ is $-\beta\not\equiv0\pmod 7$. On the discs of $(12,\pm432)$ take $s=x-12$: then $y=\pm432\bigl(1+(f(12+s)-432^2)/432^2\bigr)^{1/2}$ has coefficients in $\Z_7$, and the linear coefficient of $\int_{(12,\pm432)}\eta/7$ is $(\alpha+12\beta)/(\pm864)\equiv\pm6\not\equiv0\pmod 7$. The Strassmann argument of Step~4 of the proof of \cref{prop:3zp-gamma1} shows that each of these three discs contains at most one rational point, and with Step~2, $\Gamma_5(\Q)=\{\infty,(12,\pm432)\}$. \end{proof} \begin{proposition}\label{prop:3zp-gamma7} $\Gamma_7(\Q)=\{\infty\}$. \end{proposition} \begin{proof} Write $J=J_7$. The Mumford pair $(x^2+432,\,72x+1296)$ defines a point $G_1\in J(\Q)$ \cite[\S4]{Bruin00}, since $f-(72x+1296)^2=(x^2+432)(x^3-432x-5184)$. \emph{Step 1.} Here $L=\Q(72^{1/5})$, with $\theta=6\cdot72^{1/5}$, of discriminant $2^4\cdot3^4\cdot5^5$ and signature $(1,2)$; its class group is trivial (each of the $34$ prime ideals of norm at most $125$ has an explicit generator), and $-1$ and two units span $\OO_L^\times/\OO_L^{\times2}$. The polynomial $f=x^5-559\,872$ is irreducible over $\Q_2$, $\Q_3$ (slopes $8/5$, $7/5$) and $\Q_5$ ($559\,872\equiv22\pmod{25}$), with one real root, so $\mathcal I_3=\mathcal I_5=\mathcal I_\infty=0$ and $\dim \mathcal I_2=2$, spanned by the images of the points of $\Gamma_7(\Q_2)$ with $x=-199$ and $x=-196$. Of the four classes with even valuation away from $2$ that have square norm, are positive at the real place and are squares at the primes above $3$ and $5$, two lie in $\mathcal I_2$: the Selmer group has dimension $1$. As $\#J(\F_7)=50$ and $\#J(\F_{11})=131$ are coprime, $J(\Q)_{\mathrm{tors}}=0$; as $G_1\ne0$, $J(\Q)=\Z G$ and $G_1=mG$. The reduction $\bar G_1$ has order $50=\#J(\F_7)$, so $\gcd(m,50)=1$. \emph{Step 2.} The sieve of Step~2 of the proof of \cref{prop:3zp-gamma5}, with $G_1$ in place of $D$ and the primes $7\le\ell\le149$ (of which $7$, $19$, $43$ and $149$ suffice), leaves only $\tau\equiv0\pmod{50}$. At these four primes the order of $\pi_\ell(\bar G_1)$ and the residues of $\tau$ that the points of $\Gamma_7(\F_\ell)$ realize are: \begin{center}\small \begin{tabular}{@{}rrl@{}} \toprule $\ell$ & order of $\pi_\ell(\bar G_1)$ & residues of $\tau$ realized by $\Gamma_7(\F_\ell)$\\ \midrule $7$ & $50$ & $0, 17, 20, 24, 25, 26, 30, 33$\\ $19$ & $20$ & $0, 4, 16$\\ $43$ & $10$ & $0, 1, 2, 3, 5, 7, 8, 9$\\ $149$ & $50$ & $0, 17, 33$\\ \bottomrule \end{tabular} \end{center} As $\bar G_1$ generates $J(\F_7)$, every $R\in\Gamma_7(\Q)$ reduces modulo $7$ to $\infty$. The computations of Steps~1 and~2 are also in item~S23 of the Supplement. \emph{Step 3.} Put $(L_0,L_1)=\log(G_1)=\log(50G_1)/50$. Here $50G_1=[P_1+P_2-2\infty]$ with $u\equiv(x-3)^2\pmod 7$, and $f(3)\equiv0\pmod 7$, so $P_1$ and $P_2$ lie in the residue disc of the point $(e,0)$ with $e\in\Z_7$, $e\equiv3\pmod 7$, a Weierstrass point. On that disc $y$ is a parameter and $x$ a power series in $y^2$, and $\int_\infty^{(e,0)}\omega_i=0$ because $[(e,0)-\infty]$ has order $2$; so $\log(50G_1)=\int_{(e,0)}^{P_1}(\omega_0,\omega_1)+\int_{(e,0)}^{P_2}(\omega_0,\omega_1)$ is computed by termwise integration in $y$. This gives \[ L_0=4\cdot7+3\cdot7^2+O(7^4),\qquad L_1=5\cdot7+5\cdot7^2+5\cdot7^3+O(7^4) \] (the Supplement, item~S24). Then $\eta/7=\alpha\omega_0+\beta\omega_1$ with $\beta=-L_0/7\equiv3\not\equiv0\pmod 7$, so, as in Step~3 of the proof of \cref{prop:3zp-gamma5}, the disc of $\infty$ contains no rational point other than $\infty$. \end{proof} \begin{corollary}\label{cor:3zp-k5} Let $k\ge0$ be an integer with $k\not\equiv2\pmod 5$, and let $x,y,z$ be integers with $\gcd(x,y)=1$, $z\ne0$ and $x^3+y^3=3^kz^5$. Then $k=0$ and $xy=0$. \end{corollary} \begin{proof} For $k\equiv1,3\pmod 5$ this is \cref{thm:3zp-45}~(b). Let $k=5m+4$ with $m\ge0$. Then $2k-3=10m+5$, and \cref{lem:3zp-descent} with the maps above gives the affine point $\bigl(4b/(3^{2m}c^2),\,16(x-y)/(3^{5m}c^5)\bigr)$ of $\Gamma_5$. By \cref{prop:3zp-gamma5}, $4b/(3^{2m}c^2)=12$, that is $b=3^{2m+1}c^2$, against $3\nmid b$. Let $k=5m$ with $m\ge1$. Then $2k-3=10(m-1)+7$, and \cref{lem:3zp-descent} gives an affine rational point of $\Gamma_7$, which \cref{prop:3zp-gamma7} excludes. Let $k=0$. As $x^3+y^3\equiv x+y\pmod 3$, $3\mid z$ if and only if $3\mid x+y$. If $3\mid z$, then $(x,y,z/3)$ is a solution for $k=5$, which we have excluded. If $3\nmid z$, then $x+y$ and $x^2-xy+y^2$ are coprime (a common prime factor divides $3xy$, hence is $3$, but $3\nmid x+y$), so $x+y=c^5$ and $x^2-xy+y^2=b^5$ with $c\ne0$, $b\ge1$ and $\gcd(b,c)=1$. From $4b^5=c^{10}+3(x-y)^2$ we get the affine point $\bigl(12b/c^2,\,432(x-y)/c^5\bigr)$ of $\Gamma_5$, so $b=c^2$ by \cref{prop:3zp-gamma5}, and $\gcd(b,c)=1$ gives $c=\pm1$, $b=1$. Then $x+y=\pm1$ and $(x+y)^2-3xy=x^2-xy+y^2=1$, so $xy=0$. \end{proof} With \cref{thm:3zp-45}~(c), \cref{cor:3zp-k5} determines all the solutions of $x^3+y^3=3^kz^5$ with $\gcd(x,y)=1$ for every $k\ge0$: those with $z=0$, those with $xy=0$ (for $k=0$ only), and the four solutions of \cref{thm:3zp-45}~(c) (for $k=2$ only). For $k=0$ the corollary is Bruin's theorem \cite[Theorem~2]{Bruin00}. \subsection{The Frey representation for \texorpdfstring{$3^kc^p$}{3^k c^p}, and \texorpdfstring{$p$}{p} split or inert}\label{sec:3zp-frey} If $p\equiv2\pmod 3$ we write $v=p\OO$ for the prime of $K$ above $p$; then $K_v=\Q_{p^2}$ is the unramified quadratic extension of $\Q_p$, and it has two embeddings in $\overline\Q_p$, which restrict to the two embeddings of $K$. We need \cref{prop:crys} at this prime. \begin{lemma}\label{lem:3zp-crys} \Cref{prop:crys} holds for every prime $p\ge5$ and every prime $v$ of $K$ above $p$, split or inert, with ``Hodge--Tate weights $\{0,1,2\}$'' at each of the embeddings of $K_v$ in $\overline\Q_p$. \end{lemma} \begin{proof} The proof of \cref{prop:crys}, with \cref{lem:dst-descent,lem:ss-model,lem:hk-model}, is written for every prime $p\ge5$ and every prime $v$ of $K$ above $p$: the only properties of $p$ it uses are that $p\ne3$ (\cref{prop:compactification} is over $\OO[1/3]$, and the Fermat surface of degree $9$ is smooth in residue characteristic $p$) and that $K_v$ and $K_v(\zeta_9)$ are unramified over $\Q_p$. All of this holds for $v$ inert. For the weights, let $\tau$ be an embedding of $F=K_v(\zeta_9)$ in $\overline\Q_p$. By the comparison theorem, compatible with the action of $H$, the $\tau$-part of $D_{\mathrm{dR}}$ of the $\chi^m$-part of $H^2$ is the $\chi'$-part of $H^2_{\mathrm{dR}}(\tilde X_{s_0}/F)\otimes_{F,\tau}\overline\Q_p$, where $\chi'=\tau^{-1}\circ\chi^m$ is one of the characters $\chi^{m'}$, $m'\in(\Z/9)^\times$ (it is fixed by $G_K$ and has order $9$ on each factor, \cref{lem:characters}). By \cref{lem:hodge}, which holds for every $m'\in(\Z/9)^\times$ and every complex embedding, each of these parts has Hodge numbers $(1,1,1)$. So the Hodge--Tate weights are $\{0,1,2\}$ at every embedding of $K_v$. \end{proof} Let $p\ge17$ be a prime, $k\ge1$, and $(a,b,c)$ a solution of $x^3+y^3=3^kz^p$ with \[ \nu=k+p\,v_3(c)\ge8,\quad\text{that is, } 3\mid c\ \text{ or }\ k\ge8. \] (For $k=1$ this holds, since $3\mid c$ by \cref{lem:3zp-elementary}~(ii).) As $\gcd(a,b)=1$, $p$ divides at most one of $a,b$. Choose $(u,w)\in\{(a,b),(b,a)\}$ with $p\nmid u$, and put \[ s_0=\frac{3^kc^p}{u^3}=1+\Big(\frac wu\Big)^3\in\Q\smallsetminus\{0,1\},\qquad \rho=\VV_{s_0}\otimes\kappa_u^{-\ninf}\colon G_K\to\GL_3(\overline\Q_p), \] with $\ell=p$ in \cref{def:V}, and let $\rhob$ be the reduction of $\rho$ (\cref{sec:conventions}). This is \cref{def:frey} with $c^p$ replaced by $3^kc^p$. \begin{proposition}\label{prop:3zp-frey} The representation $\rho$ has the following properties. \begin{enumerate}[(a)] \item $\rho$ is unramified at every prime $\q\nmid 3pabc$, and the characteristic polynomial of $\rho(\Frob_\q)$ has coefficients in $\OO$. \item $\rhob$ is unramified at every prime $\q\nmid3p$. \item $\rho^\cc\isom\rho^\vee\otimes\varepsilon_p^{-2}$. \item $I_\p$ acts on $\rho$ through $\kappa_u^{-\ninf}|_{I_\p}$ times a unipotent representation. \item $\rho$ is unramified at $\lp$ and $\lpb$, and the characteristic polynomial of $\rho(\Frob_\q)$, $\q\in\{\lp,\lpb\}$, is $P_\q(\xi_\q^{-1}T)$ with $\xi_\q=\kappa_u(\Frob_\q)^{-\ninf}\in\mu_3$ and $P_\q$ as in \cref{prop:frob7}. \item For each prime $v\mid p$ of $K$, $\rho|_{G_{K_v}}$ is crystalline, with Hodge--Tate weights $\{0,1,2\}$ at each embedding of $K_v$ in $\overline\Q_p$. \end{enumerate} \end{proposition} \begin{proof} We follow the proof of \cref{prop:local}. By \cref{thm:3zp-elliptic}~(iv), (v), which hold for every solution, $p\nmid c$, $7\nmid abc$ and $a^3\equiv b^3\pmod 7$; and $3\nmid u$ (\cref{lem:3zp-elementary}~(i)), so $v_3(s_0)=\nu$. (a) If $\q\nmid3pabc$, then $s_0$ and $s_0-1$ are $\q$-units and \cref{lem:tame}~(a) applies; $\kappa_u$ is unramified outside $3u$; the coefficients lie in $\OO$ by \cref{lem:traces-in-K}. (b) Let $\q\nmid3p$ lie above the rational prime $r$. By \cref{lem:3zp-elementary}~(i), $r$ divides at most one of $u,w,c$. If $r\nmid uwc$ use (a). If $r\mid c$, then $v_\q(s_0)=p\,v_r(c)$, and by \cref{lem:tame}~(b) $I_\q$ acts on a stable lattice through powers of $\gamma_0^{p\,v_r(c)}$, which is $\equiv1\pmod p$ as in the proof of \cref{prop:local}~(b); $\kappa_u$ is unramified at $\q$. If $r\mid u$, then $s_0=z_0/u^3$ with $z_0=3^kc^p$ prime to $\q$, and by \cref{lem:tame}~(d) $I_\q$ acts on $\VV_{s_0}$ by $\kappa_u^{\ninf}$, which the twist cancels. If $r\mid w$, then $v_\q(s_0-1)=3v_r(w)$ and \cref{lem:tame}~(c) applies; $\kappa_u$ is unramified at $\q$. (c) \Cref{lem:duality} ($s_0\in\Q$) and $\kappa_u^\cc=\kappa_u^{-1}$. (d) $v_3(s_0)=\nu\ge8>15/2$, so $I_\p$ acts unipotently on $\VV_{s_0}$ by \cref{thm:inertia3}. (e) $7\nmid u$ and $(w/u)^3\equiv1\pmod 7$, so $s_0\equiv2\pmod 7$, and we conclude as in the proof of \cref{prop:local}~(e). (f) $p\nmid u$ and $p\nmid c$, so $v_p(s_0)=0$. If $p\nmid w$ then $s_0-1=(w/u)^3$ is a $p$-adic unit, and if $p\mid w$ then $s_0-1=t_1^3$ with $t_1=w/u\in p\Z_{(p)}$. So \cref{lem:3zp-crys} applies, and $\kappa_u$ is unramified at $v$ and of finite order. \end{proof} So $\rho$ has the properties (F1)--(F5) of \cref{sec:F}, where, for $p$ inert, $\{\p,v,\bar v\}$ in (F1) is to be read as $\{\p,v\}$ and (F2) as: $\rho|_{G_{K_v}}$ is crystalline with Hodge--Tate weights $\{0,1,2\}$ at both embeddings of $K_v$. In (F3) the character is $\kappa=\kappa_u^{-\ninf}$, and \cref{lem:cubic-local} applies to it, as $u$ is an integer prime to $3$. Moreover $\rho$ is unramified at all but finitely many primes, by (a). \begin{proposition}\label{prop:3zp-irreducible} Let $p\ge17$ be a prime, split or inert in $K$, and let $\rho\colon G_K\to\GL_3(\overline\Q_p)$ be a continuous representation with the properties \textup{(F1)}, \textup{(F2)}, \textup{(F3)} and \textup{(F5)} (read as above if $p$ is inert). Then $\rhob$ is absolutely irreducible. In particular the representation $\rho$ of \cref{prop:3zp-frey} has the properties \textup{(F1)}--\textup{(F6)}. \end{proposition} \begin{proof} For $p$ split this is the proof of \cref{thm:irreducible}, which uses only these properties of $\rho$. Let $p$ be inert, $v=p\OO$, and suppose that $\rhob$ has a one-dimensional constituent $\theta$. Let $\tau_0$ be the embedding of $K_v$ in $\overline\Q_p$ that extends the embedding of $K$ given by $\iota_p$, and $\tau_0\cc$ the other one. \emph{Steps 1 and 2.} By (F2) and Fontaine--Laffaille theory in the normalization of \cite[\S1.4]{BLGGT14} (the weights lie in $[0,p-2]$), the argument of \cref{lem:constituents}~(i), (ii), with $\Q_{p^2}$ and $p$ in place of $\Qtf$ and $5$, shows: $\theta|_{G_{K_v}}$ is the reduction of a crystalline character of $G_{K_v}$ with Hodge--Tate weights $(h,h')\in\{0,1,2\}^2$ at $(\tau_0,\tau_0\cc)$; on the image of $\OO_v^\times=\Z_{p^2}^\times$ in the inertia group it is $x\mapsto\bar x^{\pm(h+ph')}$; by (F1) and (F3), $\theta$ is unramified outside $\{\p,v\}$ and $\theta|_{I_\p}=\bar\kappa|_{I_\p}$ has order dividing $3$. The idele class character of $\theta$ is trivial on $\mu_6\subset K^\times$ and on the units at the places where $\theta$ is unramified. The unit $-1$ acts at $v$ by $(-1)^{h+ph'}=(-1)^{h+h'}$, and at $\p$ by an element of order dividing $2$ and $3$, that is, trivially. So $(-1)^{h+h'}=1$ and $(h,h')\in\mathcal T$. \emph{Step 3.} Among the five Hecke characters $\psi$ of Step~3 of the proof of \cref{thm:irreducible}, the one of infinity type $(h,h')$ or $(h',h)$, chosen so that its $p$-adic realization has the same Hodge--Tate weights at $(\tau_0,\tau_0\cc)$ as $\theta|_{G_{K_v}}$, has a reduction $\bar\psi$ with $\theta\bar\psi^{-1}$ unramified at $v$ (two crystalline characters with the same weights agree on inertia). So $\theta\bar\psi^{-1}$ is a character of $\Cl_{\p^2}(K)$, which is trivial, and $\theta=\bar\psi$. \emph{Steps 4 and 5.} As in the proof of \cref{thm:irreducible}, (F5) gives $(k,k')\in\mathcal T$ and $\zeta_1,\zeta_2\in\mu_3$ with \eqref{eq:test7}, where now $\mathfrak P=p\OO$. By \cref{app:computations}, item~C2, all the prime factors of the ideal generated by the two elements of \eqref{eq:test7} lie above $2$, $3$, $7$ or $13$, so none is $p\OO$. \end{proof} \subsection{Part~II at an inert prime}\label{sec:3zp-inert} Parts~II and~III assume $p\equiv1\pmod 3$, but they use only the properties (F1)--(F6) of the Frey representation (\cref{sec:F}) and, in the proof of \cref{lem:members-polarized}, the fact that $\rho$ is unramified at all but finitely many primes. For $p\equiv2\pmod3$ two steps have to be redone: the construction of the compatible system (\cref{thm:CEG,lem:realizable}), and the proof of \cref{prop:notscalar}, which constructs a second system (\cref{sec:3zp-three}). We give a construction through a lifting lemma, \cref{lem:3zp-lift}, whose proof is that of the lifting theorem of Bellovin and Gee \cite[Theorem~5.2.1]{BellovinGee19}, written out for the group $\Gthree$ over $\Q$. We do not cite that theorem itself: its statement asks that the components at the places above $p$ be potentially diagonalizable, a notion defined in \cite[\S1.4]{BLGGT14} only for $\GL_n$-valued representations, and at an inert prime the place $p$ of $\Q$ does not split in $K$. The proof below uses potential diagonalizability only over a field in which the places above $p$ split. In this subsection and the next, $p\ge17$ is a prime with $p\equiv2\pmod 3$, $v=p\OO$, $\mu=\varepsilon_p^{-2}\dK$, and $\rho\colon G_K\to\GL_3(\overline\Z_p)$ is a continuous representation, unramified at all but finitely many primes, with the properties \textup{(F1)}--\textup{(F6)} read as in \cref{sec:3zp-frey}. \emph{Polarization.} \Cref{lem:polarized} and its proof are unchanged (they use (F4) and (F6)); let $\rho_{\mathcal G}\colon G_\Q\to\Gthree(\overline\Z_p)$ and $\rhob_{\mathcal G}$ be the prolongations defined by $\Psi_\rho$ and its reduction, with multiplier $\varepsilon_p^{-2}\dK$. \emph{$\rhob$ is reasonable.} It is polarized, $p>8$ and $\zeta_p\notin K$. The extension $K(\zeta_p)/K$ is cyclic of degree $p-1$, which is prime to $3$. If $\rhob|_{G_{K(\zeta_p)}}$ were reducible, then by Clifford's theorem it would be either isotypic with a constituent of dimension $1$, so that $\rhob(G_{K(\zeta_p)})$ would consist of scalars and $\rhob(G_K)$, generated by it and one more element, would be abelian, contradicting (F6); or a sum of three distinct characters permuted transitively by $G_K$, with a stabilizer of index $3$ in $G_K$ containing $G_{K(\zeta_p)}$, which does not exist. (This argument replaces the Fontaine--Laffaille analysis in the proof of \cref{prop:reasonable}.) \emph{The component at $p$.} The restriction $\rho_{\mathcal G}|_{G_{\Q_p}}$ is crystalline, in the sense of \cite[\S2.8]{BellovinGee19} (all its compositions with representations of $\Gthree$ are crystalline), because its restriction to the subgroup $G_{K_v}$ of index $2$ is crystalline by (F2) and $K_v/\Q_p$ is unramified. Its Hodge type is regular (weights $\{0,1,2\}$ at both embeddings of $K_v$). In the generic fiber of the ring of framed liftings of $\rhob_{\mathcal G}|_{G_{\Q_p}}$ to $\Gthree$ with multiplier $\varepsilon_p^{-2}\dK$, trivial inertial type and this Hodge type, the locus where the monodromy operator vanishes is a union of irreducible components, and it is regular \cite[Theorems~3.3.2 and~3.3.7]{BellovinGee19} (these are stated for possibly disconnected reductive groups and any finite extension of $\Q_p$). Let $\Cp$ be its component through $\rho_{\mathcal G}|_{G_{\Q_p}}$. Every point of $\Cp$ is crystalline, with Hodge--Tate weights $\{0,1,2\}$ at both embeddings of $K_v$, and its restriction to $G_{K_v}$ is potentially diagonalizable by \cite[Lemma~1.4.3~(2)]{BLGGT14} ($K_v/\Q_p$ is unramified and the weights lie in $[0,p-2]$). \subsection{A lifting lemma, and the compatible system}\label{sec:3zp-lift} \begin{lemma}\label{lem:3zp-lift} Let $\Cthree$ be a polarized component at $3$ \textup{(}\cref{sec:systems}\textup{)}, and let $\Cp$ be the component at $p$ defined above. There is a continuous homomorphism $\tilde\rho\colon G_\Q\to\Gthree(\overline\Z_p)$ lifting $\rhob_{\mathcal G}$, unramified outside $\{3,p\}$, with $\mult\circ\tilde\rho=\mu$, whose restrictions to $G_{\Q_3}$ and to $G_{\Q_p}$ are points of $\Cthree$ and of $\Cp$. \end{lemma} We do not deduce the lemma from \cite[Theorem~4.2.11]{CEG22}; \cref{rem:3zp-CEG} says why. Step~1 of the proof checks the hypotheses of \cite[Corollary~5.1.1]{BellovinGee19} over $K$, Step~2 those of \cite[Corollary~4.5.3]{BLGGT14} over a field $F_1$ in which the places above $3$ and $p$ split, and Step~5 those of \cite[Theorem~A.4.1]{BLGG13} and \cite[Theorem~2.3.2]{BLGGT14} over an extension $F'$ of $F_1$. \begin{proof} All framed lifting rings below are taken over the ring of integers $\OO_E$ of a sufficiently large finite extension $E$ of $\Q_p$. Their generic fibers are their spectra with $p$ inverted, in which closed points are dense and have residue fields finite over $E$ \cite[\S1.2]{BLGGT14}. Lifting rings commute with finite extensions of scalars \cite[Lemma~1.2.1]{BLGGT14} (stated there for $\GL_n$; the same proof applies to the $\Gthree$-valued rings with fixed multiplier). So, enlarging $E$ (the fields $F_1$ and $F'$ of Step~2 do not depend on it) and replacing $\Cthree$ by an irreducible component of its extension of scalars and $\Cp$ by the one through $\rho_{\mathcal G}|_{G_{\Q_p}}$, which only strengthens the conclusion, we may assume that every irreducible component of the finitely many generic fibers considered below stays irreducible after any finite extension of scalars; these are then the components over $\overline\Q_p$ used in \cite{BLGGT14} and \cite{BLGG13}. For an irreducible component $C$ of a generic fiber we write $R_C$ for the quotient of the lifting ring that is reduced, without $p$-torsion, and whose generic fiber is $C$ \cite[\S\S1.3, 1.4]{BLGGT14}, \cite[\S4.2]{BellovinGee19}. \emph{Step 1: a deformation ring of dimension at least one.} Let $\mathcal A$ be the universal ring for deformations of $\rhob_{\mathcal G}$ with multiplier $\mu$ that are unramified outside $\{3,p\}$ and whose restrictions to $G_{\Q_3}$ and $G_{\Q_p}$ lie on $\Cthree$ and $\Cp$, that is, the corresponding maps from the framed lifting rings factor through $R_{\Cthree}$ and $R_{\Cp}$. This condition is invariant under conjugation by \cite[Lemma~3.4.1]{BellovinGee19}, which is stated for conjugation by residually trivial elements of $\Gthree(\OO_{E'})$ for finite extensions $E'$ of $E$. The case of elements with values in an arbitrary coefficient ring follows from it by the density argument in the proof of \cite[Lemma~1.2.2]{BLGGT14}, applied to the reduced, $p$-torsion-free ring $R_C[[X_1,\dots,X_{10}]]$ that carries the universal residually trivial element of $\Gthree$, which is how \cite[\S4.2]{BellovinGee19} use it. By \cite[Corollary~5.1.1]{BellovinGee19}, $\mathcal A$ has Krull dimension at least~$1$. We check its hypotheses, for $F^+=\Q$, $F=K$, $n=3$, $l=p$ and the set of places $\{3,p,\infty\}$, which is not required to consist of places that split in $K$. The prime $p$ is odd, $\zeta_p\notin K$, and $\rhob|_{G_{K(\zeta_p)}}$ is absolutely irreducible (paragraph ``$\rhob$ is reasonable''). The representation $\rhob_{\mathcal G}$ is discrete series and odd in the sense of \cite[Definition~4.2.1]{BellovinGee19}: for $\Gthree$ this means that the multiplier takes the value $-1$ on complex conjugation \cite[\S5.1]{BellovinGee19}, and $\mu(\tilde\cc)=\varepsilon_p(\tilde\cc)^{-2}\dK(\tilde\cc)=-1$. The character $\mu$ is a de Rham lift of $\bar\mu$, and $\rhob$ and $\mu$ are unramified outside $\{3,p\}$ by (F1) and the definition of $\mu$. The Hodge type at $p$ is regular \cite[Definition~4.2.3]{BellovinGee19}, since the weights $0,1,2$ are distinct. Finally $\Cthree$ is an irreducible component of the generic fiber of the lifting ring of its inertial type, by definition, and $\Cp$ is one of the generic fiber of the lifting ring of trivial inertial type and this Hodge type, because the locus where the monodromy operator vanishes is a union of such components \cite[Theorem~3.3.7 and the paragraph before it]{BellovinGee19}. \emph{Step 2: auxiliary fields.} Let $d\ne p$ be a prime with $d\equiv2\pmod3$ and $\bigl(\frac dp\bigr)=-\bigl(\frac3p\bigr)$ (Dirichlet's theorem), and put $F_1=K(\sqrt{3d})$, a CM field with maximal totally real subfield $F_1^+=\Q(\sqrt{3d})$. As $-d\equiv1\pmod 3$ is a square in $\Z_3$, $\Q_3(\sqrt{3d})=\Q_3(\sqrt{-3})$, so the place of $F_1^+$ above $3$ splits in $F_1$. As $\bigl(\frac{3d}p\bigr)=-1$, $p$ is inert in $F_1^+$, with completion $\Q_{p^2}\ni\sqrt{-3}$, so the place of $F_1^+$ above $p$ splits in $F_1$. The field $F_1$ is unramified at $p$, so $\zeta_p\notin F_1$; and $\rhob|_{G_{F_1(\zeta_p)}}$ is irreducible, because $G_{F_1(\zeta_p)}$ has index at most $2$ in $G_{K(\zeta_p)}$ (by Clifford's theorem a reducible restriction would be scalar, and then $\rhob(G_{K(\zeta_p)})$ would be abelian). Apply \cite[Corollary~4.5.3]{BLGGT14} with $F=F_0=F_1$, the polarized representation $(\rhob|_{G_{F_1}},\bar\mu|_{G_{F_1^+}})$, the lift $\mu|_{G_{F_1^+}}$ of its multiplier, the set $S_1$ of primes of $F_1$ above $3$ and $p$ (it contains the primes above $p$ and those at which $\rhob|_{G_{F_1}}$ ramifies, by (F1)), the local lifts $\rho|_{G_{F_{1,y}}}$ at $y\in S_1$ (polarized by (F4); at $y\mid p$ crystalline with Hodge--Tate weights $\{0,1,2\}$ at every embedding, $F_{1,y}=K_v$ being unramified over $\Q_p$, hence potentially diagonalizable \cite[Lemma~1.4.3~(2)]{BLGGT14}), and $F^{(\mathrm{avoid})}=F_1\Kbar^{\ker\rhob}(\zeta_p)$. Its condition $p\ge2(d'+1)$, where $d'\le3$ is the largest dimension of an irreducible constituent of $\rhob$ restricted to the subgroup generated by the Sylow pro-$p$-subgroups, holds as $p\ge17$. It gives a finite CM extension $F'/F_1$, linearly disjoint from $F^{(\mathrm{avoid})}$ over $F_1$, and a regular algebraic cuspidal polarized automorphic representation $(\pi',\chi')$ of $\GL_3(\A_{F'})$, of level potentially prime to $p$, unramified at the primes of $F'$ not above $S_1$, whose $p$-adic Galois representation $r(\pi')$ lifts $\rhob|_{G_{F'}}$ with multiplier $\mu|_{G_{(F')^+}}$ and satisfies $r(\pi')|_{G_{F'_u}}\sim\rho|_{G_{F'_u}}$ at every place $u\mid p$, where $\sim$ is the relation ``connects'' of \cite[\S\S1.3, 1.4]{BLGGT14}. As $\rho|_{G_{F'_u}}$ is potentially diagonalizable \cite[\S1.4]{BLGGT14}, so is $r(\pi')|_{G_{F'_u}}$ (connecting is an equivalence relation, preserved by restriction, loc.\ cit.). The field $F'$ has the following properties, which are used below. \begin{enumerate}[(a)] \item The places of $(F')^+$ above $3$ and $p$ split in $F'$, because those of $F_1^+$ split in $F_1$ and $F'=(F')^+F_1$. \item The field $F'$ does not contain $\zeta_p$, and $\rhob(G_{F'(\zeta_p)})=\rhob(G_{F_1(\zeta_p)})$, because $F'$ is linearly disjoint over $F_1$ from the Galois extension $F^{(\mathrm{avoid})}$, which contains $\zeta_p$ and through which $\rhob|_{G_{F_1}}$ factors. \item By~(b), $\rhob(G_{F'(\zeta_p)})$ acts irreducibly, as $\rhob|_{G_{F_1(\zeta_p)}}$ does, and it is adequate by \cite[Proposition~2.1.2]{BLGGT14}, as $p\ge2(3+1)$. \end{enumerate} \emph{Step 3: components over $F'$, and a second deformation ring.} Let $S'$ be the set of places of $(F')^+$ above $3$ and $p$, and for $w\in S'$ fix a place $\tilde w$ of $F'$ above $w$. As $w$ splits in $F'$ (Step~2~(a)), $F'_{\tilde w}=(F')^+_w$, and this field contains $K_\p$ or $K_v$. So $G_{(F')^+_w}=G_{F'_{\tilde w}}$ is contained in $G_{K_\p}$ or $G_{K_v}$. Here a decomposition group at $\tilde w$ is $G_\Q$-conjugate to a subgroup of the decomposition group at $3$ or $p$ used to define $\Cthree$ and $\Cp$, and we transport these components by the conjugation; by \cite[Lemma~3.4.1]{BellovinGee19}, the result does not depend on the choices. The restriction to $G_{(F')^+_w}$ of a lifting of $\rhob_{\mathcal G}|_{G_{\Q_3}}$ or $\rhob_{\mathcal G}|_{G_{\Q_p}}$ with multiplier $\mu$ has values in $\Gthree^0=\GL_3\times\GL_1$: it is $\sigma\mapsto(r(\sigma),\mu(\sigma))$, with $r$ a lifting of $\rhob|_{G_{F'_{\tilde w}}}$. If $w\mid3$, let $D_w$ be an irreducible component of the generic fiber of the framed lifting ring of $\rhob|_{G_{F'_{\tilde w}}}$ that contains the image of $\Cthree$ under this restriction; one exists, the image being irreducible. If $w\mid p$, let $D_w$ be the irreducible component through $\rho|_{G_{F'_{\tilde w}}}$ of the generic fiber of the ring of crystalline liftings of $\rhob|_{G_{F'_{\tilde w}}}$ with Hodge--Tate weights $\{0,1,2\}$ at every embedding. That generic fiber is formally smooth \cite[\S1.4]{BLGGT14}, so its irreducible components are disjoint; the image of $\Cp$ lies in it (the points of $\Cp$ are crystalline with weights $\{0,1,2\}$ at both embeddings of $K_v$), is irreducible and contains $\rho|_{G_{F'_{\tilde w}}}$, so it lies in $D_w$. Let $\mathcal A'$ be the universal deformation ring of the deformation problem \[ \mathcal S'=\bigl(F'/(F')^+,\,S',\,\{\tilde w\}_{w\in S'},\,\OO_E,\,\rhob_{\mathcal G}|_{G_{(F')^+}},\,\mu|_{G_{(F')^+}},\,\{\mathcal D_w\}_{w\in S'}\bigr) \] in the sense of \cite[\S2.3]{CHT08} and \cite[\S1.5]{BLGGT14}, where $\mathcal D_w$ consists of the liftings that factor through $R_{D_w}$ \cite[\S\S1.3, 1.4]{BLGGT14}. The restriction to $G_{(F')^+}$ of the universal deformation over $\mathcal A$ is of type $\mathcal S'$: it is unramified outside $S'$; and at $w\in S'$ the map from the framed lifting ring of $\rhob|_{G_{F'_{\tilde w}}}$ to $\mathcal A$ factors through $R_{\Cthree}$ or $R_{\Cp}$, which are reduced and without $p$-torsion, with dense sets of closed points in their generic fibers, all of which restrict to points of $D_w$, so it kills the kernel of the map to $R_{D_w}$. This gives a homomorphism $\mathcal A'\to\mathcal A$. \emph{Step 4: $\mathcal A$ is finite over $\mathcal A'$.} Let $L_0$ be the field cut out by $\rhob_{\mathcal G}$, and $\Omega_{3p}$ the maximal pro-$p$ extension of $L_0$ unramified outside the places above $3p$. Every deformation counted by $\mathcal A$ factors through $\Gamma=\Gal(\Omega_{3p}/\Q)$ (the kernel of $\Gthree(A)\to\Gthree(\Fbar_p)$ is pro-$p$), and $\Gamma$ is topologically finitely generated: $\Gal(\Omega_{3p}/L_0)$ is a pro-$p$ group with finite Frattini quotient, as there are finitely many cyclic extensions of degree $p$ of $L_0$ unramified outside $3p$ (Hermite's theorem). Let $\Delta=\Gal(\Omega_{3p}/K)$, and let $\Sigma\subset\Gamma$ be the image of $G_{(F')^+}$, a subgroup of finite index. It is not contained in $\Delta$, as $(F')^+$ is totally real, and $\Sigma\cap\Delta$ contains the image of $G_{F'}$, on which $\rhob$ is absolutely irreducible. By \cite[Lemma~1.2.3~(1)]{BLGGT14}, the universal deformation ring of $\rhob_{\mathcal G}|_\Gamma$ is finite over that of $\rhob_{\mathcal G}|_\Sigma$. The ring $\mathcal A$ is a quotient of the former. Every deformation of $\rhob_{\mathcal G}|_\Sigma$ is, by inflation, a deformation of $\rhob_{\mathcal G}|_{G_{(F')^+}}$ unramified outside $S'$, and the resulting map from the universal deformation ring of $\rhob_{\mathcal G}|_{G_{(F')^+}}$ unramified outside $S'$ to that of $\rhob_{\mathcal G}|_\Sigma$ is surjective, because inflation from $\Sigma$ to $G_{(F')^+}$ is injective on tangent spaces. So the image in $\mathcal A$ of the universal deformation ring of $\rhob_{\mathcal G}|_\Sigma$ is the image of the universal deformation ring of $\rhob_{\mathcal G}|_{G_{(F')^+}}$ unramified outside $S'$, which by Step~3 is the image of $\mathcal A'$. Hence $\mathcal A$ is a finite $\mathcal A'$-algebra. \emph{Step 5: $\mathcal A'$ is finite over $\OO_E$.} For $w\in S'$ choose a lift $\rho_w$ of $\rhob|_{G_{F'_{\tilde w}}}$: if $w\mid p$, $\rho_w=\rho|_{G_{F'_{\tilde w}}}$, which is potentially diagonalizable with weights $\{0,1,2\}$ at every embedding (Step~2); if $w\mid 3$, a closed point of $D_w$ that lies on no other irreducible component (the complement in $D_w$ of the other components is a nonempty open subset). We apply \cite[Theorem~A.4.1]{BLGG13} with its fields $F$ and $F'$ both equal to our $F'$, its set $S$ equal to $S'$, the places $\tilde w$, the character $\mu|_{G_{(F')^+}}$, the representation $\rhob_{\mathcal G}|_{G_{(F')^+}}$, the lifts $\rho_w$, and $(\pi',\chi')$. Its hypotheses hold by Step~2~(a)--(c), together with the following: $F'$ is CM; $S'$ contains the places above $p$; $\mu|_{G_{(F')^+}}$ is continuous, totally odd and de Rham, and unramified outside $S'$ (the extension $F'=(F')^+K$ of $(F')^+$ is unramified outside the places above $3$); $\rhob_{\mathcal G}|_{G_{(F')^+}}$ is unramified outside $S'$, has multiplier $\bar\mu$ and maps exactly $G_{F'}$ into $\Gthree^0$; for $w\mid p$, $\rho_w$ is potentially diagonalizable with three distinct Hodge--Tate numbers at each embedding; and $(\pi',\chi')$ is unramified outside the places above $S'$, lifts $\rhob|_{G_{F'}}$ with multiplier $\bar\mu$, and is potentially diagonalizable at the places above $p$ (Step~2).\footnote{The hypothesis of \cite[Theorem~A.4.1]{BLGG13} on $(\pi',\chi')$ is printed as $(\bar r_{l,\imath}(\pi'),\bar r_{l,\imath}(\chi'))\isom(\bar r|_{G_{F'}},\bar\mu|_{G_{F'}})$; the proof there uses $r_{l,\imath}(\chi')\varepsilon_l^{1-n}$ as the multiplier, and we use the hypothesis in this sense, as \cite{BellovinGee19} do.} That $\chi'$ is unramified outside the places above $S'$ follows from \cite[Corollary~4.5.3~(4)]{BLGGT14}: $r(\chi')=\mu\varepsilon_p^{2}|_{G_{(F')^+}}$ is the character of $F'/(F')^+$, which is unramified at every finite place, as shown below for $\chi''$. So \cite[Theorem~A.4.1]{BLGG13} applies. It gives a lift $r''\colon G_{(F')^+}\to\Gthree(\overline\Z_p)$ of $\rhob_{\mathcal G}|_{G_{(F')^+}}$ with multiplier $\mu$, unramified outside $S'$. Let $s''$ be the $\GL_3$-component of $r''|_{G_{F'}}$. By the theorem, $s''|_{G_{F'_{\tilde w}}}\sim\rho_w$ for $w\in S'$, and $s''\isom r(\pi'')$ for a regular algebraic cuspidal polarized automorphic representation $(\pi'',\chi'')$ of $\GL_3(\A_{F'})$ of level potentially prime to $p$. By \cite[Theorem~2.1.1~(2)]{BLGGT14}, $\pi''$ is unramified at the places not above $S'$, since $r''$ is. We show that $s''|_{G_{F'_{\tilde w}}}$ lies on $D_w$ for every $w\in S'$. If $w\mid3$, ``$\sim$'' means that $s''|_{G_{F'_{\tilde w}}}$ and $\rho_w$ lie on a common irreducible component \cite[\S1.3]{BLGGT14}, and $\rho_w$ lies only on $D_w$. If $w\mid p$, ``$\sim$'' means that $s''|_{G_{F'_{\tilde w}}}$ and $\rho_w$ are points of the same irreducible component of the generic fiber of the ring of potentially crystalline liftings with weights $\{0,1,2\}$, crystalline over $K'$, for all sufficiently large finite $K'/F'_{\tilde w}$ \cite[\S1.4]{BLGGT14}; that generic fiber is formally smooth and contains the crystalline one as a union of irreducible components (loc.\ cit.), so this component is $D_w$, and $s''|_{G_{F'_{\tilde w}}}$ is crystalline and lies on $D_w$. Moreover, if $w\mid3$ the point $s''|_{G_{F'_{\tilde w}}}$ lies on no other component: the local components of the cuspidal representation $\pi''$ are generic, so the point is smooth by \cite[Lemma~1.3.2~(1)]{BLGGT14} and \cite[Theorem~2.1.1~(2)]{BLGGT14}, and the generic fiber is regular, hence locally irreducible, at a smooth point \cite[\S1.3]{BLGGT14}. So $r''$ defines a point of $\mathcal A'$, and the components $D_w$ are those that \cite[Theorem~2.3.2]{BLGGT14} attaches to $\pi''$ and $S'$. The remaining hypotheses of that theorem hold by Step~2~(a)--(c), together with the following: $F'$ is imaginary CM; $S'$ contains the places above $p$; and $\pi''$ is unramified outside $S'$ and has level potentially prime to $p$. We may take for $\chi''$ the quadratic Hecke character $\delta_{F'/(F')^+}$ of $\A_{(F')^+}^\times/((F')^+)^\times$. Indeed, $s''$ is polarized with multiplier $\mu$, and $\mu|_{G_{F'}}=\varepsilon_p^{-2}$ as $K\subset F'$, so $(s'')^\cc\isom(s'')^\vee\otimes\varepsilon_p^{-2}$. In the normalization of \cite[Theorem~2.1.1~(2)]{BLGGT14}, applied also to $\pi''^{\cc}$ and $\pi''^\vee$, which are again regular algebraic, cuspidal and polarized, $r(\pi''^{\cc})\isom r(\pi'')^\cc$ and $r(\pi''^\vee)\isom r(\pi'')^\vee\otimes\varepsilon_p^{-2}$; so $r(\pi''^{\cc})\isom r(\pi''^\vee)$, hence $\pi''^{\cc}_w\isom\pi''^\vee_w$ at every finite place $w\nmid p$ of $F'$, and $\pi''^{\cc}\isom\pi''^\vee$ by strong multiplicity one \cite[Theorem~4.4]{JacquetShalika81}. As $\delta_{F'/(F')^+}\circ\Nm_{F'/(F')^+}=1$ and $\delta_{F'/(F')^+,x}(-1)=-1=(-1)^3$ at every infinite place $x$ of $(F')^+$, the pair $(\pi'',\delta_{F'/(F')^+})$ is polarized in the sense of \cite[\S2.1]{BLGGT14}; the character $\delta_{F'/(F')^+}$ is unramified at every finite place, because only the places above $3$ can ramify in $F'=(F')^+K$, and they split; and $r(\delta_{F'/(F')^+})=\dK|_{G_{(F')^+}}$, both being the character of $G_{(F')^+}$ with kernel $G_{F'}$. So the multiplier $r(\chi'')\varepsilon_p^{-2}$ of the deformation problem of \cite[Theorem~2.3.2]{BLGGT14} is $\mu|_{G_{(F')^+}}$, and that problem is $\mathcal S'$: two prolongations of $\rhob|_{G_{F'}}$ with multiplier $\bar\mu$ are conjugate, as the pairing is unique up to a scalar by Schur's lemma (\cref{sec:polar}). The theorem is stated over the ring of integers $\OO_{L}$ of a finite extension $L$ of $E$ containing the images of the embeddings of $F'$ and the coefficients of $r(\pi'')$ and $r(\chi'')$ (the components $D_w$ are defined over $E$ by the choice of $E$); as deformation rings commute with finite extensions of scalars, $\mathcal A'$ is a finite $\OO_E$-module. \emph{Step 6: the lift.} By Steps 4 and 5, $\mathcal A$ is a finite $\OO_E$-algebra, and by Step~1 its Krull dimension is at least~$1$. So $\mathcal A$ has a minimal prime $\mathfrak q$ with $\dim\mathcal A/\mathfrak q\ge1$; then $\mathfrak q\cap\OO_E=0$, and $\mathcal A/\mathfrak q$ is a domain, finite and torsion free over $\OO_E$, which embeds in the ring of integers of a finite extension of $E$. The resulting homomorphism $\mathcal A\to\overline\Z_p$ is the lift $\tilde\rho$. \end{proof} \needspace{5\baselineskip}\begin{proposition}\label{prop:3zp-inert} Let $p\ge17$ be a prime with $p\equiv2\pmod 3$, let $v=p\OO$, and let $\rho\colon G_K\to\GL_3(\overline\Q_p)$ be a continuous representation, unramified at all but finitely many primes, with the properties \textup{(F1)}--\textup{(F6)} read as in \cref{sec:3zp-frey}. Then there is a regular, polarized and odd, weakly irreducible compatible system $\Rsys=\{R_\lambda\}$ of three-dimensional representations of $G_K$, with multiplier $\varepsilon_\ell^{-2}\dK$, whose $p$-adic member $R_p$ has the properties: \begin{enumerate}[(P1)] \item $R_p$ is a lift of $\rhob$ and is unramified outside $\{\p,v\}$; \item $R_p$ is crystalline at $v$ with Hodge--Tate weights $\{0,1,2\}$ at both embeddings of $K_v$; hence $H_\tau=\{0,1,2\}$ for both embeddings $\tau$ of $K$; \item $R_p|_{I_\p}\isom\kappa\otimes\exp(t_pN)$ for a nilpotent matrix $N$. \end{enumerate} \end{proposition} \begin{proof} Let $\Cthree$ be, as in \cref{sec:components}, an irreducible component through $\rho_{\mathcal G}|_{G_{\Q_3}}$ of the generic fiber of the lifting ring of its inertial type, and let $\tilde\rho$ be the lift given by \cref{lem:3zp-lift} for $\Cthree$ and $\Cp$. \emph{The compatible system.} Let $R_p$ be the representation of $G_K$ defined by $\tilde\rho$. It is unramified outside $\{\p,v\}$, crystalline at $v$ with Hodge--Tate weights $\{0,1,2\}$ at both embeddings (it lies on $\Cp$), hence potentially diagonalizable at $v$. It is polarized and odd with multiplier $\varepsilon_p^{-2}\dK$, and its reduction $\rhob$ is irreducible on $G_{K(\zeta_p)}$. The proof of \cref{lem:members-polarized} applies to $R_p$ in place of $\rho$, with the polarization of $R_p$ (defined by $\tilde\rho$) in place of (F4) and of the pairing of \cref{lem:polarized}, the paragraph ``$\rhob$ is reasonable'' in place of \cref{prop:reasonable}, and the single place $v$, with $K_v=\Q_{p^2}$ unramified over $\Q_p$, in place of $v$ and $\bar v$ (so \cite[Lemma~1.4.3~(2)]{BLGGT14} still applies). So $R_p$ is the $p$-adic member of a regular, weakly irreducible compatible system $\Rsys$, polarized and odd with multiplier $\varepsilon_\ell^{-2}\dK$. This is how \cite[Lemma~4.2.3]{CEG22} obtains a compatible system from such a lift, when the places above $p$ split. Then (P1) and (P2) hold by construction, and (P3) follows from \cref{lem:lifts-at-3} applied to $R_p|_{G_{K_\p}}$, whose reduction restricted to $I_\p$ is $\bar\kappa|_{I_\p}$ times a unipotent representation by (F3) (as in \eqref{eq:F3bar}). \end{proof} \begin{remark}\label{rem:3zp-CEG} The theorem of Calegari, Emerton and Gee used in Part~II, \cite[Theorem~4.2.11]{CEG22}, is stated with no condition on how the places above $p$ decompose in the CM field \cite[\S1.5.19, \S1.5.25]{CEG22}, and its hypotheses hold for $p\equiv2\pmod 3$ as well, with $F=K$, $S=\{3,p\}$, the component $\Cp$ and any polarized component at $3$. They are checked as in the proof of \cref{thm:CEG}, with the paragraph ``$\rhob$ is reasonable'' in place of \cref{prop:reasonable}, except for the global realizability of $\Cp$ \cite[Definition~2.1.9]{CEG22}. That holds with the field $K$ and the place $p$ of $\Q$, as in the proof of \cref{lem:realizable}: the proof of \cref{lem:members-polarized}, read with the same substitution and with the single place $v$ in place of $v$ and $\bar v$, puts $\rho$ in a regular, polarized and odd, weakly irreducible compatible system, and $\rho_{\mathcal G}|_{G_{\Q_p}}$ lies on $\Cp$ by the definition of $\Cp$. We do not use that theorem for $p\equiv2\pmod 3$: a more direct argument suffices. Its proof reaches a globally realizable component at $p$ by swapping components between compatible systems \cite[\S4.2]{CEG22}. Here the points of $\Cp$ are potentially diagonalizable on $G_{K_v}$, so the lifting argument of Bellovin and Gee \cite[Theorem~5.2.1]{BellovinGee19}, run over a field in which the places above $p$ split, gives the lift without that step (\cref{lem:3zp-lift}). \Cref{prop:3zp-inert,prop:3zp-notscalar} rest on this lemma (see the beginning of \cref{sec:3zp-inert}). The same argument proves \cref{thm:CEG} for $p\equiv1\pmod3$, for the component $\Cp$ of \cref{sec:components} and every polarized component $\Cthree$ at $3$, without \cite[Theorem~4.2.11]{CEG22}. Indeed, \cref{lem:3zp-lift} and its proof hold for $p\equiv1\pmod 3$, with the following changes. The representation $\rho$ is that of \cref{sec:F}, and \cref{prop:reasonable} replaces the paragraph ``$\rhob$ is reasonable''. The component $\Cp$ is that of \cref{sec:components}; by \cite[Lemma~1.5.20]{CEG22}, as $p$ splits in $K$, it is the component defined in \cref{sec:3zp-inert}. In Step~2 the condition on $\bigl(\frac dp\bigr)$ is not needed, because, $-3$ being a square in $\Q_p$, the places above $p$ split in every CM field containing $K$; and, as $F_1$ is unramified at $p$, the completions $F_{1,y}$, $y\mid p$, are $\Q_p$ or $\Q_{p^2}$, unramified over $\Q_p$ and containing $K_v$ or $K_{\bar v}$, as \cite[Lemma~1.4.3~(2)]{BLGGT14} requires. In Step~3, $K_v$ becomes $K_v$ or $K_{\bar v}$, both equal to $\Q_p$. The representation of $G_K$ defined by the lift is crystalline at $v$ with Hodge--Tate weights $\{0,1,2\}$, as its restriction to $G_{K_v}$ lies on $\Cp$, and hence at $\bar v$, by its polarization, as in (P2) of \cref{sec:S}. The proof of \cref{lem:members-polarized}, applied to it, with the polarization given by the lift in place of (F4) and these properties in place of (F2), gives a compatible system with the properties stated in \cref{thm:CEG}. With the component $\Cthree'$ of the proof of \cref{prop:notscalar} in place of $\Cthree$, this proves step~(5) of that proof as well. \end{remark} With \cref{prop:3zp-inert} in place of \cref{thm:CEG,lem:realizable}, the rest of Part~II holds for $p\equiv2\pmod 3$, with $v=p\OO$ and $\bar v$ omitted. The proof of \cref{prop:members}, which gives (M1)--(M3), uses \cref{lem:lgc-members}, which applies to $\Rsys$ because it is regular, polarized and odd, and weakly irreducible. In the proof of that lemma a place $y$ of $F'$ above $v$ still has $F'_y=K_v$, although $y$ is now inert over $(F')^+$, and \cite[Theorem~2.1.1~(2)]{BLGGT14} and \cite[Theorem~1.1]{BLGGTlgc2} are stated for all places, split or not. The same situation already occurs in the proof of (M2) at the inert prime $5$. The proof of \cref{prop:member-irreducible} uses (F5) at the prime $\mathfrak P=p\OO$ and item~C2, whose ideals have no prime factor above $p$. \Cref{sec:bounds,sec:reductions}, in particular \cref{thm:cases}, concern the members above $5$ and use only (M1)--(M3), (F3), \cref{prop:member-irreducible} and the polarization of these members, so $p$ enters them only through $5\notin\{3,7,p\}$. That leaves \cref{prop:notscalar}, whose proof applies \cref{thm:CEG} again with another component at $3$. It is proved for inert $p$ in \cref{sec:3zp-three} (\cref{prop:3zp-notscalar}). \subsection{Part~III at an inert prime}\label{sec:3zp-three} In this subsection $p\ge17$ is a prime with $p\equiv2\pmod 3$, $v=p\OO$, and $\rho$ is as in \cref{prop:3zp-inert}. We first prove \cref{prop:notscalar} for $\rho$. \begin{proposition}\label{prop:3zp-notscalar} The group $\rhob(I_\p)$ is not contained in the group of scalar matrices. \end{proposition} \begin{proof} Suppose that it is. We construct a compatible system with the properties stated in \cref{prop:3zp-inert} whose matrix $N$ in (P3) is zero. This contradicts \cref{thm:cases}~(2), which holds for such systems by the paragraph after \cref{rem:3zp-CEG}. Steps (1)--(4) of the proof of \cref{prop:notscalar} use only the properties (F3), (F4), (F6) of $\rho$ and the prolongation $\rhob_{\mathcal G}$ (\cref{lem:polarized}), and apply unchanged for inert $p$; the residue field $\F'$ there can be taken to contain $\F_{p^2}$, and the element $t\equiv1$ of step (2) exists because $p$ is odd. They give a lift $\rho'_{\mathcal G}$ of $\rhob_{\mathcal G}|_{G_{\Q_3}}$ with multiplier $\varepsilon_p^{-2}\dK$, trivial on an open subgroup of the inertia group, and an irreducible component $\Cthree'$ through it of the generic fiber of the lifting ring of its inertial type, at all of whose points the monodromy operator vanishes (\cite[Theorem~3.3.7 and the paragraph before it]{BellovinGee19}, as in step~(4) of the proof of \cref{prop:notscalar}). Instead of step (5), apply \cref{lem:3zp-lift} with $\Cthree'$ in place of $\Cthree$; the lemma allows any polarized component at $3$. It gives a lift $\tilde\rho'\colon G_\Q\to\Gthree(\overline\Z_p)$ of $\rhob_{\mathcal G}$, unramified outside $\{3,p\}$, with multiplier $\varepsilon_p^{-2}\dK$, whose restrictions to $G_{\Q_3}$ and $G_{\Q_p}$ lie on $\Cthree'$ and $\Cp$. As in the proof of \cref{prop:3zp-inert} (the proof of \cref{lem:members-polarized}, with the substitutions made there, applied to the representation of $G_K$ defined by $\tilde\rho'$), the representation of $G_K$ defined by $\tilde\rho'$ is the $p$-adic member of a compatible system $\Rsys'$ with the properties stated in \cref{prop:3zp-inert}. The restriction of $\tilde\rho'$ to $G_{\Q_3}$ lies on $\Cthree'$, so the monodromy of the $p$-adic member of $\Rsys'$ at $\p$ is zero: $N=0$ in (P3). \end{proof} With \cref{prop:3zp-notscalar} in place of \cref{prop:notscalar}, Part~III holds for $p\equiv2\pmod 3$, with $v=p\OO$ and $\bar v$ omitted. The proof of \cref{cor:regular} uses (F3), (F4), (F6), (P1), (P3) and \cref{prop:notscalar}, and applies \cref{prop:regular} with $\ell=p\ge17$ over a finite field of characteristic $p$, which can be taken to contain $\F_{p^2}$. \Cref{prop:three-unram,prop:three-wd} rest on \cref{lem:lgc-members}, which applies to the system of \cref{prop:3zp-inert} because it is regular, weakly irreducible, and polarized and odd (all its members are polarized, by the proof of \cref{prop:3zp-inert}). In the proof of that lemma, as $F'=(F')^+K$, a place $y$ of $F'$ above $\p$ has $F'_y=K_\p$, and a place $y$ above $v$ has $F'_y=\Q_p\otimes_\Q K=K_v=\Q_{p^2}$. \Cref{prop:three-ordinary,prop:three-irreducible} and \cref{sec:three-reductions} concern $K_\p$ and the member at $3$ only, and do not involve $p$. Consequently: \begin{proposition}\label{prop:3zp-noF} Let $p\ge17$ be a prime, split or inert in $K$. There is no continuous representation $\rho\colon G_K\to\GL_3(\overline\Q_p)$, unramified at all but finitely many primes, with the properties \textup{(F1)}--\textup{(F6)} (read as in \cref{sec:3zp-frey} if $p$ is inert). Here \textup{(F3)} means that $\rho|_{I_\p}$ is $\kappa|_{I_\p}$ times a unipotent representation for some character $\kappa\colon G_K\to\mu_3$ with $\kappa^\cc=\kappa^{-1}$ whose restriction to $G_{K_\p}$ is trivial or has conductor $\p^2$, and in \textup{(F5)} the $\xi_\q$ are any elements of $\mu_3$. \end{proposition} \begin{proof} For $p\equiv1\pmod3$ this is what the proof of \cref{thm:three-main} shows, since it uses nothing else about $\rho$. For $p\equiv2\pmod 3$, take the system of \cref{prop:3zp-inert} and argue in the same way, with \cref{prop:3zp-notscalar} and the transfer of Parts~II and~III described above. \end{proof} \subsection{The proof for \texorpdfstring{$p\ge17$}{p at least 17}, and the equations with \texorpdfstring{$k\ge2$}{k at least 2}}\label{sec:3zp-proof} \begin{proof}[Proof of \cref{thm:3zp-large}] Let $p\ge17$ and $k\ge1$, and let $(a,b,c)$ be a solution with $3\mid c$, or with $k\ge8$; for $k=1$, $3\mid c$ holds automatically (\cref{lem:3zp-elementary}~(ii)). Then $\nu=k+p\,v_3(c)\ge8$. The representation $\rho$ of \cref{sec:3zp-frey} is unramified at all but finitely many primes and has the properties (F1)--(F6) (\cref{prop:3zp-frey,prop:3zp-irreducible}). This contradicts \cref{prop:3zp-noF}. \end{proof} \begin{remark}[the equations with $k\ge2$]\label{rem:3zp-k} Let $k\ge2$. If $k\ge p$, then $3^kz^p=3^{k-p}(3z)^p$, so a solution for $k$ is a solution for $k-p$ with $3\mid z$; statements (1) and (2) below depend on $k$ only through $2k-3$ modulo $p$ and through the condition ``$3\mid z$ or $k\ge8$'', and are compatible with this reduction. \begin{enumerate}[(1)] \item \emph{For $p\ge7$}: there is no solution unless $2k-3$ is a nonzero square modulo $p$ (\cref{thm:3zp-unconditional}~(a)). When it is, every solution has $z$ odd, exactly one of $x,y$ even and $\equiv2\pmod 4$, and $p\nmid z$; if $p\ne7$, also $7\nmid xyz$ and $x^3\equiv y^3\pmod 7$; and, for a normalized solution, $\rhob_{E'_{x,y},p}\isom\rhob_{W',p}$ (\cref{thm:3zp-elliptic}, \cref{rem:3zp-elliptic}~(2)). For $k\ge8$ and $p\in\{7,11,13\}$ we know only what \cref{thm:3zp-unconditional} gives, directly or after the reduction of $k$ modulo $p$ above. \item \emph{For $p\ge17$}: there is no solution with $3\mid z$, and none at all if $k\ge8$ (\cref{thm:3zp-large}). So the solutions that are not excluded have $3\nmid z$ and $2\le k\le7$, with $2k-3\in\{1,3,5,7,9,11\}$ a square modulo $p$. \item \emph{$k=2$.} The solution $2^3+1^3=9\cdot1^p$ has $3\nmid z$, as it must: its parameter has $v_3(s_0)=2$, outside the disc of \cref{thm:inertia3} (\cref{sec:remarks}). \item \emph{$3\le k\le7$ and $3\nmid z$.} Here $v_3(s_0)=k\le7$, and \cref{thm:inertia3} gives no information on $\VV_{s_0}$ at $\p$. For $7\le p\le10^6$ there is no solution (\cref{thm:3zp-unconditional}~(c)). There is no solution with $z=\pm1$ for any $k\ge3$: if $x^3+y^3=\pm3^j$ with $\gcd(x,y)=1$ and $j\ge1$, then $x+y$ and $x^2-xy+y^2$ are, up to sign, powers of $3$, and $v_3(x^2-xy+y^2)=1$ (\cref{lem:3zp-elementary}~(ii)), so $x^2-xy+y^2=3$, whose solutions give $x^3+y^3\in\{0,\pm9\}$. \end{enumerate} \end{remark}