\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}
\usepackage{bm}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}

\newcommand{\median}{\textnormal{median}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\NNzero}{\NN_0}
\newcommand{\ZZ}{\mathbb{Z}}
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\pos}{pos}

\begin{document}

\begin{center}
\includegraphics[width=4in]{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf Proofs of Ten Conjectures From the OEIS}
\vskip 1cm
\large
Sela Fried \\
Department of Computer Science \\
Israel Academic College in Ramat Gan\\
Pinhas Rutenberg 87\\
Ramat Gan \\
52275 Israel \\
\href{mailto:friedsela@gmail.com}{\tt friedsela@gmail.com} \\
\end{center}

\vskip .2 in

\begin{abstract}
In this work we settle ten conjectures recorded in the 
{\it On-Line Encyclopedia of Integer Sequences}. The results span combinatorics, number theory, and discrete geometry. Our proofs are elementary in spirit and mostly self-contained. We use techniques like combinatorial identities, parity and congruence arguments, generating functions, and elementary geometric and graph-theoretic reasoning. In several cases we also generalize or sharpen the original conjectures.
\end{abstract}

\section{Introduction}

The {\it On-Line Encyclopedia of Integer Sequences} (OEIS)~\cite{Sl} is an ever-growing indispensable resource for researchers across the mathematical sciences. It catalogs nearly 400{,}000 sequences, many of which are accompanied by conjectured formulas, recurrence relations, generating functions, or asymptotic descriptions. For instance, Stephan~\cite{SR} collected one hundred open conjectures from the OEIS, illustrating the vast potential for mathematical exploration contained in its entries. Continuing our work \cite{F}, we provide proofs to conjectures that encompass a broad spectrum of mathematical topics. Specifically, we address problems from the following areas:
\begin{enumerate}
\item The diagonal of $(1+x+y-z)^{n}(1+x-y+z)^{n}(1-x+y+z)^{n}$.
\item Triangular numbers near squares along the Beatty sequence $\lfloor n\sqrt2\rfloor$. 
\item The number of arithmetic progressions of the set $\{1,2,\ldots,n\}$.
\item The sum of the decimal digits.
\item The sum $\sum_{k=0}^{n}\binom{2n+1}{n+k-1}(-2)^{k}$ modulo $4$.
\item Parity, divisibility and the partition function.
\item The function $\bigl\lfloor \cot\bigl(\frac{\pi}{2m}\bigr)\bigr\rfloor$. 
\item Numbers of fixed length with a repeating decimal ratio.
\item Extremal positioning of cevians.
\item Intersection points, edges and regions in a two-fan polygonal construction. 
\end{enumerate}

We make use of the following notation. We let $\NN$ denote the set of natural numbers $\{1,2,\ldots\}$ and by $\ZZ$ the set of integers. We write $\NN_0$ for the set of nonnegative integers, i.e., $\NN_0=\NN\cup\{0\}$. Let $f(x) = \sum_{n=0}^\infty a_n x^n$ be a power series in the variable $x$ and with real coefficients $a_0,a_1,\ldots$. For $n\in\NN_0$, we set $[x^n] f(x) = a_n$. For $n\in\NNzero$, write $T_n=n(n+1)/2$ for the $n$th triangular number. For $n\in\NN$, set $[n]=\{1,2,\ldots,n\}$. If $A$ is a finite set, we let $\# A$ denote the number of elements in $A$. For a condition $c$, the indicator function $\mathbf{1}_c$ is equal to $1$ if $c$ holds and $0$ otherwise.

\section{Main results}

\subsection{A multivariate diagonal}

Let $n\in\NNzero$ and let 
\begin{align*}
a(n)& = \seqnum{A000172}(n) =\sum_{k=0}^n \binom{n}{k}^{3},\\
F_n(x,y,z)&=(1+x+y-z)^{n}(1+x-y+z)^{n}(1-x+y+z)^{n}.
\end{align*}
Bala conjectured the statement of Theorem \ref{1t1} (up to the missing factor $(-1)^n$) in \seqnum{A000172}. For the proof we need some preparation. First, recall Strehl's identity (e.g., \cite[(29)]{St}):

\begin{equation}\label{1est}
\sum_{k=0}^{n} \binom{n}{k}^{2}\binom{2k}{n}
=
\sum_{k=0}^{n} \binom{n}{k}^{3}.
\end{equation} Second, Gould \cite[(3.58)]{G} states the following combinatorial identity: for every $m\in\NNzero$, 
\begin{equation}\label{1egou}
\sum_{k=0}^{2n}(-1)^{k}\binom{2n}{k}\binom{2m-2n}{m-k}=(-1)^{n}\binom{m}{n}\frac{\binom{2m}{m}}{\binom{2m}{2n}}.
\end{equation}

\begin{lemma}\label{1l1}
Let $n\in\NNzero$. Then, for every two integers $r$ and $s$ such that $0\leq r\leq n$ and $0\leq s\leq 2r$, we have
\begin{equation}\label{1e10}
\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}\binom{2n-2r}{n-k}\binom{n-k}{n-2r+s}\binom{2r-k-s}{n-s}=(-1)^{n}\binom{n}{2r-n}\binom{2n-2r}{n-s}.
\end{equation}
\end{lemma}

\begin{proof}
We have 
\begin{align*}
\binom{n}{k}\binom{n-k}{n-2r+s}&=\binom{n}{n-2r+s}\binom{2r-s}{k},\\
\binom{2r-s}{k}\binom{2r-s-k}{n-s}&=\binom{2r-s}{n-s}\binom{2r-n}{k},\\
\binom{n}{n-2r+s}\binom{2r-s}{n-s}&=\binom{n}{2r-n}\binom{2n-2r}{n-s}.
\end{align*} Thus, the left-hand side of \eqref{1e10} is equal to
\begin{equation}\label{e20}
\binom{n}{2r-n}\binom{2n-2r}{n-s}\sum_{k=0}^{n}(-1)^{k}\binom{2r-n}{k}\binom{2n-2r}{n-k}.
\end{equation}
Now, $\binom{2r-n}{k}=0$ for $k>2r-n$ and $\binom{2n-2r}{n-k}=0$ for $n-k>2n-2r$. Thus, for $k\neq 2r-n$,
\[\binom{2r-n}{k}\binom{2n-2r}{n-k}=0.\] It follows that  
\[
\sum_{k=0}^{n}(-1)^{k}\binom{2r-n}{k}\binom{2n-2r}{n-k}=
\begin{cases}
(-1)^n, & \textnormal{if $n\leq 2r$};\\
0, & \textnormal{otherwise}.
\end{cases}
\] Notice that if $n>2r$ then $\binom{n}{2r-n}=0$ and we may therefore write
\[
\eqref{e20} = (-1)^{n}\binom{n}{2r-n}\binom{2n-2r}{n-s},
\] completing the proof.
\end{proof}







\begin{theorem}\label{1t1}
Let $n\in\NNzero$.
Then, 
\[
[x^{n}y^{n}z^{n}]F_n(x,y,z)=(-1)^n a(n).
\]
\end{theorem}

