\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[a4paper,margin=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{booktabs,array,adjustbox}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{fvextra}
\usepackage[colorlinks=true,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}]{hyperref}
\usepackage{xurl}
\setlength{\emergencystretch}{3em}
\usepackage{fancyhdr}
\setlength{\parindent}{0pt}\setlength{\parskip}{0.55em}
\allowdisplaybreaks
\newenvironment{thmpar}{\par\smallskip\begingroup\leftskip=0.9em\rightskip=0pt}{\par\endgroup\smallskip}
\providecommand{\R}{\mathbb{R}}\providecommand{\N}{\mathbb{N}}\providecommand{\Z}{\mathbb{Z}}\providecommand{\Q}{\mathbb{Q}}\providecommand{\C}{\mathbb{C}}
\providecommand{\mathscr}{\mathcal}\providecommand{\bm}{\boldsymbol}\providecommand{\Bbb}{\mathbb}
\providecommand{\varphi}{\mathrm{varphi}}
\pagestyle{fancy}\fancyhf{}\renewcommand{\headrulewidth}{0pt}
\fancyfoot[L]{\footnotesize\begin{tabular}[b]{@{}l@{}}iis:2611.00359 \textperiodcentered{} \href{https://isitsolved.com/journal/91af13d9956d}{isitsolved.com/journal/91af13d9956d}\\ Timestamped in Bitcoin block 977,995 (2026-11-28), transaction \href{https://mempool.space/tx/24d0d305e5945de4d5b0749dd831babe952474c208a77bf45c0a8de740d6c9e7}{\texttt{24d0d305e5945de4\ldots{}40d6c9e7}}\end{tabular}}\fancyfoot[R]{\footnotesize\thepage}
\hypersetup{pdftitle={Sun's conjecture in OEIS A234388: part (ii) is false, first at n = 9144},pdfauthor={Dev Singh}}
\title{\bfseries Sun's conjecture in OEIS A234388: part (ii) is false, first at n = 9144}
\author{Dev Singh}
\date{2026-11-28 \\ \small iis:2611.00359}
\begin{document}
\maketitle
\thispagestyle{fancy}
\begin{abstract}
OEIS A234388 (Zhi-Wei Sun, 2013) conjectures that (i) every n > 1 is k + m with k, m > 0 and \(2^{k}\) (\(2^{phi}\)(m) - 1) + 1 prime, and (ii) every n > 2 is k + m with \(2^{k}\) (\(2^{phi}\)(m) - 1) - 1 prime. Part (i) fails at n = 5962, found by Jason Yuen in 2024. We show part (ii) is false too: it fails at n = 9144, and this is the least counterexample. Both failures are proved in Lean 4, checked by the kernel with the standard axioms only: each of the 9143 (and 5961) values gets a prime factor below 1\(0^{8}\) or a failed base-2 Fermat test. Minimality is by computation, with a primality proof for one value at every smaller n.
\end{abstract}


\section*{Sun's conjecture in OEIS A234388: part (ii) is false, and part (i) in Lean}

\begin{thmpar}\textbf{Theorem 1 (\texttt{OeisA234388.\allowbreak{}conjecture\_\allowbreak{}ii\_\allowbreak{}false}).} It is not true that every \(n > 2\) can be written as \(k + m\) with \(k,\allowbreak  m > 0\) and \(2^k(2^{\varphi(m)} - 1) - 1\) prime: there is no such pair for \(n = 9144\).\end{thmpar}

\begin{thmpar}\textbf{Theorem 2 (\texttt{OeisA234388.\allowbreak{}conjecture\_\allowbreak{}i\_\allowbreak{}false}, counterexample due to Jason Yuen).} The same with \(+1\) in place of \(-1\) fails for \(n = 5962\).\end{thmpar}

Lean receipt requested on this site: \url{https://isitsolved.com/lean/receipts/a48cdd453fd9}

\href{https://oeis.org/A234388}{OEIS A234388} (Zhi-Wei Sun, December 2013) conjectures, with \ensuremath{\varphi} Euler's
totient function:

\begin{center}\small\begin{adjustbox}{max width=\linewidth}\begin{tabular}{lll}
\toprule
\textbf{} & \textbf{Assertion} & \textbf{Status} \\
\midrule
(i) & every integer n > 1 can be written as k + m with k, m > 0 such that 2\textasciicircum{}k (2\textasciicircum{}\ensuremath{\varphi}(m) \ensuremath{-} 1) + 1 is prime & False at n = 5962. Found by Jason Yuen in 2024 (\href{https://oeis.org/A234399}{OEIS A234399}). Formalised here, not new. \\
(ii) & every integer n > 2 can be written as k + m with k, m > 0 such that 2\textasciicircum{}k (2\textasciicircum{}\ensuremath{\varphi}(m) \ensuremath{-} 1) \ensuremath{-} 1 is prime & \textbf{False. It fails at n = 9144, the smallest counterexample.} New here. \\
\bottomrule
\end{tabular}\end{adjustbox}\end{center}

\begin{center}\small\begin{adjustbox}{max width=\linewidth}\begin{tabular}{ll}
\toprule
\textbf{Claim} & \textbf{How it is established} \\
\midrule
Both assertions are false & Lean 4 proofs checked by the Lean kernel. \texttt{\#print axioms} gives \texttt{propext}, \texttt{Classical.\allowbreak{}choice}, \texttt{Quot.\allowbreak{}sound} and nothing else: no \texttt{sorry}, no \texttt{native\_\allowbreak{}decide}. \\
9144 (and 5962) are the smallest counterexamples & Computation: every smaller n has a k whose value is \textbf{proved} prime (not a probable-prime test). Not a Lean proof. \\
\bottomrule
\end{tabular}\end{adjustbox}\end{center}

\section*{Reading the proof}

Three files are written by hand. Start with them:

\begin{center}\small\begin{adjustbox}{max width=\linewidth}\begin{tabular}{lll}
\toprule
\textbf{File} & \textbf{Lines} & \textbf{What it is} \\
\midrule
\href{https://github.com/DevSingh05/oeis-a234388/blob/main/OeisA234388/Main.lean}{\texttt{OeisA234388/\allowbreak{}Main.\allowbreak{}lean}} & 44 & The two theorems \\
\href{https://github.com/DevSingh05/oeis-a234388/blob/main/OeisA234388/Checker.lean}{\texttt{OeisA234388/\allowbreak{}Checker.\allowbreak{}lean}} & 177 & A compositeness checker that the Lean kernel can run, with its soundness proofs \\
\href{https://github.com/DevSingh05/oeis-a234388/blob/main/OeisA234388/Sanity.lean}{\texttt{OeisA234388/\allowbreak{}Sanity.\allowbreak{}lean}} & 23 & Checks that the checker refuses primes \\
\bottomrule
\end{tabular}\end{adjustbox}\end{center}

Everything in \href{https://github.com/DevSingh05/oeis-a234388/blob/main/OeisA234388/Generated}{\texttt{OeisA234388/\allowbreak{}Generated/}} is produced by
\texttt{scripts/\allowbreak{}gen\_\allowbreak{}lean.\allowbreak{}py}: the certificates, and the checker applied to them.

\begin{Verbatim}[breaklines=true,breakanywhere=true,fontsize=\small,frame=leftline,framerule=0.6pt,framesep=3mm,rulecolor=\color{black!20}]
theorem conjecture_i_false :
    ? ? n : ?, 1 < n ->
      ? k m : ?, 0 < k ? 0 < m ? k + m = n ? Nat.Prime (2 ^ k * (2 ^ m.totient - 1) + 1)
theorem conjecture_ii_false :
    ? ? n : ?, 2 < n ->
      ? k m : ?, 0 < k ? 0 < m ? k + m = n ? Nat.Prime (2 ^ k * (2 ^ m.totient - 1) - 1)
\end{Verbatim}

\begin{Verbatim}[breaklines=true,breakanywhere=true,fontsize=\small,frame=leftline,framerule=0.6pt,framesep=3mm,rulecolor=\color{black!20}]
'OeisA234388.conjecture_i_false' depends on axioms: [propext, Classical.choice, Quot.sound]
'OeisA234388.conjecture_ii_false' depends on axioms: [propext, Classical.choice, Quot.sound]
\end{Verbatim}



\subsection*{How the proofs work}

For n = 9144 each of the 9143 values 2\textasciicircum{}k (2\textasciicircum{}\ensuremath{\varphi}(n\ensuremath{-}k) \ensuremath{-} 1) \ensuremath{-} 1 must be composite (5961 values for
n = 5962). They have up to about 9,100 bits. Each k gets a certificate:

\begin{itemize}
  \item \textbf{A prime factor} below 10\ensuremath{^{8}}, for 86\% of the k. The kernel checks one division.
  \item \textbf{A failed Fermat test}, \texttt{2 \textasciicircum{} (N \ensuremath{-\allowbreak{}} 1) \% N \ensuremath{\neq} 1}, for the other 1307 (838 for n = 5962). This is
sound by Fermat's little theorem (from Mathlib) and needs a modular exponentiation \texttt{powMod},
written so that the kernel can evaluate it and proved equal to \texttt{b \textasciicircum{} e \% m}.
\end{itemize}

Euler's totient is read from a table for m < 9144, which \texttt{Generated/\allowbreak{}PhiSpec.\allowbreak{}lean} proves equal
to \texttt{Nat.\allowbreak{}totient}. Every check is closed by \texttt{decide +kernel}.

The checker is the one from \href{https://github.com/DevSingh05/oeis-a234360}{oeis-a234360}, where
the same method settles three assertions of a neighbouring conjecture of Sun.

\subsection*{Build}

    lake exe cache get
    lake build

About 30 minutes on a laptop (2 CPU-hours), a few GB of RAM. To regenerate from scratch:

    python scripts/find\_certificates.py   \# trial division to 10\textasciicircum{}8, about 3 minutes
    python scripts/gen\_lean.py            \# writes OeisA234388/Generated

\section*{The counterexamples are the smallest}

For every n below each counterexample, \href{https://github.com/DevSingh05/oeis-a234388/blob/main/data}{\texttt{data/\allowbreak{}witnesses\_\allowbreak{}*.\allowbreak{}txt}} lists a k for which the
expression is prime, and \href{https://github.com/DevSingh05/oeis-a234388/blob/main/data}{\texttt{data/\allowbreak{}proofs\_\allowbreak{}*.\allowbreak{}txt}} records how each prime was proved:

\begin{center}\small\begin{adjustbox}{max width=\linewidth}\begin{tabular}{lll}
\toprule
\textbf{Method} & \textbf{(i), n < 5962} & \textbf{(ii), n < 9144} \\
\midrule
Below 3.3\ensuremath{\cdot}10\ensuremath{^{2}}\ensuremath{^{4}}: Miller--Rabin with the first 12 prime bases, a proof in that range & 145 & 133 \\
Proth's theorem (N \ensuremath{-} 1 = 2\textasciicircum{}k\ensuremath{\cdot}h with h < 2\textasciicircum{}k) & 5435 &  \\
The N + 1 test with a Lucas sequence (N + 1 = 2\textasciicircum{}k\ensuremath{\cdot}h with h < 2\textasciicircum{}k) &  & 8484 \\
PARI/GP \texttt{isprime} (APRCL or ECPP, a proof), up to 6365 bits & 380 & 524 \\
\bottomrule
\end{tabular}\end{adjustbox}\end{center}

\texttt{scripts/\allowbreak{}minimality.\allowbreak{}py} finds the witnesses and \texttt{scripts/\allowbreak{}prove\_\allowbreak{}witnesses.\allowbreak{}py} proves them.

\section*{Independent check}

\texttt{scripts/\allowbreak{}verify\_\allowbreak{}independent.\allowbreak{}py} is a separate program (own totient code, explicit small factor
or a Fermat test to base 3 instead of base 2) that certifies every k for both n. As a control it
finds prime witnesses at n = 9143.

\section*{Prior work}

Part (i): Jason Yuen, comment in OEIS A234399, 4 November 2024.

Part (ii): on 2026-11-26 I looked for an earlier report and found none in the OEIS entries
A234388 and A234399 and their revision histories, in Sun's papers \href{https://arxiv.org/abs/1211.1588}{arXiv:1211.1588} and
\href{https://arxiv.org/abs/1402.6641}{arXiv:1402.6641} (the conjecture is not in either), on GitHub, or by web search. If an earlier
report exists, please open an issue and I will credit it here.

\section*{Credits}

Part (ii) was found on 2026-11-26 by Dev Pratap Singh, in a search of Sun's December 2013 family
of conjectures. The search, certificates and Lean proofs were produced with AI assistance
(Claude, Anthropic). MIT license.

\section*{Sources}
\begin{enumerate}\small
  \item OEIS A234388. \url{https://oeis.org/A234388}
  \item OEIS A234399 (Jason Yuen's counterexample to part (i)). \url{https://oeis.org/A234399}
  \item Lean 4 proof, certificates and scripts. \url{https://github.com/DevSingh05/oeis-a234388}
\end{enumerate}
\end{document}
