An octagonal square number is a number which is simultaneously an octagonal number and a square number. Let denote the
th octagonal number and
the
th
square number, with positive
integers
and
. The equation
is equivalent to
|
(1)
|
Completing the square and rearranging gives
|
(2)
|
Defining
and
gives the Pell equation
|
(3)
|
The first few positive solutions are ,
(7, 4), (26, 15), (97, 56), (362, 209), (1351, 780), .... These give the solutions
, (8/3, 4), (9, 15), (98/3, 56), (121, 209),
..., of which the integer solutions are (1, 1), (9, 15),
(121, 209), (1681, 2911), ... (OEIS A046184
and A028230), corresponding to the octagonal
square numbers 1, 225, 43681, 8473921, 1643897025, ... (OEIS A036428).