\begin{proof}
We have \[(1+x+y-z)(1+x-y+z)=(1+x)^2-(y-z)^2.\] Thus,
\begin{equation}\label{1e1}
(1+x+y-z)^n(1+x-y+z)^n
=\sum_{r=0}^n(-1)^r\binom{n}{r}(1+x)^{2n-2r}(y-z)^{2r}.
\end{equation}
Multiplying \eqref{1e1} by 
\[(1-x+y+z)^{n}=\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}x^{k}(1+y+z)^{n-k}\] and similarly expanding $(1+x)^{2n-2r}$, we extract $[x^n]$ and obtain 
\begin{equation}\label{1e2}
[x^{n}]F_{n}(x,y,z)=\sum_{r=0}^{n}\sum_{k=0}^{n}(-1)^{k+r}\binom{n}{k}\binom{n}{r}\binom{2n-2r}{n-k}(y-z)^{2r}(1+y+z)^{n-k}.  
\end{equation}
Expanding 
\[(1+y+z)^{n-k}=\sum_{j=0}^{n-k}\binom{n-k}{j}y^{j}(1+z)^{n-k-j}\] and similarly expanding $(y-z)^{2r}$, we extract $[y^n]$ from \eqref{1e2} and obtain 
\begin{align}
&[x^{n}y^{n}]F_{n}(x,y,z)\nonumber\\
&=\sum_{r=0}^{n}\sum_{k=0}^{n}\sum_{s=0}^{2r}(-1)^{r+k+s}\binom{n}{r}\binom{n}{k}\binom{2r}{s}\binom{2n-2r}{n-k}\binom{n-k}{n-2r+s}(1+z)^{2r-k-s}z^{s}.    \label{1e3}
\end{align} Extracting $[z^n]$ from \eqref{1e3} yields
\begin{align}
&[x^{n}y^{n}z^{n}]F_{n}(x,y,z)\nonumber\\
&=\sum_{r=0}^{n}\sum_{s=0}^{2r}(-1)^{r+s}\binom{n}{r}\binom{2r}{s}\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}\binom{2n-2r}{n-k}\binom{n-k}{n-2r+s}\binom{2r-k-s}{n-s}. \label{1e4}
\end{align} 
Using Lemma \ref{1l1} in \eqref{1e4} gives 
\begin{equation}\label{1e5}
[x^{n}y^{n}z^{n}]F_{n}(x,y,z)=(-1)^{n}\sum_{r=0}^{n}(-1)^{r}\binom{n}{r}\binom{n}{2r-n}\sum_{s=0}^{2r}(-1)^{s}\binom{2r}{s}\binom{2n-2r}{n-s}.
\end{equation} 
Using \eqref{1egou} in \eqref{1e5} gives 
\begin{align*}
[x^{n}y^{n}z^{n}]F_{n}(x,y,z)&=(-1)^{n}\sum_{r=0}^{n}\binom{n}{r}^{2}\binom{n}{2r-n}\frac{\binom{2n}{n}}{\binom{2n}{2r}}\\
&=(-1)^{n}\sum_{r=0}^{n}\binom{n}{r}^{2}\binom{2r}{n}\\
&=(-1)^n\sum_{r=0}^n\binom{n}{r}^3,
\end{align*} where the last equality is \eqref{1est}.
\end{proof}

\subsection{Triangular numbers near squares along the Beatty sequence \texorpdfstring{$\lfloor n\sqrt2\rfloor$}{}}

Let $n\in\NNzero$ and let 
$a_n=\seqnum{A001951}(n) = \lfloor n\sqrt2\rfloor$. 
Stephan conjectured the statement of the following theorem in \seqnum{A001951}.

\begin{theorem}\label{2t2}
Let $n\in\NNzero$. Then
\[
\min_{k\in\mathbb{Z}}|T_{a_n}-k^2|\leq \Bigl\lfloor\frac{a_n}{2}\Bigr\rfloor.
\]
\end{theorem}

\begin{proof}
It suffices to prove that  
\begin{equation}\label{2e1}
|T_{a_n}-n^2|\leq \Bigl\lfloor\frac{a_n}{2}\Bigr\rfloor.
\end{equation} To this end, set $\Delta=a_n(a_n+1)-2n^2$. Thus,
$|T_{a_n}-n^2|=|\Delta|/2$. It suffices to prove that $|\Delta|\leq a_n$. Indeed, this implies $|\Delta|/2\leq a_n/2$ which, since $|\Delta|/2$ is an integer, implies \eqref{2e1}. We distinguish between two cases.
\begin{enumerate}
\item $\Delta\geq0$. Since $a_n\leq n\sqrt2$, we have $a_n^2\leq 2n^2$. Thus,
\[
0\leq \Delta=a_n^2+a_n-2n^2\leq a_n\Longrightarrow |\Delta|\leq a_n.
\]
\item $\Delta<0$. Since $a_n>n\sqrt2-1$,
\[
a_n^2+a_n>(n\sqrt2-1)^2+(n\sqrt2-1)=2n^2-n\sqrt2.
\]
Therefore $-\Delta <n\sqrt2$. Since $-\Delta$ is an integer, we have \[0<-\Delta\leq a_n\Longrightarrow |\Delta|\leq a_n.\qedhere\] 
\end{enumerate} 
\end{proof}

\begin{remark}
The bound in Theorem \ref{2t2} is attained infinitely often. Indeed, 
\[
\frac{|\Delta|}{2}=\Bigl\lfloor\frac{a_n}{2}\Bigr\rfloor\iff 
\begin{cases}
a_{n}^{2}=2n^{2}-1, & \textnormal{if $\Delta\geq 0$ and $a_n$ is odd};\\
a_{n}^{2}=2n^{2}, & \textnormal{if $\Delta\geq 0$ and $a_n$ is even};\\
(a_{n}+1)^{2}=2n^{2}+2,&\textnormal{if $\Delta< 0$ and $a_n$ is odd};\\
(a_{n}+1)^{2}=2n^{2}+1,&
\textnormal{if $\Delta< 0$ and $a_n$ is even}.
\end{cases}
\]
We now prove that the first case occurs for infinitely many values of $n$. It is well known (e.g., \cite[p.~253]{Be}) that the negative Pell equation
$x^2-2y^2=-1$ has infinitely many integer solutions given by
\begin{align*}
x	&=\frac{(1+\sqrt{2})^{2m-1}+(1-\sqrt{2})^{2m-1}}{2},\\
y	&=\frac{(1+\sqrt{2})^{2m-1}-(1-\sqrt{2})^{2m-1}}{2\sqrt{2}},
\end{align*} where $m\in\NN$. Let $x$ and $y$ be of this form. Clearly, $x+y\sqrt2=(1+\sqrt2)^{2m-1}>1$. Factoring the Pell equation gives
\[
0<y\sqrt2-x=\frac{1}{x+y\sqrt2}<1.
\]
In particular, $\lfloor y\sqrt2\rfloor=x$. Let $n=y$. Then $a_n=\lfloor n\sqrt2\rfloor=x\geq 1$, and
\[
a_n^2-2n^2=x^2-2y^2=-1.
\]
It follows that
\[
\Delta=a_n(a_n+1)-2n^2=(a_n^2-2n^2)+a_n=a_n-1\ge0.
\]
Finally, $x$ is odd, since $x^2 = 2y^2-1$.
\end{remark}

\subsection{On the number of arithmetic progressions of \texorpdfstring{$[n]$}{}}

Let $n\in\NNzero$ and let \[a(n)=\seqnum{A006218}(n)=\sum_{k=1}^n\Bigl\lfloor\frac{n}{k}\Bigr\rfloor.\] Let $b(n)=\seqnum{A078567}(n)$, defined to be the number of arithmetic progressions of $[n]$ of length $\geq 2$. Sloane conjectured the statement of the following theorem in \seqnum{A006218}.

\begin{theorem}
Let $n\in\NN$. Then
\[
b(n)=\sum_{m=0}^{n-1} a(m).
\]
\end{theorem}

\begin{proof}
An arithmetic progression of $[n]$ of length $\ell\ge 2$ is determined by its first term $x\in[n-1]$ and by the difference $d\in[n-1]$. Now, the elements of the arithmetic progression
\[
x, x+d, x+2d, \ldots, x+(\ell-1)d
\]
all belong to $[n]$ if and only if \begin{equation}\label{3e10}
x+(\ell-1)d\leq n \iff (\ell-1)d\le n-x.
\end{equation} For a fixed $x$, the number of pairs $(\ell-1,d)\in\NN\times\NN$ that satisfy \eqref{3e10} is equal to
\begin{equation}\label{3e20}
\sum_{d=1}^{n-x}\Bigl\lfloor\frac{n-x}{d}\Bigr\rfloor
=a(n-x).
\end{equation}
Summing \eqref{3e20} over $x=1,\ldots,n-1$ gives
\[
b(n)=\sum_{x=1}^{n-1}a(n-x)=\sum_{m=1}^{n-1} a(m).
\] Since $a(0)=0$, the assertion follows.
\end{proof}

