Is ${(prime^2-1) \over 24}$ always a member of the generalized pentagonal number set?

142 Views Asked by At

I was working through a puzzle on why the square of a prime minus one is always a factor of 24 (http://puzzles.nigelcoldwell.co.uk/fifteen.htm) and noticed that the sequence of numbers for ${(prime^2-1) \over 24}$ always seems to be a member of the generalized pentagonal number set (http://oeis.org/A001318).

For example, the first 70 members of the set of ${(prime^2-1) \over 24}$ are:

0, 0, 1, 2, 5, 7, 12, 15, 22, 35, 40, 57, 70, 77, 92, 117, 145, 155, 187, 210, 222, 260, 287, 330, 392, 425, 442, 477, 495, 532, 672, 715, 782, 805, 925, 950, 1027, 1107, 1162, 1247, 1335, 1365, 1520, 1552, 1617, 1650, 1855, 2072, 2147, 2185, 2262, 2380, 2420, 2625, 2752, 2882, 3015, 3060, 3197, 3290, 3337, 3577, 3927, 4030, 4082, 4187, 4565, 4732, 5017, 5075, 5192, 5370, 5612, 5797, 5985, 6112, 6305, 6567, 6700, 6970, 7315, 7385, 7740, 7812, 8030, 8177, 8400, 8702, 8855, 8932, 9087, 9560, 9882, 10045, 10375, 10542, 10795, 11310, 11397, 12195

And the first 181 members of the generalized pentagonal set are (bolded members are also a member of ${(prime^2-1) \over 24}$:

0 1 2 5 7 12 15 22 26 35 40 51 57 70 77 92 100 117 126 145 155 176 187 210 222 247 260 287 301 330 345 376 392 425 442 477 495 532 551 590 610 651 672 715 737 782 805 852 876 925 950 1001 1027 1080 1107 1162 1190 1247 1276 1335 1365 1426 1457 1520 1552 1617 1650 1717 1751 1820 1855 1926 1962 2035 2072 2147 2185 2262 2301 2380 2420 2501 2542 2625 2667 2752 2795 2882 2926 3015 3060 3151 3197 3290 3337 3432 3480 3577 3626 3725 3775 3876 3927 4030 4082 4187 4240 4347 4401 4510 4565 4676 4732 4845 4902 5017 5075 5192 5251 5370 5430 5551 5612 5735 5797 5922 5985 6112 6176 6305 6370 6501 6567 6700 6767 6902 6970 7107 7176 7315 7385 7526 7597 7740 7812 7957 8030 8177 8251 8400 8475 8626 8702 8855 8932 9087 9165 9322 9401 9560 9640 9801 9882 10045 10127 10292 10375 10542 10626 10795 10880 11051 11137 11310 11397 11572 11660 11837 11926 12105 12195

I verified that this was true for the first 600 primes, but is this true generally?

1

There are 1 best solutions below

0
On BEST ANSWER

First of all, $24\mid(n^2-1)\Leftrightarrow 3,8\mid(n^2-1)$ by CRT, which is easy to very mod $3$, $8$ so long as we have $n\ge5$. This holds regardless of whether or not $n$ is prime, so primes are a red herring here.

Secondly, solving

$$\frac{n^2-1}{24}=\frac{k(3k-1)}{2}$$

for $k$ yields $k=\frac{1\pm n}{6}$, so in particular $\frac{n^2-1}{24}$ is generalized pentagonal iff $n\equiv\pm1$ mod $6$.