\documentclass[11pt,reqno]{amsart} \usepackage{amssymb} \usepackage[colorlinks=true,linkcolor=black,citecolor=black,urlcolor=blue]{hyperref} \setlength{\textwidth}{6.15in} \setlength{\oddsidemargin}{.175in} \setlength{\evensidemargin}{.175in} \setlength{\textheight}{8.95in} \setlength{\topmargin}{-.30in} \setlength{\headheight}{12pt} \setlength{\headsep}{21pt} \setlength{\footskip}{24pt} \raggedbottom \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \theoremstyle{definition} \newtheorem{certificate}[theorem]{Certificate} \newcommand{\pos}{\mathbb Z_{>0}} \newcommand{\g}{\gcd} \newcommand{\seqA}{A387757} \newcommand{\seqB}{A387759} \title[Two greedy sequences of Scott R. Shannon]{Which integers occur in two greedy sequences\\ of Scott R. Shannon?} \author{Vaed Prasad} \date{November 30, 2026} \hypersetup{pdftitle={Which integers occur in two greedy sequences of Scott R. Shannon?},pdfauthor={Vaed Prasad}} \begin{document} \begin{abstract} Scott R. Shannon conjectured that the OEIS sequence A387757 permutes the positive integers and that A387759 contains every positive nonprime. We prove the first conjecture and disprove the second. In A387757 a hypothetical omission restricts which odd terms can precede even terms. Counting the remaining possibilities contradicts an elementary lower bound for the number of primes. In A387759 a prime power cannot be a strict local minimum. A certified prefix of 477 terms then excludes \(529=23^2\) from the entire sequence. An explicit infinite continuation verifies the extendability required by its definition. \end{abstract} \maketitle \section{Two rules for choosing the next term} In September 2025, Scott R. Shannon introduced the following two sequences of distinct positive integers and asked which values they attain \cite{shana,shanb}. The first begins \(1,3,5,2,4,7,\ldots\) and tests the most recent term. The second begins \(1,4,9,10,21,20,\ldots\) and tests both of the preceding terms. Write \(A=(a_n)_{n\ge1}\) for \seqA. Set \(a_1=1\) and \(a_2=3\). If the last two terms are \(x,y\), choose the least unused \(v\in\pos\) satisfying \[ |v-y|\ge2,\qquad \begin{cases} \g(v,y)=1,&x1,&x>y . \end{cases} \] There is always a choice. After an ascent one can take \(ky+1\) with \(k\) arbitrarily large. After a descent \(y\ge2\), since \(1\) has already been used, and arbitrarily large multiples of \(y\) are available. Write \(B=(b_n)_{n\ge1}\) for \seqB. It is the lexicographically least infinite sequence of distinct positive integers starting with \(1,4,9\) such that every subsequent term \(v\), following \(x,y\), satisfies \begin{equation} R(x,y,v):\qquad \g(v,\min(x,y))>1,\qquad \g(v,\max(x,y))=1 . \label{eq:rule} \end{equation} We call an infinite sequence with these seeds and properties \emph{admissible}. The first application of \eqref{eq:rule} chooses the fourth term, as in Shannon's displayed data. The least sequence chooses the least unused candidate that admits an infinite continuation. We establish existence in Section~\ref{sec:b}. \begin{theorem}\label{thm:a} The sequence \seqA\ is a permutation of \(\pos\). \end{theorem} \begin{theorem}\label{thm:b} The sequence \seqB\ omits \(529\). In particular, it does not contain every positive nonprime. \end{theorem} \section{Every positive integer occurs in \seqA} Call \(a_i\) an \emph{ascent endpoint} if \(a_{i-1}a_i\). An endpoint may be followed by a step in either direction. Suppose \(m>0\) is missing. Since the terms are distinct, \(a_i\to\infty\). Choose \(N\ge3\) so that \(a_i>m+1\) for all \(i\ge N\). Then \(m\) is unused, at distance at least two from \(a_i\), and smaller than the selected \(a_{i+1}\). The only way it can be excluded is \begin{equation} i\ge N\quad\Longrightarrow\quad \begin{cases} \g(a_i,m)>1,& a_{i-1}a_i . \end{cases}\label{eq:sign} \end{equation} \begin{lemma}\label{lem:even} Every omitted positive integer is even. \end{lemma} \begin{proof} The primes dividing the terms are unbounded. Otherwise choose a prime \(q\) above their bound. There are arbitrarily late ascents, since an infinite tail of strict descents is impossible. At an ascent endpoint \(y>q+1\) with successor greater than \(q\), the unused \(q\) would be eligible, a contradiction. Choose \(D>\max(m+5,a_1,\ldots,a_{N+2})\). Let \(z=a_t\) be the first term divisible by \emph{any} prime exceeding \(D\), and fix such a divisor \(p\). All earlier terms are free of every prime exceeding \(D\). We show that \(z=p\) is a descent endpoint. First suppose \(z\) ends a descent. If \(z>p\), trace its descending run back to the peak \(u\) that starts it. This peak cannot be the first term, since \(a_1=1\). It ends an ascent and \(u\ge z+2>p+1\). At \(u\), the unused prime \(p\) was coprime to \(u\) and was far enough away. Thus the first term after \(u\) was at most \(p\), inconsistent with the run ending above \(p\). Since \(p\mid z\), this proves \(z=p\). Now suppose \(z\) ends an ascent, and put \(y=a_{t-1}\). By \eqref{eq:sign}, \(\g(z,m)>1\). If \(y\) ends a descent, then \(\g(y,m)=1\), and the rule gives a prime \(r\mid\g(y,z)\). Since \(p\nmid y\) we have \(r\ne p\), so \(pr\mid z\). The number \(pr\) is unused and eligible. Indeed \(y\) and \(pr\) are distinct multiples of \(r\) and hence differ by at least two. Minimality gives \(z=pr\), but both \(p\) and \(r\) are coprime to \(m\). If \(y\) ends an ascent, then \(z\) must be coprime to \(y\). The unused prime \(p\) is eligible unless \(y=p-1\) or \(p+1\). When eligible it forces \(z=p\), contradicting \(\g(z,m)>1\). In the exceptional cases \(y\) is even and \(z\) is odd. Bertrand's postulate \cite{bertrand} gives a prime \(p+2D\) is unused, coprime to \(y\), and at distance at least two from \(y\). Thus \(z\le r<3p\). The only positive odd multiple of \(p\) below \(3p\) is \(p\). This gives the same contradiction. We have proved that \(p\) ends a descent. The next term must be a distinct multiple of \(p\). The first possibility, \(2p\), is unused and is at distance \(p\) from \(p\), so it is selected. The resulting ascent forces \(\g(2p,m)>1\) by \eqref{eq:sign}. Since \(p>m\), we conclude \(2\mid m\). \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:a}] Keep the omitted \(m\) fixed. By Lemma~\ref{lem:even} every odd integer occurs. Let \(r>m\) be prime. Then \(r\) is odd, and all its powers occur. The large ones are descent endpoints by \eqref{eq:sign}. If any positive multiple \(v\) of \(r\) were absent, take such a power with both it and its successor greater than \(v+1\). Then \(v\) is an eligible smaller successor. It follows that every missing integer has all its prime factors at most \(m\). Write \(d=\pi(m)\), where \(\pi(x)\) counts primes at most \(x\). Unique factorization bounds the number of missing integers up to \(Y\ge2\) by \begin{equation} H(Y)=(1+\lfloor\log_2 Y\rfloor)^d . \label{eq:smooth} \end{equation} Indeed each of the \(d\) prime exponents lies between zero and \(\lfloor\log_2 Y\rfloor\). Every even \(a_i\) with \(i\ge N+1\) ends an ascent, since \(m\) is even. Its predecessor is smaller and odd. If the predecessor were even it too would end an ascent and the rule would require these even neighbors to be coprime. Distinct such \(a_i\) have distinct predecessors. For integer \(X>\max(m,a_1,\ldots,a_{N+1})\), a prime \(q\in(X,2X]\) occurs late, ends a descent by \eqref{eq:sign}, and has a distinct multiple of \(q\) as its successor. This successor is at least \(2q>2X\). Thus none of these primes can be the predecessor of an even term up to \(2X\). There are \(X\) even and \(X\) odd integers in \([1,2X]\). At least \(X-H(2X)-N\) evens in this interval occur at indices \(i\ge N+1\). Their odd predecessors must fit into at most \(X-(\pi(2X)-\pi(X))\) places. Consequently \begin{equation} \pi(2X)-\pi(X)\le N+H(2X). \label{eq:count} \end{equation} At \(X=2^{j-1}\) the right side is \(N+(1+j)^d\). Summing \eqref{eq:count} from a fixed sufficiently large \(j\) through \(k\) gives \(\pi(2^k)=O_m(k^{d+1})\). For completeness, the middle binomial coefficient satisfies \[ \frac{4^n}{2n+1}\le {2n\choose n}\le (2n)^{\pi(2n)} . \] The lower bound follows from summing the \(2n+1\) coefficients. For the upper bound each exponent of a prime \(p\) in \({2n\choose n}\) is \(\sum_{\ell\ge1}(\lfloor 2n/p^\ell\rfloor-2\lfloor n/p^\ell\rfloor)\). Each summand is at most one and vanishes for \(p^\ell>2n\), so the contribution of each prime is at most \(2n\). Setting \(2n=2^k\) gives \(k\pi(2^k)\ge 2^k-k-1\) for \(k\ge1\), contradicting the polynomial upper bound. Thus every positive integer occurs, and the rule gives distinctness. \end{proof} \section{A missing square in \seqB}\label{sec:b} For distinct \(u,v\), write \(L(u,v)\) if the smaller has a prime divisor which does not divide the larger. This condition must hold for any consecutive pair in an admissible sequence starting with positions \(2,3\) or later. Indeed the next term shares a prime with the smaller and is coprime to the larger by \eqref{eq:rule}. Shannon observed in the sequence entry that prime powers on a downward step constrain the next step, and that no prime can occur \cite{shanb}. We give the arguments used by the certificate. \begin{lemma}\label{lem:valley} In any admissible sequence a prime power at position \(j\ge3\) cannot be a strict local minimum. No prime occurs in an admissible sequence. \end{lemma} \begin{proof} Suppose four consecutive terms are \(x,p^e,y,z\) with \(e\ge1\) and \(x,y>p^e\). By the rule \(p\mid y\). The next application of the rule gives \(p\mid z\) and \(\g(y,z)=1\), a contradiction. For the second assertion, if a prime \(p\) occurred beyond the three seeds, it would divide the smaller of its two predecessors. Both predecessors are therefore at least \(p\), and distinctness makes both strictly larger. The next term must be a distinct positive multiple of \(p\), hence larger than \(p\) as well. This would make \(p\) a strict local minimum. \end{proof} \begin{certificate}\label{cert} There is an extendable prefix \(P\) of length \(477\) which is lexicographically least among all extendable prefixes of that length. Its maximum is \(963\), its last two terms are \(527,578\), and it contains all \(429\) positive nonprimes smaller than \(529\) while omitting \(529\). \end{certificate} \begin{proof} The following finite calculation specifies \(P\) from the three seeds. Write \(U\) for the set of entries already chosen and let \(a,b\) be the last two. Test \(v=1,\ldots,963\) in increasing order. Retain \(v\) only if \begin{enumerate} \item \(v\notin U\), \(R(a,b,v)\) and \(L(b,v)\). \item if \(v