\subsection{On the sum of the decimal digits}

Let $n\in\NN$ and let $a(n)=\seqnum{A007953}(n)$, defined to be the sum of the decimal digits of $n$. Let $S(n)$ be the strictly increasing sequence of the distinct integers obtained by inserting a single
decimal digit $x\in\{0,1,\dots,9\}$ at any position between the digits of $n$, a leading $0$ is prohibited. For example,
\[S(8)=(18,28,38,48,58,68,78,80,81,82,83,84,85,86,87,88,89,98).\]
Let $\pos(n)$ be the index of the number $10n$ in $S(n)$. For example, $\pos(8)=8$. Marcus conjectured the statement of the following theorem in \seqnum{A007953}.

\begin{theorem}
Let $n\in\NN$. Then $\pos(n) = a(n)$.
\end{theorem}

\begin{proof}
Suppose that $n$ consists of $m\in\NN$ digits and write $n$ as $d_{m-1}d_{m-2}\cdots d_0$ with $d_{m-1}\neq 0$.
Notice that $10n$ has decimal expansion $d_{m-1}d_{m-2}\cdots d_00$, i.e., we obtain it by appending the digit $0$ at the end of $n$. In particular, $10n\in S(n)$ and $\pos(n)$ is well-defined. 
Let $j$ be an integer with $0\leq j\leq m-1$ and consider the insertion of a digit $x$ immediately to the left of $d_j$. Let $n(x,j)$ denote the resulting number and notice that we are only interested in the numbers $n(x,j)$ with $n(x,j)<10n$. To determine whether $n(x,j)<10n$, write the two numbers $10n$ and $n(x,j)$ as follows:
\[
\begin{array}{cccccccccc}
10n: & d_{m-1}  & \cdots&d_{j+1} & d_{j} & d_{j-1} & \cdots & d_1 & d_0 & 0\\[4pt]
n(x,j): &
d_{m-1} & \cdots&d_{j+1} & x & d_{j} & d_{j-1} & \cdots & d_1 & d_0
\end{array}
\]
There are three possibilities:
\begin{enumerate}
\item [(a)] $x<d_j$. Then $n(x,j)<10n$.
\item [(b)] $x>d_j$. Then $n(x,j)>10n$.
\item [(c)] $x=d_j$. Set $d_{-1}=0$, and define $i$ to be the largest integer with $0\le i\le j$ such that $d_i\neq d_{i-1}$. If no such index exists, then $n(x,j)=10n$. Assume that such an index does exist.
\[
\begin{array}{cccccccccccc}
10n: &
d_{m-1} & \cdots & d_{j+1} & d_j & d_{j-1} & \cdots     & d_{i-1} & \cdots & d_1 &d_0 & 0
\\[4pt]
n(x,j): & d_{m-1} & \cdots & d_{j+1} & x & d_j & \cdots  &  d_i  & d_{i -1} & \cdots &d_1& d_0 
\end{array}
\] If $d_i >d_{i-1}$, then $n(x,j)>10n$. If $d_i <d_{i-1}$, then, necessarily, $i>0$, and $n(x,j)=n(d_i, i-1)$, i.e., the number $n(x,j)$ is equal to a number corresponding to the case (a) with index $i-1$.
\end{enumerate}

It follows that, for each integer $j$ with $0\le j\le m-1$, exactly the insertion of the digits
$0,1,\ldots,d_j-1$ results in
numbers $< 10n$, with the exception of the digit $0$, if $j=m-1$. Notice that inserting a digit to the right of $d_0$ always results in a number $\geq 10n$.

We claim that the numbers obtained in case (a), for different values of $j$, are all distinct. Indeed, let $i$ and $j$ be two integers with $0\leq i<j\leq m-1$, and let $x,y\in\{0,1,\ldots,9\}$ satisfy $x<d_j$ and $y<d_i$. Write $n(x,j)$ and $n(y,i)$ as follows:
\[
\begin{array}{cccccccccccc}
n(x,j): & d_{m-1} & \cdots & d_{j+1} & \bm{x}   & d_j    & \cdots & d_{i+1} & d_i & \cdots & d_0 \\[4pt]
n(y,i): & d_{m-1} & \cdots & d_{j+1} & \bm{d_j} & \cdots & d_{i+1} & y   & d_i & \cdots & d_0
\end{array}
\] Thus, $n(x,j)$ and $n(y,i)$ differ at index $j$ (the bold digits) and are therefore distinct. It follows that the number of numbers $<10n$ equals
\[
d_{m-1}-1 + \sum_{j=0}^{m-2} d_j = \sum_{j=0}^{m-1} d_j-1=a(n)-1.
\] Thus, $\pos(n)=a(n)-1+1=a(n)$ and the proof is complete.
\end{proof}

\subsection{On a certain sum modulo \texorpdfstring{$4$}{}}

Let $n\in\NNzero$ and
let $a(n)=\seqnum{A026641}(n)$, defined to be the number of nodes of even outdegree (including leaves) in all ordered trees with $n$ edges. Bala conjectured the statement of the following theorem in \seqnum{A026641}. 

\begin{theorem}
Let $n\in\NNzero$ and assume that $a(n)$ is odd. Then $a(n)\equiv 1 \pmod{4}$.
\end{theorem}

\begin{proof}
According to a formula of Bala,
\begin{equation}\label{5e1}
a(n)=\sum_{k=0}^{n}\binom{2n+1}{n+k+1}(-2)^k.
\end{equation} Furthermore, Bala stated that $a(n)$ is odd if and only if $n=2^k - 1$ for some $k\in\NNzero$. Thus, we consider $n$ of this form. Notice that, if $k=0$, then $n=0$ and the assertion holds trivially. Thus, we assume that $k\geq 1$. Reducing \eqref{5e1} modulo $4$, we obtain
\begin{equation}
a(n)\equiv \binom{2n+1}{n+1}-2\binom{2n+1}{n+2}\pmod 4.
\end{equation} 
Thus, it suffices to prove that 
\begin{align}
\binom{2n+1}{n+1}&\equiv 3\pmod{4},\label{5e2}\\
\binom{2n+1}{n+2}&\equiv 1 \pmod{4}.\label{5e3}
\end{align} We have,
\[
\binom{2n+1}{n+1}=\binom{2^{k+1}-1}{2^k}
=\prod_{j=1}^{2^k-1}\frac{2^k+j}{j}.
\] Write each integer $j$ with $1\leq j\leq 2^k-1$ as $j=2^{\ell_j}u_j$, where $0\leq \ell_j\leq k-1$ and $u_j$ is odd. Thus,
\[
\binom{2n+1}{n+1}=\frac{\prod_{j=1}^{2^{k}-1}(2^{k-\ell_{j}}+u_{j})}{\prod_{j=1}^{2^{k}-1}u_{j}}.\]
The denominator $\prod_{j=1}^{2^k-1}u_j$ is odd and therefore invertible modulo $4$. Hence,
\[
P \equiv \Biggl(\prod_{j=1}^{2^{k}-1}(2^{k-\ell_j}+u_j)\Biggr)\Biggl(\prod_{j=1}^{2^{k}-1}u_j\Biggr)^{-1}\pmod{4}.
\] Now, if $k-\ell_j\ge 2$, then $2^{k-\ell_j}+u_j\equiv u_j\pmod{4}$. On the other hand, $k-\ell_j=1$ if and only if $j=2^{k-1}$ (i.e., $u_j=1$) and therefore, for this $j$, $2^{k-\ell_j}+u_j\equiv 3\pmod{4}$. This proves \eqref{5e2}.

