3

I read that the square of any prime number, excluding 2 and 3, is one greater than a multiple of 24. Is this a conjecture or a theorem? It's hard for me to imagine how such a thing could be proven.

poetasis
  • 6,338
  • 1
    Well, what are the possible values for $p\pmod {24}$? – lulu Jul 17 '18 at 18:36
  • I'm just asking because $5^2 -1=24$, $7^2-1=48$, $11^2-1=120$, etc. It seems to work for all cases tested but how would you prove it for 'all' primes greater than 3? – poetasis Jul 17 '18 at 18:39
  • As I suggest, list all the possible values of $p\pmod {24}$. Then square each of them (it's a very simple computation). – lulu Jul 17 '18 at 18:40
  • See here. You don't need $p$ to be a prime. It suffices to assume that $\gcd(p,6)=1$. – Jyrki Lahtonen Jul 17 '18 at 18:40
  • First: prove that the square of every odd number is congruent to 1 mod 8 ($(2n+1)^2=4n^2+4n+1 = 4(n^2+n)+1$; now can you show that $n^2+n$ is always even?) Once you've done that, you can show that the square of every number not a multiple of 3 is always congruent to 1 mod 3. These two facts then imply your statement. – Steven Stadnicki Jul 17 '18 at 18:40
  • Yes this is true. It was given to me many years ago as a homework exercise but I always remembered it because it sounds so incredible and I really had fun figuring out the proof. – Vincent Jul 17 '18 at 18:40
  • 1
    As always, using Approach0 before asking/answering a potential duplicate is recommended. – Jyrki Lahtonen Jul 17 '18 at 18:41

5 Answers5

2

That the number is prime is not relevant.

What matters is that the number is odd and is not a multiple of $3$.

Let $n$ be not multiple of $3$. Then $n = 3m \pm 1$ for some $m$.

Let $n$ also be odd. Then $3m$ is even and $m$ is even. So $m = 2k$ for some $k$.

So $n = 3*2k \pm 1 = 6k \pm 1$.

And $n^2 = 36k^2 \pm 12k + 1$

And $36k^2 \pm 12k + 1 = 12(3k \pm 1)k + 1$.

If $k$ is even. Then $12k$ is divisible by $24$ and $n^2$ is one more than a multiple of $24$.

If $k$ is odd, then $3k^2 \pm 1$ is even. And then $12(3k^2 \pm 1)$ is divisible by $24$ and $n^2$ is one more than a multiple of $24$.

Hence proved.

fleablood
  • 124,253
2

All positive integer are of form $$6n,6n+1,6n+2,6n+3,6n+4,6n-1$$for some $n$ of which $6n,6n+2,6n+3,6n+4$ are all composite (excluding 1,2,3) therefore any prime is of form $6n\pm 1$ leading that the square is of form $$(6n\pm 1)^2=36n^2\pm12n+1=12k+1$$. Similarly any prime is of form $4n\pm 1$ leading that the square is of form $$(4n\pm 1)^2=16n^2\pm8n+1=8k'+1$$integrating the results any such prime square is of form $24h+1$

Mostafa Ayaz
  • 31,924
1

Another hint:

  • Any prime $>3$ is congruent to $1$ or $-1\bmod 3$, so its square in congruent to $1\bmod 3$.
  • Any odd prime is congruent to $\pm 1$ or $\pm 3\bmod 8$, so its square is also congruent to $1\bmod 8$.

Now, apply the Chinese remainder theorem.

Bernard
  • 175,478
0

Hint: If $p$ is a prime which is neither $2$ nor $3$, then $p=6n\pm1$ for some $n\in\mathbb N$.

0

You want to show that $$p^2-1 =24k$$ for some integer k.

$$ p^2-1 = (p-1)(p+1)$$

since $p$ is a prime different from $2$ and $3$, $p$ is odd therefore both $p-1$ and $p+1$ are even and one of them is a multiple of $4$.

That is the product $(p-1)(p+1)$ is a multiple of $8$.

On the other hand $P=3k+1$ or $p=3k-1$ and in either case the product $(p-1)(p+1)$ is a multiple of $3$.

That makes the product a multiple of $24.$

  • The most helpful comment for this newbie was the recommended use of Approach0. The comments referring to mod(anything) were meaningless (to me). The helpful answer(s) simply showed that $(6n±1)^2 -1=(36n^2±12n+1) -1$. Thanks to everyone for taking time for a simple question that I could have had answered using Approach0. – poetasis Jul 20 '18 at 21:05