A heptagonal square number is simultaneously a heptagonal number
and a square number
for positive integers
and
. Such numbers satisfy
|
(1)
|
Completing the square and rearranging gives
|
(2)
|
Substituting
and
gives the Pell-like quadratic Diophantine equation
|
(3)
|
which has basic solutions ,
(13, 4), and (57, 18). Additional solutions can be obtained from the unit Pell
equation, and correspond to positive integer
solutions when
,
(6, 9), (49, 77), (961, 1519), ... (OEIS A046195
and A046196), corresponding to the heptagonal
square numbers 1, 81, 5929, 2307361, 168662169, 12328771225, ... (OEIS A036354).