We now prove \eqref{5e3}. If $k=1$, then the identity holds trivially. Assume that $k\geq 2$. We have
\begin{equation}\label{5e5}
(n+2)\binom{2n+1}{n+2}=n\binom{2n+1}{n+1}.\end{equation} Furthermore, $n=2^k-1\equiv 3 \pmod 4$ and $n+2=2^k+1\equiv 1 \pmod 4$. Reducing \eqref{5e5} modulo $4$ and using \eqref{5e2} we obtain
\[\binom{2n+1}{n+2}\equiv 3\binom{2n+1}{n+1} \equiv 3\cdot 3 \equiv 1 \pmod 4,\] as asserted. \qedhere
\end{proof}

\subsection{Parity, divisibility and the partition function}

Let $n\in\NNzero$ and let $p(n)=\seqnum{A000041}(n)$, defined to be the number of partitions of $n$. Let $a(n) =\seqnum{A305123}(n)$, which is defined by a generating function, i.e.,  
\[
\sum_{n= 0}^\infty a(n)x^n =\Biggl(\sum_{k=1}^\infty\frac{x^{2k-1}}{1+x^{2k-1}}\Biggr) \Biggl(\prod_{k=1}^\infty\frac{1}{1-x^k}\Biggr).
\] 
Let $m\in\NN$ and let
\[
b_m(n)=\sum_{k=1}^{n} k^{2m+1}p(k)p(n-k).
\] Bala and Somos conjectured the statements of the following theorem in \seqnum{A067567}.
\begin{theorem} Let $n\in\NN$. Then
\begin{enumerate}
\item [(a)] If $n$ is odd, then $n\mid b_m(n)$.
\item [(b)] Let $q=b_m(2n)/n$. Then $q$ is an integer. Furthermore, $q$ is odd if and only if both $n$ and $p(n)$ are odd. 
\item [(c)] $a(n)$ is odd if and only if both $n$ and $p(n)$ are odd.
\item [(d)] Let 
\[
c(n)=2\Biggl(\frac{b_1(n)}{n}-\Biggl\lfloor\frac{b_1(n)}{n}\Biggr\rfloor\Biggr). 
\] Then $c(n)=1$ if and only if $n$ is even and both $n/2$ and $p(n/2)$ are odd.
\end{enumerate}    
\end{theorem}

\begin{proof}
Set $r=2m+1$. 
\begin{enumerate}
\item [(a)] Let $k$ be an integer such that $1\leq k\leq n-1$. Since $r$ is odd, \[(n-k)^{r}\equiv (-k)^r+\sum_{j=1}^r\binom{r}{j}n^j(-k)^{r-j}\equiv (-k)^{r}\equiv -k^{r}\pmod n.\] Thus,
\begin{equation}\label{6l1}
k^{\,r}+(n-k)^{\,r}\equiv 0 \pmod{n}.
\end{equation} 
We consider now the summands of $b_m(n)$. The $n$th summand is of the form $n^rp(n)$, which is divisible by $n$. Now, since $n$ is odd, we may pair each integer $k$ satisfying $1\le k\le (n-1)/2$ with $n-k$. The $k$th and $(n-k)$th summands have the form 
$k^rp(k)p(n-k)$ and $(n-k)^rp(n-k)p(k)$, respectively. Their sum is 
\[
(k^r+(n-k)^r)p(k)p(n-k),
\] which, by \eqref{6l1}, is divisible by $n$. It follows that 
\begin{align*}
b_m(n)&=\sum_{k=1}^{n} k^{2m+1}p(k)p(n-k)\\
&=n^rp(n)+\sum_{k=1}^{\frac{n-1}{2}} (k^r+(n-k)^r)p(k)p(n-k)
\end{align*}
is divisible by $n$, as asserted.

\item [(b)] Let $k$ be an integer such that $1\leq k\leq n-1$. Since $r$ is odd, \[(2n-k)^{r}\equiv (-k)^r+\sum_{j=1}^r\binom{r}{j}(2n)^j(-k)^{r-j}\equiv (-k)^{r}\equiv -k^{r}\pmod {2n}.\] Thus,
\begin{equation}\label{6l2}
k^r+(2n-k)^r \equiv 0 \pmod{2n}.
\end{equation} 
We consider now the summands of $b_m(2n)$. The $2n$th summand is of the form $(2n)^rp(2n)$, which is divisible by $2n$. The $n$th summand is of the form $n^rp^2(n)$, which is divisible by $n$. Now, we pair each integer $k$ satisfying $1\leq k\leq n/2-1$ with $2n-k$. The $k$th and $(2n-k)$th summands have the form 
$k^rp(k)p(2n-k)$ and $(2n-k)^rp(2n-k)p(k)$, respectively. Their sum is 
\[
(k^r+(2n-k)^r)p(k)p(2n-k),
\] which, by \eqref{6l2}, is divisible by $2n$. It follows that 
\begin{align*}
b_m(2n)&=\sum_{k=1}^{2n} k^{2m+1}p(k)p(2n-k)\\
&=n^rp^2(n)+(2n)^rp(2n)+\sum_{k=1}^{\frac{n}{2}-1} (k^r+(2n-k)^r)p(k)p(2n-k)
\end{align*}
is divisible by $n$, as asserted. Thus, $q=b_m(2n)/n$ is an integer. From our observations it follows that the parity of $q$ is equal to the parity of $n^{r-1}p^2(n)$. Since $r\geq 3$, the parity of the latter is $n^{r-1}p^2(n)$ is even if and only if at least one of $n$ and $p(n)$ is even. Equivalently, $n^{r-1}p^2(n)$, and therefore also $q$, is odd if and only if both $n$ and $p(n)$ are odd, as asserted.

