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

 n(3n-2)=m^2.
(1)

Completing the square and rearranging gives

 (3n-1)^2-3m^2=1.
(2)

Therefore, defining

x=(3n-1)
(3)
y=m
(4)

gives the Pell equation

 x^2-3y^2=1
(5)

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).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.