Find all odd solutions for $n$ for which $3n^2+8$ is equal to a number in base $10$ which is formed by only one digit(e.g.-$222,8888888,4,99$ etc.)

This is only a partial answer. User quasi has posted a similar partial answer with a nice improvement.

Let's start from the OP's equation $m\times10^k=27n^2+72+m$, where $1\le m\le9$ is the repeated digit and $k$ is the number of repeats of the digit $m$. Note that $n\not=0$ implies $3n^2+8\ge11$, which implies $k\ge2$.

Since the problem only asks for odd values of $n$ that satisfy the equation, let's start by looking mod $8$:

$$27n^2+72+m\equiv3+m\equiv \begin{cases} 4m&\text{if }k=2\\ 0&\text{if }k\ge3\\ \end{cases}$$

Thus for $k=2$ we can only have $m=1$ or $9$, while for $k\ge3$ we can only have $m=5$.

Now $m=1$ and $k=2$ leads to $11=3\cdot1^2+8$, while $m=9$ can be dismissed, since $3n^2+8$ is not divisible by $3$, much less $9$.

We're left with the case $m=5$ with $k\ge3$, at which point it's convenient to return to the original equation, written as

$$n^2={555\ldots547\over3}$$

It's easy to see that we need $k\in\{4,7,10,\ldots\}$. (Note: User quasi eliminates the odd possibilities with a nice mod $11$ argument.) Letting $k=3h+4$, we can rewrite things as

$$n^2=185185\ldots1850000+1849=1850000\times{1000^h-1\over1000-1}+43^2$$

or

$$37\times2^4\times5^5\times{1000^h-1\over999}=(n+43)(n-43)$$

It's clear that $n=43$ is a solution with $h=0$, i.e., $5555=3\cdot43^2+8$ joins $11=3\cdot1^2+8$ as a solution. But it's less clear if there are solutions with $h\gt0$.

The best I can say is that, since $5$ cannot divide both $n+43$ and $n=43$, we must have $5^5=3125$ divide one of them. Allowing $n$ to be either positive or negative, we may, without loss of generality, assume it's $n-43$. Thus, since $n$ is required to be odd, we can write $n=6250N+43$ with $N\in\mathbb{Z}$. This reduces things to

$$37\times8\times{1000^h-1\over999}=N(3125N+43)$$

Now $N$ and $3125N+43$ cannot both be even, so one of them must be divisible by $8$. When the modular dust settles we have $N\in\{0,7\}$ mod $8$ and $N\in\{0,4\}$ mod $37$. The Chinese remainder theorem tells us $N\in\{0,111,152,263\}$ mod $296$, that is, $n$ is of the form

$$n=(43+6250r)+1850000M$$

with $r\in\{0,111,152,263\}$ and $M\in\mathbb{Z}$. But at this point I'm stuck. Maybe someone else can see how to proceed from here, or find some other, better, approach.


Here's my derivation of the following partial results . . .

Consider the equation $$3n^2+8=m\left(\frac{10^{\,k}-1}{9}\right)$$ or equivalently, $$27n^2+72+m=m(10^{\,k})$$ to be solved for positive integers $m,k,n$ subject to the restrictions

  • $n$ is odd.$\\[4pt]$
  • $m\le 9$.

An immediate solution, which we'll call the trivial solution, is the triple $(m,k,n)=(1,2,1)$.

It's easily verified that the triple $(m,k,n)=(5,4,43)$ is also a solution, which shows that there is at least one nontrivial solution.

Claims:

  • If $(m,k,n)$ is a nontrivial solution, then $m=5$, and $k\equiv 4\;(\text{mod}\;6)$.$\\[4pt]$
  • The number of solution triples $(m,k,n)$ is finite.

Proof:

Suppose the triple $(m,k,n)$ is a nontrivial solution.

Then $n \ge 3$, hence $k > 2$.

First, we show $m=5$ . . .