\item [(c)] Set \[P(x) = \prod_{k=1}^\infty\frac{1}{1-x^k}.\] It is well known (e.g., \cite[(1.77)]{Stan}), that $P(x) = \sum_{n\geq 0}p(n)x^n$. Now, set
\[Q(x)=\sum_{k=1}^\infty\frac{x^{2k-1}}{1+x^{2k-1}}\] and notice that 
\[Q(x) \equiv \sum_{m=1}^\infty\frac{mx^{m}}{1-x^{m}} \pmod 2.\] But 
\begin{align*}
\sum_{m=1}^\infty\frac{mx^{m}}{1-x^{m}}&=x\frac{d}{dx}\Biggl(-\sum_{m=1}^\infty\log(1-x^{m})\Biggr)\\
&=x\frac{d}{dx}\log(P(x))\\
&=x\frac{P'(x)}{P(x)}.
\end{align*} It follows that
\begin{align*}
\sum_{n=0}^\infty a(n)x^n &= Q(x)P(x)\\
&\equiv x\frac{P'(x)}{P(x)}P(x)\\
&=xP'(x)\\
&=\sum_{n= 0}^\infty np(n)x^n\pmod 2.
\end{align*} Comparing coefficients, we conclude that $a_n$ and $np(n)$ have the same parity, proving the assertion. 

\item [(d)] Assume that $c(n)=1$. Then $b_1(n)/n$ is not an integer. By part (a), $n$ is even, i.e., $n=2k$ for some $k\in\NN$. By part (b), $k\mid b_1(n)$.
Set $q=b_1(n)/k$. Then, 
\[
1=c(n)=2\Bigl(\frac{q}{2}-\Bigl\lfloor\frac{q}{2}\Bigr\rfloor\Bigr),
\]
meaning that $q$ is odd. By part (b) $k=n/2$ and $p(k)=p(n/2)$ are both odd.

Conversely, assume that $n$ is even and that both $n/2$ and $p(n/2)$ are odd. By part (b), $q = 2b_1(n)/n$ is odd. It follows that 
\begin{align*}
c(n)&=2\Biggl(\frac{b_{1}(n)}{n}-\Biggl\lfloor \frac{b_{1}(n)}{n}\Biggr\rfloor \Biggr)\\
&=2\Biggl(\frac{b_{1}(n)}{n}-\frac{1}{2}\Biggl(\frac{2b_{1}(n)}{n}-1\Biggr)\Biggr)\\
&=1.    \qedhere
\end{align*}
\end{enumerate}
\end{proof}

\subsection{On the floor of a cotangent function}

For $m\in\ZZ\setminus\{0\}$ let
\[
f(m)=\Bigl\lfloor \cot\Bigl(\frac{\pi}{2m}\Bigr)\Bigr\rfloor.
\] Let $n\in\NN$ and let $a(n) = \seqnum{A223577}(n)$, defined to be the sequence obtained by ordering the set 
\begin{equation}\label{7e1}
\{k\in\NN \;:\; \exists! \ m\in\NN\setminus\{1\} \textnormal{ with } -k = f(-m)\}.
\end{equation} Let $b(n) = \seqnum{A223578}(n)$, defined to be the sequence obtained by ordering the set 
\begin{equation}\label{e2}
\{k\in\NN\setminus\{1\} \;:\; f(-k-1)<f(-k)<f(-k+1)\}.
\end{equation} Jeffery conjectured the statement of Theorem \ref{7t1} in \seqnum{A223577}. For the proof we need some preparation. First, for $m\in\ZZ\setminus\{0\}$, let
\[
g(m)=\Bigl\lceil \cot\Bigl(\frac{\pi}{2m}\Bigr) \Bigr\rceil.
\] Using that the cotangent function is odd and that $\lfloor -x\rfloor=-\lceil x\rceil$, for every real $x$, we have
\[
f(-m)=\Bigl\lfloor \cot\Bigl(-\frac{\pi}{2m}\Bigr)\Bigr\rfloor
=\Bigl\lfloor -\cot\Bigl(\frac{\pi}{2m}\Bigr)\Bigr\rfloor
=-\Bigl\lceil \cot\Bigl(\frac{\pi}{2m}\Bigr) \Bigr\rceil =-g(m).
\] Thus, we may write 
\begin{align}
\eqref{7e1}&= \{k\in\NN \;:\; \exists!\ m\in\NN\setminus\{1\} \textnormal{ with } k = g(m)\},\label{7e11}\\
\eqref{e2}&= \{k\in\NN\setminus\{1\} \;:\; g(k-1)<g(k)<g(k+1)\}.\label{7e10}
\end{align}

\begin{lemma}\label{7l010}
The sequence $(g(m))_{m\in\NN}$ is nondecreasing and, for each $m\in\NN$, we have $g(m+1)-g(m)\in\{0,1\}$. Moreover, each $n\in\NN$ occurs either once or twice among the values of $(g(m))_{m\in\NN}$.
\end{lemma}

\begin{proof}
The function $m\mapsto \cot(\frac{\pi}{2m})$ is strictly increasing on $\NN$. Thus, the sequence $(g(m))_{m\in\NN}$ is nondecreasing. The mean value theorem shows that \[\cot\Biggl(\frac{\pi}{2(m+1)}\Biggr)-\cot\Bigl(\frac{\pi}{2m}\Bigr)\leq 1.\] It follows that $g(m+1)-g(m)\in\{0,1\}$. 
Now, we have
\begin{align*}
g(m)=n &\iff n-1< \cot\Bigl(\frac{\pi}{2m}\Bigr)\le n
\\
&\iff \frac{\pi}{2\arccot(n-1)}< m \le \frac{\pi}{2\arccot(n)}.
\end{align*}
The mean value theorem shows that     
\[\frac{4}{\pi}\leq\frac{\pi}{2\arccot(n)} -\frac{\pi}{2\arccot(n-1)}\leq\frac{\pi}{2},\] and therefore, for a given $n$, there is at least one, but at most two, corresponding values $g(m)$.
\end{proof}

For $n\in\NN$, let $\textnormal{mult}(n)$ denote the number of occurrences of $n$ in $(g(m))_{m\in\NN}$. By Lemma~\ref{7l010}, $\textnormal{mult}(n)\in\{1,2\}$. We
refer to $n$ as a singleton if $\textnormal{mult}(n)=1$. Notice that, by \eqref{7e11}, the sequence $(a(n))_{n\in\NN}$ is actually the sequence of all singletons. Let $s(n)$ be the number of singletons in the set $[n]$.

\begin{lemma}\label{7L210}
Let $r\in\NN$. Then
\[
\#\{m\in\NN\setminus\{1\}\;:\; g(m)\le r\}=2r-s(r).
\]
\end{lemma}

\begin{proof}
We have
\[
\#\{m\in\NN\setminus\{1\}\; :\; g(m)\leq r\}
=\sum_{j=1}^r \textnormal{mult}(j)
= s(r)\cdot 1 + (r-s(r))\cdot 2
=2r-s(r). \qedhere
\]
\end{proof}

\begin{lemma}\label{7l901}
Let $r\in\NN$ and let $m\in\NN\setminus\{1\}$. Then $r$ is a singleton and $m$ is the unique number satisfying $g(m)=r$ if and only if
\begin{equation}\label{e18}
g(m-1)=r-1,\; g(m)=r,  \textnormal{ and } g(m+1)=r+1.
\end{equation} \end{lemma}

\begin{proof}
By the first statement of Lemma \ref{7l010}, the sequence $(g(n))_{n\in\NN}$ is nondecreasing. Thus 
\[g(m-1) \leq g(m)\leq  g(m+1).\]
Since $r$ is a singleton and $g(m)=r$, necessarily,
$g(m-1)<r< g(m+1)$. Using the second statement of Lemma~\ref{7l010}, we obtain $g(m-1)=r-1$ and $g(m+1)=r+1$, proving \eqref{e18}. 
Conversely, assume that \eqref{e18} holds. Since $(g(n))_{n\in\NN}$ is nondecreasing, 
$g(\ell)\geq r+1$ for every integer $\ell$ with $\ell \geq m+1$, and $g(\ell)\leq r-1$ for every integer $\ell$ with $1\leq \ell \leq m-1$. In particular, $g(\ell)=r$ if and only if $\ell=m$ and hence $r$ is a singleton. 
\end{proof}

\begin{theorem}\label{7t1}
Let $n\in\NN$. Then
\[
a(n)=\frac{b(n)+n-1}{2}.
\]
\end{theorem}
\begin{proof}
Let $r=a(n)$. Then $r$ is the $n$th singleton and therefore $s(r)=n$. Let $m\geq 2$ be the unique integer satisfying $g(m)=r$. We claim that $b_n=m$. Indeed, by \eqref{7e10}, the sequence $(b(n))_{n\in\NN}$ consists of numbers $m\geq 2$ such that $g(m-1)<g(m)<g(m+1)$. By Lemma \ref{7l901}, each such $m$ corresponds to a singleton and vice versa. Thus, if $r$ is the $n$th singleton, this means that $m$ belongs to the sequence $(b(n))_{n\in\NN}$, and, second, that $n-1$ singletons precede $r$. These, in turn, correspond to $n-1$ values preceding $m$, which therefore must be the $n$th element of $(b(n))_{n\in\NN}$. Now, since the sequence $(g(n))_{n\in\NN}$ is nondecreasing, we have 
\[\{\ell\in\NN\setminus\{1\} \; :\; g(\ell)\leq r\} = \{2,3,\ldots,m\}.\] Furthermore, using Lemma~\ref{7L210},
\begin{align*}
b(n) - 1 &= m-1    \\
&=\#\{2,3,\ldots,m\}\\
&=\#\{\ell\in\NN\setminus\{1\} \; :\; g(\ell)\leq r\}\\
&=2r-s(r)\\
&=2r-n.
\end{align*} Solving for $r=a(n)$ yields the assertion.
\end{proof}

\subsection{Numbers of fixed length with a repeating decimal ratio}

For $n\in\NN$, let $a(n)=\seqnum{A285273}(n)$, defined to be the number of $x\in\NN$ satisfying the following two conditions:
\begin{enumerate}
\item [(1a)] $x$ has exactly $n+1$ decimal digits.
\item [(1b)] There exists $k\in\NN$ with
\begin{equation}\label{8e1}
x \leq k < 2x
\quad\textnormal{and}\quad
\frac{k}{x}
=1 + \frac{x - 10^n}{10^n-1}.
\end{equation}
\end{enumerate} Kilfiger
conjectured in \seqnum{A285273} that, for every $n\in\NN$, $a(n)$ is a power of $2$. In the following theorem we prove a stronger result. We use the function $\omega(m)$ that counts the number of distinct prime factors of $m\in\NN$ (e.g., \cite[Exercise 20 on p.~111]{B}).

\begin{theorem}
Let $n\in\NN$. Then
$a(n) = 2^{\omega(10^n-1)}$. \end{theorem}

\begin{proof}
Set
$N=10^n$ and $M=N-1$. Solving the second equality in \eqref{8e1} for $k$ gives 
\begin{equation}\label{8e2}
  k = \frac{x(x-1)}{M}.
\end{equation}
Thus, we reformulate the two conditions above and determine the number of $x\in \ZZ$ satisfying the following two conditions:
\begin{enumerate}
\item [(2a)] $N \le x < 10N$.
\item [(2b)] $M \mid x(x-1)$ and
$1 \leq (x-1)/M < 2$.  
\end{enumerate} We notice that 
$1 \leq (x-1)/M$ if and only if $x \geq N$, a condition already required in (2a). Furthermore, 
$(x-1)/M < 2$ if and only if $x \leq 2M$. Since $2M<10N$, we can further simplify the two conditions to obtain
\begin{enumerate}
\item [(3a)] $N \leq x \leq 2M$.
\item [(3b)] $M \mid x(x-1)$.
\end{enumerate}

We now translate the problem into the language of congruences.
Write $x = N + t$ with $0 \leq t \leq M-1$. Since $N \equiv 1 \pmod{M}$, we have $x-1 \equiv t \pmod{M}$. It follows that 
$M \mid x(x-1)$ if and only if $t(t+1) \equiv 0 \pmod{M}$. It follows that the mapping $x\mapsto t$ is a bijection between the set of numbers $x\in\NN$ satisfying the two conditions and the set 
\[T=\{
0\leq t\leq M-1 \;:\; t(t+1)\equiv0\pmod{M}
\}.
\]
To calculate $\#T$, write
\[
M=\prod_{i=1}^{\omega(M)} p_i^{e_i},
\]
where $p_1,\dots,p_{\omega(M)}$ are distinct primes and $e_1,\ldots,e_{\omega(M)}\in\NN$. Let $i$ be an integer with $1\leq i\leq \omega(M)$. Since $\gcd(t,t+1)=1$ for every $t\in\NNzero$,  
\begin{align*}
p_i^{e_i} \mid t(t+1)&\iff p_i^{e_i}\mid t\quad \textnormal{or}\quad  p_i^{e_i}\mid t+1\\
&\iff t \equiv 0 \pmod{p_i^{e_i}}
\quad\textnormal{or}\quad
t \equiv -1 \pmod{p_i^{e_i}}.
\end{align*} By the Chinese Remainder Theorem (e.g., \cite[Theorem 4.8]{B}), every choice of one of the two congruences for each $p_i^{e_i}$
yields a unique residue class modulo $M$, and every solution of $t(t+1)\equiv0\pmod{M}$ arises in this way. It follows that the number of distinct solutions modulo $M$ is $2^{\omega(M)}$.
\end{proof}

\subsection{Extremal positioning of cevians}

Let $n\in\NNzero$ and let 
\begin{align*}
a(n)&=\seqnum{A007980}(n)=\Biggl\lceil \frac{(n+1)(n+2)}{3}\Biggr\rceil,\\
b(n)&=\seqnum{A000212}(n)=\Biggl\lfloor\frac{n^2}{3}\Biggr\rfloor.
\end{align*}

Zakharov conjectured the statements of the two following theorems in \seqnum{A007980} and \seqnum{A000212}. These statements relate the two sequences to a question regarding an extremal positioning of cevians. Recall that a cevian is a line segment joining a vertex of a triangle with a point on the opposite side of the triangle, such that the line does not coincide with any side of the triangle (e.g., \cite[Definition 2.3.4]{E}).

\begin{theorem}\label{9t1}
Let $n\in \NNzero$. Then the maximum number of regions a triangle can be cut into by $n$ cevians is $a(n)=\lceil (n+1)(n+2)/3\rceil$.
\end{theorem}

\begin{proof}
Let $ABC$ be a non-degenerate triangle. Let $a,b,c\in\NNzero$ with $a+b+c=n$ be the numbers of cevians emanating from $A,B,C$, respectively. 
Clearly, it suffices to consider only cevian configurations that satisfy the following conditions:
\begin{enumerate}
\item All cevians emanating from a vertex are pairwise distinct.
\item No three cevians intersect in the same point.
\end{enumerate} Indeed, any violation of these conditions may be removed by sufficiently small perturbation of an endpoint without decreasing the number of regions. Thus, every cevian emanating from one of the vertices intersects all cevians emanating from the other two vertices. Therefore, the total number of intersections is $ab+ac+bc$.

Draw the $n$ cevians one at a time and suppose we have already drawn $i-1$ cevians and that the $i$th cevian we now draw intersects the $i-1$ cevians at $t_i$ points. This means that the number of regions is now increased by $t_i+1$. Starting with zero cevians and one region (the whole triangle), after drawing all $n$ cevians, the number of regions is 
\[1+\sum_{i=1}^n (t_i+1)=1+n+\sum_{i=1}^n t_i.\] Now, each intersection point involves exactly two cevians, and we  count it exactly once in $\sum_i t_i$, namely, when the later of the two cevians in the pair is drawn. Hence $\sum_{i=1}^n t_i=ab+ac+bc$. It follows that the total number of regions equals
\begin{equation}\label{9e651}
1+n+ab+ac+bc.    
\end{equation} Thus, maximizing \eqref{9e651} is equivalent to maximizing $ab+ac+bc$ and since
\[
ab+ac+bc=\frac{(a+b+c)^2-(a^2+b^2+c^2)}{2}
=\frac{n^2-(a^2+b^2+c^2)}{2}, 
\] maximizing \eqref{9e651} is equivalent to minimizing $a^2+b^2+c^2$. It follows that we need to solve the following integer optimization problem:
\[
\begin{array}{ll}
\text{minimize} & a^2+b^2+c^2\\
\text{subject to} & a+b+c=n,\\
& a,b,c\geq 0.
\end{array}
\]
We claim that the minimum occurs when $a,b,c$ are as equal as possible, i.e., when $|a-b|,|a-c|,|b-c|\leq 1$. Indeed, suppose that $a\geq b+2$. Then 
\begin{align*}
(a-1)^{2}+(b+1)^{2}+c^2-(a^{2}+b^{2}+c^2)&=a^{2}-2a+1+b^{2}+2b+1-a^{2}-b^{2}\\
&=2(b-a)+2\\&\leq 2\cdot(-2)+2\\
&=-2.    
\end{align*} Thus, replacing $a$ and $b$ with $a-1$ and $b+1$, respectively, strictly decreases $a^2 +b^2 +c^2$. Iterating the process leads to absolute differences that are $\leq 1$.

Thus, with $n=3q+r$ where $r\in\{0,1,2\}$, there are three possibilities for $a,b$, and $c$, namely 
\begin{equation}\label{9e32}
(a,b,c)=
\begin{cases}
(q,q,q), & \textnormal{if $r=0$};\\
(q,q,q+1), & \textnormal{if $r=1$};\\
(q,q+1,q+1), & \textnormal{if $r=2$}.
\end{cases}
\end{equation}
Substituting these in \eqref{9e651} gives 
\[
\begin{cases}
3q^2+3q+1, & \textnormal{if $r=0$};\\
3q^2+5q+2, & \textnormal{if $r=1$};\\
3q^2+7q+4, & \textnormal{if $r=2$}.
\end{cases}
\]
It is straightforward to verify that all values are equal to $\lceil (n+1)(n+2)/3\rceil$. Since every such cevian configuration can be realized, the upper bound is attainable. 
\end{proof}

\begin{corollary}
Let $n\in \NNzero$. Then the number of intersection points of $n$ cevians that cut a triangle into the maximum number of regions is $b(n)=\lfloor n^2/3\rfloor$.
\end{corollary}

\begin{proof}
Write $n=3q+r$ where $r\in\{0,1,2\}$. From the proof of Theorem \ref{9t1} it follows that the number of intersection points of the $n$ cevians in a setting where the number of regions is maximal equals $ab+ac+bc$, where $a,b$, and $c$ are determined in \eqref{9e32}. Substituting these values into $ab+ac+bc$ leads to 
\[
ab+ac+bc=
\begin{cases}
3q^2, & \textnormal{if $r=0$};\\
3q^2+2q, & \textnormal{if $r=1$};\\
3q^2+4q+1, & \textnormal{if $r=2$}.
\end{cases}
\] It is straightforward to verify that all values are equal to $\lfloor n^2/3\rfloor$.
\end{proof}

\subsection{Intersection points, edges and regions in a two-fan polygonal construction}

Let $m,n\in\NN$ and let $P=(-1,0)$ and $Q=(1,0)$ be two points in the plane. We construct a polygon as follows. From $P$ draw $m$ equally spaced rays with angles \[\alpha_s=\pi-\frac{2\pi s}{m}, \quad s=0,1,\dots,m-1,\] and from $Q$ draw $n$ equally spaced rays with angles \[\beta_t=\frac{2\pi t}{n}, \quad t=0,1,\dots,n-1.\] Consider a circle centered at the origin with radius large enough to strictly contain all the ray-ray intersection points. Connect by a straight line every two consecutive ray-circle intersection points. See Figure \ref{10f1} for a visualization. Blomberg conjectured the statements of the following three corollaries in \seqnum{A338041}, \seqnum{A338042}, and \seqnum{A338043}. By taking $m=n$, these corollaries are immediate consequences of the more general results we prove in Theorems
\ref{10t1}, \ref{10t2}, and \ref{10t3}.

\begin{figure}[H]
  \centering  \includegraphics[width=0.8\linewidth]{output21.png}
  \caption{The polygon corresponding to $m=5$ and $n=6$.}
  \label{10f1}
\end{figure}

\begin{theorem}\label{10t1}
The number of ray-ray intersection points, including the two points $P$ and $Q$ equals
\[
\begin{cases}
\displaystyle
2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil + 2,
& \textnormal{if $n$ is odd};\\
\displaystyle
2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}\Biggr\rceil
-2\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor + 2,
& \textnormal{if $n$ is even}.
\end{cases}
\]
\end{theorem}

\begin{proof}
By $x$-axis symmetry, it suffices to count ray-ray intersection points having positive $y$-coordinate. Thus, we want $\alpha_s,\beta_t\in(0,\pi)$, which is equivalent to 
\begin{equation}\label{10e543}
s\in\Biggl\{1,2,\ldots,\Biggl\lfloor\frac{m-1}{2}\Biggr\rfloor\Biggr\},\quad
t\in\Biggl\{1,2,\ldots,\Biggl\lfloor\frac{n-1}{2}\Biggr\rfloor\Biggr\}.
\end{equation}
The rays corresponding to $\alpha_s$ and $\beta_t$ intersect if and only if
\begin{equation}\label{10e999}
\beta_t\in(\alpha_s,\pi)
\iff
\frac{2\pi t}{n}\in\Bigl(\pi-\frac{2\pi s}{m},\pi\Bigr)
\iff
t\in\Bigl(\frac{n}{2}-\frac{ns}{m}, \frac{n}{2}\Bigr).
\end{equation}
The number of values of $t$ satisfying condition \eqref{10e543} and condition \eqref{10e999} for a given $s$ is
\begin{equation}\label{10e301}
\Biggl\lfloor\frac{n-1}{2}\Biggr\rfloor-\Biggl\lfloor \frac{n}{2}-\frac{ns}{m}\Biggr\rfloor.
\end{equation}
Summing \eqref{10e301} over $s=1,\ldots,\bigl\lfloor\frac{m-1}{2}\bigr\rfloor$, multiplying by $2$ (to account for the symmetry) and adding $2$ (to account for $P$ and $Q$), we obtain 
\begin{equation}\label{10e91}
2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl(\Biggl\lfloor\frac{n-1}{2}\Biggr\rfloor-\Biggl\lfloor \frac{n}{2}-\frac{ns}{m}\Biggr\rfloor\Biggr)+2.
\end{equation}
We claim that for every real number $x$ the following identity holds
\begin{equation}\label{10e92}
\Biggl\lfloor\frac{n-1}{2}\Biggr\rfloor-\Biggl\lfloor \frac{n}{2}-x\Biggr\rfloor
=\begin{cases}
\Bigl\lceil x-\frac{1}{2}\Bigr\rceil,& \textnormal{if $n$ is odd};\\
\lceil x\rceil -1,& \textnormal{if $n$ is even}.
\end{cases}
\end{equation} Indeed, if $n$ is odd then
\begin{align*}
\Biggl\lfloor \frac{n-1}{2}\Biggr\rfloor -\Biggl\lfloor \frac{n}{2}-x\Biggr\rfloor &=	\frac{n-1}{2}-\Biggl\lfloor \frac{n-1}{2}+\frac{1}{2}-x\Biggr\rfloor \\
&=\frac{n-1}{2}-\Biggl(\frac{n-1}{2}+\Biggl\lfloor \frac{1}{2}-x\Biggr\rfloor \Biggr)\\
&=\Biggl\lceil x-\frac{1}{2}\Biggr\rceil. 
\end{align*} Similarly, if $n$ is even, then \[\Biggl\lfloor \frac{n-1}{2}\Biggr\rfloor -\Biggl\lfloor \frac{n}{2}-x\Biggr\rfloor =\Biggl(\frac{n}{2}-1\Biggr)-\Biggl(\frac{n}{2}-\lceil x\rceil \Biggr)=\lceil x\rceil -1.\]
Using \eqref{10e92} in \eqref{10e91} with $x=\frac{ns}{m}$ finishes the proof.
\end{proof}

\begin{corollary}
By taking $m=n$ in Theorem \ref{10t1} we obtain
\[
\seqnum{A338042}(n)=I(n,n)=
\begin{cases}
\frac{n^2+7}{4}, & \textnormal{if $n$ is odd};\\
\frac{n^2-6n+16}{4}, & \textnormal{if $n$ is even}.
\end{cases}
\]
\end{corollary}

\begin{theorem}\label{10t2}
Let us refer to the line segments on the rays lying between ray-ray intersection points and ray-circle intersection points as edges. Then the number of edges equals
\[
\begin{cases}
\displaystyle
m+n-\frac{\mathbf{1}_{2|m}}{2}
+4\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil,
& \textnormal{if $n$ is odd};\\
\displaystyle
m+n-\frac{1+\mathbf{1}_{2|m}}{2}
+4\left(\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}\Biggr\rceil
-\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor\right),
& \textnormal{if $n$ is even}.
\end{cases}
\] 
\end{theorem}

