A number which is simultaneously a nonagonal number and a square number and therefore satisfies the Diophantine equation
(1)
|
Completing the square and rearranging gives
(2)
|
Defining and gives the Pell-like equation
(3)
|
This has unit solutions , (23, 6), and (75, 20), which lead to the family of solutions (9, 2), (23, 6), (75, 20), (247, 66), (681, 182), (2245, 600), .... The corresponding integer solutions in and are , (2, 3), (18, 33), (49, 91), (529, 989), ... (OEIS A048910 and A048911), giving the nonagonal square numbers 1, 9, 1089, 8281, 978121, 7436529, ... (OEIS A036411).