Since $k > 2$, we have $10^k\equiv 0\;(\text{mod}\;8)$, and since $n$ is odd, we have $n^2\equiv 1\;(\text{mod}\;8)$, hence \begin{align*} &27n^2+72+m=m(10^{\,k})\\[4pt] \implies\;&27n^2+72+m\equiv m(10^{\,k})\;(\text{mod}\;8)\\[4pt] \implies\;&3+m\equiv 0\;(\text{mod}\;8)\\[4pt] \implies\;&m\equiv 5\;(\text{mod}\;8)\\[4pt] \implies\;&m=5\\[4pt] \end{align*} so our new equation is $$27n^2+77=5(10^{\,k})$$ or equivalently $$54n^2+154=10^{\,k+1}$$ Next, we show that $k$ is even . . .

Suppose instead that $k$ is odd. \begin{align*} \text{Then}\;\;&54n^2+154=10^{\,k+1}\\[4pt] \implies\;&54n^2+154\equiv 10^{\,k+1}\;(\text{mod}\;11)\\[4pt] \implies\;&-n^2\equiv (-1)^{k+1}\;(\text{mod}\;11)\\[4pt] \implies\;&-n^2\equiv 1\;(\text{mod}\;11)\\[4pt] \implies\;&n^2\equiv -1\;(\text{mod}\;11)\\[4pt] \end{align*} contradiction, since $-1$ is not a square, mod $11$.

Hence, $k$ is even, as claimed.

Next, we show that $k \equiv 4\;(\text{mod}\;6)$ . . .

Note that the multiplicative order of $10$, mod $27$, is $3$, hence \begin{align*} &10^{\,k+1}=54n^2+154\\[4pt] \implies\;&10^{\,k+1}=-8\;(\text{mod}\;27)\\[4pt] \implies\;&10^{\,k+1}\equiv -8+108\;(\text{mod}\;27)\\[4pt] \implies\;&10^{\,k+1}\equiv 10^{\,2}\;(\text{mod}\;27)\\[4pt] \implies\;&10^{\,k-1}\equiv 1\;(\text{mod}\;27)\\[4pt] \implies\;&3{\,\mid\,}(k-1)\\[4pt] \implies\;&k \equiv 1\;(\text{mod}\;3)\\[4pt] \implies\;&k \equiv 4\;(\text{mod}\;6)\qquad\text{[since $k$ is even]}\\[4pt] \end{align*}

Thus, we've proved that for any nontrivial solution triple $(m,k,n)$, we must have $m=5$, and $k \equiv 4\;(\text{mod}\;6)$.

Next, we show that the number of solution triples $(m,k,n)$ is finite.

Since there is only one trivial solution, we need only consider nontrivial solutions.

Thus, suppose the triple $(m,k,n)=(5,k,n)$ is a nontrivial solution.

Since $k \equiv 4\;(\text{mod}\;6)$, $k-1$ is a multiple of $3$.

Let $w={\displaystyle{10^{\frac{k-1}{3}}}}$, let $x=150w$, and let $y=1350n$. \begin{align*} \text{Then}\;\;&10^{\,k+1}=54n^2+154\\[4pt] \implies\;&100(10^{\,k-1})=54n^2+154\\[4pt] \implies\;&100w^3=54n^2+154\\[4pt] \implies\;&27n^2=50w^3-77\\[4pt] \implies\;&27n^2=50w^3-77\\[4pt] \implies\;&(9n)^2=150w^3-231\\[4pt] \implies\;&150^{\,2}(9n)^2=150^{\,3}w^3-150^{\,2}(231)\\[4pt] \implies\;&(1350n)^2=(150w)^3-5197500\\[4pt] \implies\;&y^2=x^3-5197500\\[4pt] \end{align*} which has only finitely many integer solutions, since it's known that for any fixed nonzero integer $c$, the equation $y^2=x^3+c$ has only finitely many integer solutions.

It follows that for our equation, the number of solution triples $(m,k,n)$ is finite.

This completes the proof of the claimed results.

Update:

With help from Yong Hao Ng, we can now obtain a complete solution . . .

Using Sage commands for finding integer points on elliptic curves, Yong Hao Ng confirms that the only pair $(x,y)$ of positive integers which satisfy the equation $y^2=x^3-5197500$ is the pair $(x,y)=(1500,58050)$, which corresponds to the solution triple $(m,k,n)=(5,4,43)$.

enter image description here

Therefore the only solutions are $(m,k,n)=(1,2,1)$ and $(m,k,n)=(5,4,43)$.