\begin{proof}
The number of ray-circle intersection points is $m+n - \mathbf{1}_{2|m}- \mathbf{1}_{2|n}$. We consider these points, together with the ray-ray intersection points, and the two points $P$ and $Q$, as vertices of a graph whose edges we enumerate. The ray-circle intersection points all have degree $1$. The two points $P$ and $Q$ have degree $m$ and $n$, respectively. Finally, the ray-ray intersection points all have degree $4$. We apply the degree sum formula (e.g., \cite[Theorem 2.1]{H}). Using Theorem \ref{10t1}, the total degree sum for odd $n$ equals
\[m+n - \mathbf{1}_{2|m} + m+n + 8\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil=2m+2n-\mathbf{1}_{2|m}+8\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil,\]  
and, for even $n$, by 
\begin{align*}
&m+n-1-\mathbf{1}_{2|m}+m+n+8\left(\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl\lceil \frac{ns}{m}\Biggr\rceil -\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor \right)=\\
&2m+2n-1-\mathbf{1}_{2|m}+8\left(\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl\lceil \frac{ns}{m}\Biggr\rceil -\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor \right).
\end{align*} Dividing these by $2$ yields the assertion.
\end{proof}

\begin{corollary}
By taking $m=n$ in Theorem \ref{10t2} we obtain
\[\seqnum{A338043}(n)=
\begin{cases}
\frac{n^2+4n-1}{2}, & \textnormal{if $n$ is odd};\\
\frac{n^2-2n+6}{2}, & \textnormal{if $n$ is even}.
\end{cases}
\]
\end{corollary}

