An octagonal heptagonal number is both an octagonal number and a heptagonal number. Let
denote the
th
octagonal number and
the
th heptagonal number,
for positive integers
and
.
The indices satisfy the equation
, or
|
(1)
|
Completing the square and rearranging gives
|
(2)
|
This gives the Pell-like equation
|
(3)
|
where
and
. The first few positive
integer solutions are
,
(7, 4), (73, 40), (157, 86), .... Selecting the pairs that give positive
integer indices yields
,
(345, 315), (166145, 151669), ... (OEIS A048904
and A048905), corresponding to the octagonal
heptagonal numbers 1, 297045, 69010153345, ... (OEIS A048906).