Last digit of a triangular number is the midpoint between two primes

128 Views Asked by At

If a triangular number is even, add and subtract 1 to see if you have found two primes, as in 6 +/1 gives 5 and 7. If the triangular number is odd, add and subtract 2 to see whether or not both are primes, as in 105 +/-2 gives 103 and 107. A small sample found that two primes are found with triangular numbers 6, 15, 45, 105, 231, 465, 741, 861. Is it normal to expect so many with last digit 1 or 5? The cycle for last digits of triangular numbers has 20 terms and last digit 0 appears 4 times and last digit 8 appears 2 times. Last digit 1 appears 4 times, last digit 3 appears 2 times (never a solution), and last digit 5 appears 4 times. Will a larger sample conform to the statistically expect distribution?

1

There are 1 best solutions below

3
On

I think you are right about even numbers: add $1$ or subtract $1$, since

$3 \cdot even - 1 \lor 3 \cdot even +1 = prime$ (if prefer to use positive coefficients $5$ and $7$ here instead of $1$ and $-1$ as of $0$ is regarded an even as well)

But, in case of odd progression you might consider to add $4$ to see the full pattern:

$3 \cdot odd + 2 \lor 3 \cdot odd + 4 = prime$

So for example a triangular number $15$ using the prime number form above will generate:

$13$, $17$, and also $11$ and $19$. In case of last digit $3$, for which you mentioned to have no solution, a triangular number $153$ will give you two prime numbers: $149$ and $157$, but not $151$ and $155$, since the latter one is the product of $5$ and $31$.