\begin{theorem}\label{10t3}
The number of regions enclosed in the polygon equals
\[
\begin{cases}
\displaystyle
2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac12\Biggr\rceil
+ m+n - \frac{\mathbf{1}_{2|m}}{2} - 1,
& \textnormal{if $n$ is odd};\\
\displaystyle
2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}\Biggr\rceil
- 2\Biggl\lfloor\frac{m-1}{2}\Biggr\rfloor
+ m+n - \frac{1+\mathbf{1}_{2|m}}{2} - 1,
& \textnormal{if $n$ is even}.
\end{cases}
\]
\end{theorem}

\begin{proof}
Let $f, v$, and $e$ denote the number of regions (including the outer one), vertices, and edges of the polygon, which we look at from the perspective of a planar graph. Notice that the vertices of the polygon include the ray-circle intersection points and the edges of the polygon include the lines connecting ray-circle intersection points. By Euler's formula (e.g., \cite[Theorem 11.1]{H}), $f=2-v+e$. Using Theorems \ref{10t1} and \ref{10t2}, we have, in the odd case 
\begin{align*}
f&=2-\left(2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil + 2 + m+n - \mathbf{1}_{2|m} \right)\\
&+\left(m+n-\frac{\mathbf{1}_{2|m}}{2}
+4\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil+m+n - \mathbf{1}_{2|m} \right)\\
&=2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl\lceil \frac{ns}{m}-\frac{1}{2}\Biggr\rceil +m+n-\frac{\mathbf{1}_{2|m}}{2},
\end{align*} and in the even case, 
\begin{align*}
f&=2-\left(2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}\Biggr\rceil
-2\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor + 2+m+n - \mathbf{1}_{2|m} - 1 \right )\\
&+\left(m+n-\frac{1+\mathbf{1}_{2|m}}{2}
+4\left(\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}
\Biggl\lceil \frac{ns}{m}\Biggr\rceil
-\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor\right)+m+n - \mathbf{1}_{2|m} - 1\right)\\
&=2\sum_{s=1}^{\bigl\lfloor\frac{m-1}{2}\bigr\rfloor}\Biggl\lceil \frac{ns}{m}\Biggr\rceil -2\Biggl\lfloor \frac{m-1}{2}\Biggr\rfloor +m+n-\frac{1+\mathbf{1}_{2|m}}{2}.
\end{align*} Subtracting $1$ from these (since $f$ accounts also for the outer region) finishes the proof.
\end{proof}

