A number which is simultaneously octagonal and heptagonal. Let denote the th octagonal number and the th heptagonal number, then a number which is both octagonal and hexagonal satisfies the equation , or
(1)
|
Completing the square and rearranging gives
(2)
|
Therefore, defining
(3)
| |||
(4)
|
gives the second-order Diophantine equation
(5)
|
The first few solutions are , (7, 4), (73, 40), (157, 86), .... These give the integer solutions (1, 1), (345, 315), (166145, 151669), ... (OEIS A048904 and A048905), corresponding to the octagonal heptagonal numbers 1, 297045, 69010153345, ... (OEIS A048906).