So whenever I square any number and subtract previous number of the original I always end up with a prime number. Why is it so? Let's say a number $x$ is squared and $x - 1$ is subtracted from it the result would be prime.
2026-03-25 20:17:40.1774469860
$x^2 - (x - 1)$ is prime?
1.1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
Maybe you've gotten lucky and only tested numbers drawn from Sloane's A055494:
Obviously $n^2 - n$ is a multiple of $n$. But $n^2 - n + 1$ is coprime to $n$, meaning that it has no prime factors in common with $n$. So it will sometimes happen that $n^2 - n + 1$ is actually itself prime.
For example, $8^2 - 8 + 1 = 57 = 3 \times 19$. So 8 is a power of 2, while 57 is an odd number, the product of two odd primes. 57 is not prime, but it still has no prime factors in common with 8.
Compare that to 9, which gives us $9^2 - 9 + 1 = 73$, which is indeed prime.