\begin{corollary}
By taking $m=n$ in Theorem \ref{10t3} we obtain
\[\seqnum{A338041}(n)=
\begin{cases}
\frac{n^2+8n-5}{4}, & \textnormal{if $n$ is odd};\\
\frac{n^2+2n}{4}, & \textnormal{if $n$ is even}.
\end{cases}
\]
\end{corollary}

\section{Acknowledgments}
The author gratefully thanks the referees for the careful reading of the manuscript and the helpful suggestions.

\begin{thebibliography}{99}

\bibitem{Be}
A.~H.~Beiler, {\it Recreations in the Theory of Numbers: The Queen of Mathematics Entertains}, 2nd ed., Dover Publ., New York, 1964.

\bibitem{B}
D.~M.~Burton, {\it Elementary Number Theory}, 7th ed., McGraw--Hill, New York, 2011.

\bibitem{E}
H.~Eves, {\it A Survey of Geometry}, Revised ed., Allyn and Bacon, Boston, 1972.

\bibitem{F}
S.~Fried, Proofs of several conjectures from the OEIS, {\it J. Integer Seq.} {\bf 28} (2025), Art.\ 25.4.3.

\bibitem{G}
H.~W.~Gould, {\it Combinatorial Identities: A Standardized Set of Tables Listing 500 Binomial Coefficient Summations}, 1972.

\bibitem{H}
F.~Harary, {\it Graph Theory}, Addison--Wesley, 1969.

\bibitem{Sl}
N.~J.~A.~Sloane, {\it The On-Line Encyclopedia of Integer Sequences}, OEIS Foundation Inc., 2026.  Available at \url{https://oeis.org}.

\bibitem{Stan}
R.~P.~Stanley, {\it Enumerative Combinatorics, Vol.~1}, 2nd ed., Cambridge Univ. Press, 2011.

\bibitem{SR}
R.~Stephan, Prove or disprove. 100 conjectures from the OEIS, arXiv preprint math/0409509 [math.CO], 2004. Available at \url{https://arxiv.org/abs/math/0409509}.

\bibitem{St}
V.~Strehl, Binomial identities---combinatorial and algorithmic aspects,
{\it Discrete Math.} {\bf 136} (1994), 309--346.

\bibitem{Wilf}
H.~S.~Wilf, {\it generatingfunctionology}, 2nd ed., Academic Press, Inc., 1994. Available at \url{https://www.math.upenn.edu/~wilf/gfology2.pdf}.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}: Primary 11B83; Secondary 05A10, 11A07, 52C30.

\noindent \emph{Keywords}: binomial identity, Beatty sequence, triangular number, sum of digits, partition, parity and congruence, floor and ceiling function, cotangent, prime factor, cevian. 

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences 
\seqnum{A000041},
\seqnum{A000172},
\seqnum{A000212},
\seqnum{A001951},
\seqnum{A006218},
\seqnum{A007953},
\seqnum{A007980},
\seqnum{A026641},
\seqnum{A067567},
\seqnum{A078567},
\seqnum{A223577},
\seqnum{A223578},
\seqnum{A285273},
\seqnum{A305123},
\seqnum{A338041},
\seqnum{A338042}, and
\seqnum{A338043}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received November 14 2025;
revised versions received November 15 2025; January 15 2026.
Published in {\it Journal of Integer Sequences}, March 12 2026.

\bigskip
\hrule
\bigskip

\noindent
Return to \href{https://cs.uwaterloo.ca/journals/JIS/}{Journal of Integer Sequences home page}.
\vskip .1in


\end{document}

                                                                                

