Let n2 + 96 = x2
⇒ x2 – n2 = 96
⇒ (x – n) (x + n) = 96
⇒ both x and n must be odd or both even
on these condition the cases are
x – n = 2, x + n = 48
x – n = 4, x + n = 24
x – n = 6, x + n = 16
x – n = 8, x + n = 12
and the solution of these equations can be given as
x = 25, n = 23
x = 14, n = 10
x = 11, n = 5
x = 10, n = 2
So, the required values of n are 23, 10, 5, and 2.