#math trivia for #June17: #169 is one of eight day-numbers that are squares of primes. What are the others?

— Burt Kaliski Jr. (@modulomathy) June 18, 2012

Recall that “day-numbers” are integers between 1 and 366 — the numbers of the days of the year (366 is included because the problem was given during a leap year, though that won’t affect the result).

The largest square between 1 and 366 is 19^{2} = 361, so all the answers must be squares of a prime less than or equal to 19. There are eight such primes, and consequently eight acceptable day-numbers:

- 1 = 1
^{2} - 4 = 2
^{2} - 9 = 3
^{2} - 25 = 5
^{2} - 49 = 7
^{2} - 121 = 11
^{2} - 169 = 13
^{2} - 289 = 17
^{2} - 361 = 19
^{2}

Note: The number of prime squares less than or equal to a limit *N* is approximately 2 sqrt(*N*) / ln(*N*), where ln is the natural logarithm. For *N* = 366, the value is about 6.48, which is reasonably close to the actual answer 8. The estimate is a consequence of the Prime Number Theorem, which states that the number of primes less than or equal to a limit *N* is approximately *N* / ln(*N*). Because we’re looking for prime squares, our estimate is based on the number of primes less than or equal to the *square root* of the limit, which is sqrt(*N*) / ln(sqrt(*N*)) = sqrt(*N*) / (ln(*N*) / 2) = 2 sqrt(*N*) / ln(*N*).