Octagonal Square Number

A number which is simultaneously octagonal and square. Let O_n denote the nth octagonal number and S_m the mth square number, then a number which is both octagonal and square satisfies the equation O_n=S_m, or


Completing the square and rearranging gives


Therefore, defining


gives the Pell equation


The first few solutions are (x,y)=(2,1), (7, 4), (26, 15), (97, 56), (362, 209), (1351, 780), .... These give the solutions (n,m)=(1,1), (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).

See also

Octagonal Number, Square Number

Explore with Wolfram|Alpha


Graham, R. L.; Knuth, D. E.; and Patashnik, O. Concrete Mathematics: A Foundation for Computer Science. Reading, MA: Addison-Wesley, p. 329, 1990.Konhauser, J. D. E.; Velleman, D.; and Wagon, S. Which Way Did the Bicycle Go? And Other Intriguing Mathematical Mysteries. Washington, DC: Math. Assoc. Amer., p. 104, 1996.Sloane, N. J. A. Sequences A028230, A036428, and A046184 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Octagonal Square Number

Cite this as:

Weisstein, Eric W. "Octagonal Square Number." From MathWorld--A Wolfram Web Resource.

Subject classifications