退出

Is the digit sum of triangular numbers prime infinitely often?

数论 Math StackExchange 5 票 2 回答 69 浏览 提问者: Knut Sylvén 2026-08-11 17:03
number-theory prime-numbers recreational-mathematics triangular-numbers

问题内容

Let $T_n = \frac{n(n+1)}{2}$ denote the $n$-th triangular number, and let $S(m)$ denote the sum of the digits of $m$ in base 10.

I am investigating the conjecture that $S(T_n)$ is a prime number for infinitely many $n$.

Modular constraints

We know that $T_n \pmod 9$ is periodic with a period of 9, repeating the sequence $1, 3, 6, 1, 6, 3, 1, 9, 9$. Since a number is congruent to its digit sum modulo 9, $S(T_n) \pmod 9$ must also belong to $\{1, 3, 6, 9\}$.

  • If $S(T_n) \pmod 9 \in \{3, 6, 9\}$, the sum is a multiple of 3. The only prime solutions here are when $S(T_n) = 3$ (which occurs for $n = 2, 6, 15, 20, 24$).
  • For all other cases, any prime $S(T_n) > 3$ must satisfy $S(T_n) \equiv 1 \pmod 9$.

Computational Evidence

I have run a simulation up to $n = 50,000,000$ and found exactly 1,832,941 solutions. When plotting the cumulative count of primes, the growth rate is smooth and asymptotically outpaces a scaled square root function ($\approx c \cdot \sqrt{n}$), strongly suggesting that the sequence of primes never terminates.

Question

Given the difficulty of mixing base-dependent operations (digit sums) with algebraic sequences (triangular numbers), is this conjecture currently considered an open problem? Are there any known conditional proofs (e.g., assuming the Hardy-Littlewood conjectures) or similar solved results for other quadratic polynomials?

回答 (2)

Oscar Lanzi 4 票 2026-08-11 17:41 原文

This is easier than it looks. Recall that a number is triangular iff eight times that number plus 1 is a square. Now consider squares havig the form $(10^n+5)^2$ with $n\ge4$. Subtracting $1$ from this square and dividing by $8$ to give the coreesponding triangular number gives a result whose decimal representation contains seven nonzero digits: two $1$'s, two $2$'s, a $3$ and two $5$'s. Which add up to $19$.

Similar constructions may be set up in other bases. In particular, for base two subtracting one from $[(10_2)^n+1]$ squared ($n\ge10_2$) and dividing by eight gives a triangular number with just two $1$ bits, thus a bit sum of $2$.

French Man 4 票 2026-08-11 17:46 原文

For all $k\ge1$ $$T(2\cdot 10^k)=2\cdot10^{2k}+10^k$$ $$\implies S(T(2\cdot 10^k))=3$$ In fact, this construction shows the conjecture is true for any base $b\ge2$.