22
International Mathematical Forum, 2, 2007, no. 16, 781 - 802 Regular Polygonal Numbers and Generalized Pell Equations CHU Wenchang Dipartimento di Matematica Universit` a degli Studi di Lecce Lecce-Arnesano, P.O.Box 193, 73100 Lecce, Italy tel 39+0832+297409, fax 39+0832+297594 [email protected] Abstract. In the eighteenth century, both square numbers and triangular num- bers were investigated by Euler and Goldbach (1742), who determined the recurrence relations satisfied by the sequence and established the general formulae explicitly. It seems to the author that the topics around this subject have not been touched in mathematical literature. As the first attempt to explore it, this work will present a systematic procedure to deal with the problem. For the regular (λ, μ)-polygonal numbers, the corresponding Diophantine equations will be reduced to the general- ized Pell equations. Then solutions of the associated Pell equations will essentially enable us to resolve the problem. By means of Computer Algebra, the recurrence relations and generating functions satisfied by (λ, μ)-polygonal numbers can be re- covered systematically. As exemplification, the results on the first twenty regular (λ, μ)-polygonal sequences will be presented in details. Mathematics Subject Classification: Primary 11Y50, Secondary 11Y55 Keywords: Polygonal number, Diophantine equation, Generalized Pell equation, Recurrence relation, Generating function 1. Introduction and Notation In the treatise Polygonal Numbers, Diophantus quoted the definition of polygonal numbers (cf. [1, pp. 1-3] for reference) due to Hypsicles (around 175 B.C.): “If there are as many numbers as we please beginning with one and increasing by the same common difference, then when the common difference is one, the sum of all the terms is a triangular number; when 2, a square; when 3, a pentagonal number. And the number of the angles is called after the number exceeding the common difference by 2, and the side after the number of terms including 1”. Given therefore an arithemetical progression with the first term 1 and the common difference λ 2, the sum of n terms is the regular n-th λ-gonal number p λ (n).

Regular Polygonal Numbers and Generalized Pell Equations

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Regular Polygonal Numbers and Generalized Pell Equations

International Mathematical Forum, 2, 2007, no. 16, 781 - 802

Regular Polygonal Numbers

and Generalized Pell Equations

CHU Wenchang

Dipartimento di MatematicaUniversita degli Studi di Lecce

Lecce-Arnesano, P.O.Box 193, 73100 Lecce, Italytel 39+0832+297409, fax 39+0832+297594

[email protected]

Abstract. In the eighteenth century, both square numbers and triangular num-bers were investigated by Euler and Goldbach (1742), who determined the recurrencerelations satisfied by the sequence and established the general formulae explicitly.It seems to the author that the topics around this subject have not been touched inmathematical literature. As the first attempt to explore it, this work will presenta systematic procedure to deal with the problem. For the regular (λ, μ)-polygonalnumbers, the corresponding Diophantine equations will be reduced to the general-ized Pell equations. Then solutions of the associated Pell equations will essentiallyenable us to resolve the problem. By means of Computer Algebra, the recurrencerelations and generating functions satisfied by (λ, μ)-polygonal numbers can be re-covered systematically. As exemplification, the results on the first twenty regular(λ, μ)-polygonal sequences will be presented in details.

Mathematics Subject Classification: Primary 11Y50, Secondary 11Y55Keywords: Polygonal number, Diophantine equation, Generalized Pell

equation, Recurrence relation, Generating function

1. Introduction and Notation

In the treatise Polygonal Numbers, Diophantus quoted the definition ofpolygonal numbers (cf. [1, pp. 1-3] for reference) due to Hypsicles (around 175B.C.): “If there are as many numbers as we please beginning with one andincreasing by the same common difference, then when the common differenceis one, the sum of all the terms is a triangular number; when 2, a square; when3, a pentagonal number. And the number of the angles is called after thenumber exceeding the common difference by 2, and the side after the numberof terms including 1”. Given therefore an arithemetical progression with thefirst term 1 and the common difference λ−2, the sum of n terms is the regularn-th λ-gonal number pλ(n).

Page 2: Regular Polygonal Numbers and Generalized Pell Equations

782 CHU Wenchang

From this definition, we can compute the regular n-th λ-gonal number pλ(n)explicitly as follows:

pλ(n) =

n−1∑k=0

{1 + (λ − 2)k

}= n + (λ − 2)

(n2

)(1.1)

where n = 1, 2, · · · . Hence the set of all the regular λ-polygonal numbers isdetermined by

Pλ ={n + (λ − 2)

(n2

) ∣∣ n = 1, 2, · · ·}

. (1.2)

Triangular numbers and square numbers are respectively given by

P3 ={(

n + 12

) ∣∣ n = 1, 2, · · ·}

and P4 ={

n2∣∣ n = 1, 2, · · ·

}.

They can be geometrically represented by the following figures:

◦ ◦ ◦ ◦

◦ ◦ ◦

◦ ◦

◦ ◦ ◦ ◦

◦ ◦

...................... ◦ ◦

◦ ◦ ◦

...................... ◦

◦ ◦ ◦ ◦

......................

In general, the regular polygonal numbers can be generated recursively asfollows. For pλ(n), fix with λ the number of sides of the polygons, calledλ-polygons, and with n the side-length minus one. Conventionally one fixespλ(1) = 1 because the regular λ-polygon with side length equal to zero reducesto one point. Based on a λ-polygon with side-length equal to n − 1, we canconstruct the next polygon with the side-length equal to n, extending by unitthe two base sides which cross at the starting point and then adding λ − 2new sides parallel with the remaining sides. During this construction, we haveadded 1+n(λ−2) new points to the polygon on the new sides. This procedurecan be illustrated by the following figure of hexagons:

Page 3: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 783

◦ ◦ ◦ ◦

◦ ◦ ◦ ◦

◦ ◦ ◦

.................. ◦ ◦

◦ ◦

..................

.................. ◦

..................

.................. ◦

◦ ◦ ◦

.................. ◦

..................

.................. ◦

..................

..................

..................

.................. ◦

..................

◦ ◦.................. ◦

.................. ◦

..................

Therefore we have the following recurrence relation

pλ(1 + n) = 1 + n(λ − 2) + pλ(n) (1.3a)

with pλ(1) = 1 and n = 1, 2, · · · (1.3b)

which is consistent with (1.1), derived from the arithemetical setting.For λ, μ ∈ N with λ �= μ and λ, μ ≥ 3, we define the regular (λ, μ)-polygonal

numbers to be the natural numbers in the intersection set Pλ ∩ Pμ, which areboth regular λ-polygonal and μ-polygonal. They are characterized by naturalnumber solutions (x, y) of the Diophantine equation pλ(x) = pμ(y), writtenexplicitly as

x + (λ − 2)

(x

2

)= y + (μ − 2)

(y

2

). (1.4)

It is not hard to check that there is bijective correspondence between Pλ ∩Pμ

and the solutions of pλ(x) = pμ(y) in natural numbers. In fact, for any z ∈Pλ ∩ Pμ, there exist exactly two natural numbers x and y such that z =pλ(x) = pμ(y). Throughout the paper, the regular (λ, μ)-polygonal numberswill be represented by the triples (x, y; z), where z is both regular λ-gonal andμ-gonal number with side-lengths equal to x and y respectively.

Page 4: Regular Polygonal Numbers and Generalized Pell Equations

784 CHU Wenchang

For λ = 3 and μ = 4, the first triangular-square numbers can be displayedin the following table:

n xn yn zn

0 1 1 11 8 6 362 49 35 12253 288 204 416164 1681 1189 14137215 9800 6930 48024900

Euler observed in 1730 that the triangle-square numbers have the followingform (cf. Dickson [1, p. 10]):

xn =(3 + 2

√2)n + (3 − 2

√2)n

4− 1

2(n ∈ N)

yn =(3 + 2

√2)n − (3 − 2

√2)n

4√

2(n ∈ N).

Almost half century later, Euler (1778) proved that these are all the regular(3, 4)-polygonal numbers (cf. Dickson [1, p. 16]) which also satisfy the followingcrossing recurrence relations of the first degree:

x1+m = 3xm + 4ym + 1y1+m = 3ym + 2xm + 1

}x0 = y0 = 1

and the independent recurrence relations of the second degree

x1+n = 6xn − xn−1 + 2 : x0 = 1, x1 = 8

y1+n = 6yn − yn−1 : y0 = 1, y1 = 6

as well as the respective generating functions:

f(x) :=

∞∑n=0

xnxn =1 + x

(1 − x)(1 − 6x + x2

)g(y) :=

∞∑n=0

ynyn =1

1 − 6y + y2.

Moreover, in 1742, there was a communication (see Dickson [1, pp. 10-11])between Euler and Goldbach on the pentagon numbers

P5 =

{3n2 − n

2

∣∣∣ n = 1, 2, · · ·}

(1.5)

for which there holds the following celebrated pentagon number theorem dueto Euler (cf. [2, §19.9]):

∞∏m=1

(1 − qm) =+∞∑

n=−∞(−1)nq

3n2−n2 where |q| < 1.

Page 5: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 785

The object of the paper is to determine all the regular (λ, μ)-polygonalnumbers. As preliminaries, we shall review basic facts about the Pell equationsand generalized Pell equations in the next section. Then the Diophantineequation (1.4) will be reduced to generalized Pell equation in the third section.The classification, recurrence relations and generating functions of the regular(λ, μ)-polygonal numbers will be investigated in the fourth section. By meansof computer algebra, the fifth and the last section collects twenty examples ofthe regular (λ, μ)-polygonal numbers, which presents a full coverage for thecases 3 ≤ λ �= μ ≤ 9.

2. Generalized Pell Equations

In order to investigate the Diophantine equations on the regular (λ, μ)-polygonal numbers, we review some basic results about Pell equations andgeneralized Pell equations. For details, the reader can refer to the books [3,§10.9 and §11.5], [6, §6.2] and [8, §7.8].

2.1. Pell equation. With D being a non-perfect-square natural number, Pellequation

u2 − Dv2 = 1 (2.1)

admits always infinite solutions. They can be determined through continuedfraction expansion of

√D. If (u, v) is the minimal positive solution, then all

the non-negative solutions are given by

un ± vn

√D =

{u ± v

√D

}n, (n ∈ N0)

which leads us to the following explicit formulas:

un =1

2

{(u + v

√D

)n+

(u − v

√D

)n}

(2.2a)

vn =1

2√

D

{(u + v

√D

)n −(u − v

√D

)n}. (2.2b)

In addition, the solutions{un, vn

}satisfy the recurrence relations

u1+n = 2u un − un−1

v1+n = 2u vn − vn−1

}and

{u1+n = u un + v vnDv1+n = u vn + v un.

2.2. Generalized Pell equation. For two integers D and N with D beingpositive and non-perfect-square, the generalized Pell equation and the associ-ated Pell equation are displayed as

U2 − DV 2 = N and u2 − Dv2 = 1. (2.3)

If (U, V ) and (u, v) are solutions respectively corresponding to the general-ized Pell equation and the associated Pell equation, then

(uU + vV D, uV + vU)

Page 6: Regular Polygonal Numbers and Generalized Pell Equations

786 CHU Wenchang

derived from the product (cf. [7, §58])

(u+v√

D) × (U+V√

D) = (uU+vV D) + (uV +vU)√

D

forms a new solution of the generalized Pell equation thanks to the relation

(uU+vV D)2 − D(uV +vU)2 = (u2−Dv2) × (U2−DV 2).

Two solutions (U, V ) and (U ′, V ′) of the generalized Pell equation are said tobe equivalent if there exists one solution (u, v) of the associated Pell equationsuch that

(U ′, V ′) = (uU + vV D, uV + vU).

Therefore all the solutions of the generalized Pell equation can be dividedinto equivalent classes, among which each class of solutions consist of double-sequences subject to the crossing recurrence relation of the first degree:

U1+n = uUn + vVnD (2.4a)

V1+n = uVn + vUn (2.4b)

where (u, v) is a solution of the associated Pell equation.Now replacing n by n−1, we can restate the crossing recurrences (2.4a-2.4b)

as

Un = uUn−1 + vVn−1D

Vn = uVn−1 + vUn−1.

Eliminating Vn−1 and Un−1 from these two equations and noting that u2 −Dv2 = 1, we obtain the following expressions

DvVn = uUn − Un−1

vUn = uVn − Vn−1.

Substituting them into (2.4a) and (2.4b), we get the independent recurrencerelations of the second degree

U1+n = 2uUn − Un−1 (2.5a)

V1+n = 2uVn − Vn−1 (2.5b)

which are satisfied by the equivalent class of solutions of the generalized Pellequation corresponding to the crossing recursions (2.4a-2.4b).

3. Diophantine Equation pλ(x) = pμ(y)

For the Diophantine Equation pλ(x) = pμ(y), given explicitly by (1.4), thissection will show how to reduce it canonically to the generalized Pell equation.

Page 7: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 787

Firstly, define two integer parameters:

d(λ) = gcd(λ − 4, 2λ − 4) =

⎧⎪⎨⎪⎩

1, λ ≡ 1 (mod 2)

2, λ ≡ 2 (mod 4)

4, λ ≡ 0 (mod 4)

(3.1a)

c(λ, μ) = gcd{d2(λ)(μ − 2), d2(μ)(λ − 2)

}. (3.1b)

They allow us to rewrite the regular λ-polygonal numbers as

8 pλ(x) = 4 (λ − 2)

{x − λ − 4

2λ − 4

}2

− (λ − 4)2

λ − 2

=1

λ − 2

{(2λ−4)x − (λ−4)

}2

− (λ − 4)2

λ − 2

=d2(λ)

λ − 2

{2λ − 4

d(λ)x − λ − 4

d(λ)

}2

− (λ − 4)2

λ − 2

and the Diophantine equation pλ(x) = pμ(y) as

(λ − μ)(λμ − 2λ − 2μ)

c(λ, μ)=

(μ − 2)d2(λ)

c(λ, μ)

{2λ − 4

d(λ)x − λ − 4

d(λ)

}2

(3.2a)

− (λ − 2)d2(μ)

c(λ, μ)

{2μ − 4

d(μ)y − μ − 4

d(μ)

}2

. (3.2b)

Secondly, with B and M-coefficients being defined respectively by

B(λ, μ) =(μ − 2)d2(λ)

c(λ, μ)(3.3a)

M(λ, μ) =(λ − μ)(λμ − 2λ − 2μ)

c(λ, μ)(3.3b)

we have evidently gcd{B(λ, μ), B(μ, λ)

}= 1 in view of (3.1b). Under the

linear transformation

S :

⎧⎪⎪⎨⎪⎪⎩

X =2λ − 4

d(λ)x − λ − 4

d(λ)

Y =2μ − 4

d(μ)y − μ − 4

d(μ).

(3.4)

the Diophantine equation (1.4) is equivalent to the following

B(λ, μ) X2 − B(μ, λ) Y 2 = M(λ, μ). (3.5)

Observe that B(λ, μ) is an integer on account (3.1a) and (3.1b). For thesame reason, we can check that M(λ, μ) is an integer either, just specifying(3.2a-3.2b) by x = y = 1, which is the “universal solution” of (1.4).

Lastly, applying the square-free factorization

B(λ, μ) = p(λ, μ)q2(λ, μ) (3.6)

Page 8: Regular Polygonal Numbers and Generalized Pell Equations

788 CHU Wenchang

and introducing D and N-coefficients:

D(λ, μ) = p(λ, μ) p(μ, λ) (3.7a)

N(λ, μ) = p(λ, μ) M(λ, μ) (3.7b)

we can restate (3.5) as the generalized Pell equation:

U2 − D(λ, μ) V 2 = N(λ, μ) (3.8)

where we have further introduced the linear transformation

T :

{U = p(λ, μ)q(λ, μ)X

V = q(μ, λ)Y.(3.9)

Summing up, the Diophantine equation (1.4) on regular (λ, μ)-polygonalnumbers has been reduced to the generalized Pell equation (3.8) under thecomposite transformation

Ω[λ, μ] = T ◦ S : (x, y) −→{U(x), V (y)

}explicitly given by:

Ω[λ, μ] :

⎧⎪⎪⎨⎪⎪⎩

U(x) =

{2λ − 4

d(λ)x − λ − 4

d(λ)

}p(λ, μ)q(λ, μ)

V (y) =

{2μ − 4

d(μ)y − μ − 4

d(μ)

}q(μ, λ)

(3.10)

whose inverse transformation reads as

Ω′[λ, μ] :

⎧⎪⎪⎨⎪⎪⎩

x =d(λ)U + (λ − 4) p(λ, μ)q(λ, μ)

(2λ − 4)p(λ, μ)q(λ, μ)

y =d(μ)V + (μ − 4)q(μ, λ)

(2μ − 4)q(μ, λ).

(3.11)

The antisymmetry M(λ, μ) = −M(μ, λ) allows us to choose always the non-negative parameter N(μ, λ) = p(μ, λ) M(μ, λ) by interchanging the positionsof λ and μ.

Remark: Recalling that (x0, y0) = (0, 0) and (x1, y1) = (1, 1) are alwayssolutions of (1.4), we affirm that {U(0), V (0)} and {U(1), V (1)} deduced fromthe composite transformation Ω[λ, μ] are always solutions of the generalizedPell equation (3.8).

4. Regular (λ, μ)-Polygonal Numbers

When the D-coefficient defined by (3.7a) is equal to one, we say that the cor-responding Diophantine equation (1.4) is reducible. In that case, for (λ, μ) �=(3, 6) or (6, 3), equation (1.4) would have finitely many solutions (see §4.1 and§4.2). Otherwise, the Diophantine equation (1.4) corresponding to D �= 1 issaid to be irreducible and the generalized Pell equation (3.8) has infinitelymany solutions (see §4.3 below). Therefore, the original Diophantine equa-tion (1.4) on regular (λ, μ)-polygonal numbers has infinitely many solutions

Page 9: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 789

too. These solutions can be divided into equivalent classes and the solutionsin each class can be determined by recurrence relations and accordingly gen-erating functions.

4.1. Triangular and hexagonal numbers. Consider the extreme case of(3.8) when N(λ, μ) = 0, or M(λ, μ) = 0 equivalently, iff

λμ − 2λ − 2μ = 0

which may be reformulated as

(λ − 2)(μ − 2) = 4.

Under the restrictions λ �= μ ≥ 3, there is a unique solution (λ, μ) = (3, 6). Inthis case, we have D(3, 6) = 1 and the equations (3.8) and (3.10) reduce to

U2 − V 2 = 0 : Ω[3, 6]

{U = 2x + 1

V = 4y − 1

which can be written explicitly as

(U + V ) × (U − V ) = 0 � (x + 2y) × (1 + x − 2y) = 0.

On account of solutions in natural numbers, we can write explicitly the solu-tions as:

xn = 2n − 1yn = n

}(n ∈ N)

n xn yn zn

1 1 1 12 3 2 63 5 3 154 7 4 285 9 5 45

This means that all the hexagon numbers are also triangle numbers. This is theonly reducible case where the equation (1.4) admits infinitely many solutions.

4.2. Reducible cases: Finite solutions. When D(λ, μ) = p(λ, μ)p(μ, λ) isa perfect square number, then D(λ, μ) = 1 thanks to the square free factoriza-tion. In this case, equation (3.8) reduces to

(U + V ) × (U − V ) = N(λ, μ).

This equation can be resolved by factorizing N(λ, μ) into two integers andtherefore has only finitely many solutions for N(λ, μ) �= 0, which is equivalentto (λ, μ) �= (3, 6) and (6, 3).

In view of (3.3a), (3.6) and (3.7a), we have

D(λ, μ) =B(λ, μ)B(μ, λ)

q2(λ, μ)q2(μ, λ)=

(λ − 2)(μ − 2)d2(λ)d2(μ)

c2(λ, μ)q2(λ, μ)q2(μ, λ). (4.1)

Therefore (λ − 2)(μ − 2) must be a perfect square number. In this case, theDiophantine equation (1.4) has only finitely many solutions with (λ, μ) �= (3, 6)and (6, 3).

Page 10: Regular Polygonal Numbers and Generalized Pell Equations

790 CHU Wenchang

Here we present a couple of examples to show the reducible cases.When (λ, μ) = (11, 6), both λ − 2 = 9 and μ − 2 = 4 are perfect square

numbers. The Diophantine equation (1.4) reads as

x(9x − 7) = 2y(2y − 1)

and the reduced Pell equation (3.8) becomes

u2 − v2 = 40 : Ω[11, 6]

{u = 18x − 7v = 12y − 3

which has only the solutions (±7,±3) and (±11,±9). Among these solutions,only (11, 9) gives natural numbers (x, y) = (1, 1) under the correspondinginverse transformation Ω′[11, 6] defined by (3.11). Therefore we have the onlytrivial regular (11, 6)-polygonal number (1, 1).

For (λ, μ) = (29, 5), neither λ − 2 = 27 nor μ − 2 = 3 is perfect squarenumber. But their product 81 is a perfect square number. The correspondingDiophantine equation (1.4) becomes

x(27x − 25) = y(3y − 1)

and the reduced Pell equation (3.8) reads as

u2 − v2 = 616 : Ω[29, 5]

{u = 54x − 25v = 18y − 3.

It has only the solutions (±25,±3), (±29,±15), (±79,±75) and (±155,±153).Among these solutions, only (29, 15) gives natural numbers (x, y) = (1, 1)under the corresponding inverse transformation Ω′[29, 5] defined by (3.11).Therefore we have again in this case the only trivial regular (29, 5)-polygonalnumber (1, 1).

4.3. Irreducible cases: Infinite solutions. When (λ − 2)(μ − 2) is not aperfect square number, the generalized Pell equation (3.8) is not reducible. Re-calling that (3.8) has two universal solutions {U(0), V (0)} and {U(1), V (1)},we deduce that there exists at least one equivalent class of solutions for (3.8).Hence there are infinitely many solutions for the irreducible generalized Pellequation (3.8). These solutions can be classified, according to any fixed so-lution (u, v) of the associated Pell equation, into equivalent classes, each ofwhich satisfies recurrences:

U1+n = uUn + vVnDV1+n = uVn + vUn

}and

{U1+n = 2uUn − Un−1

V1+n = 2uVn − Vn−1.

In what follows, we will determine the recurrence relations satisfied by thesolutions of the Diophantine equation (1.4) on the regular (λ, μ)-polygonalnumbers and the corresponding generating functions.

Page 11: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 791

4.4. Recurrence relations. All the solutions of the Diophantine equation(1.4) turn, under Ω-transform, into solutions of the generalized Pell equation

U2 − D(λ, μ) V 2 = N(λ, μ).

Instead, each equivalent class of solutions of the generalized Pell equationobey crossing recursions (2.4a-2.4b), which are converted, under the inversetransform Ω′, into rational solutions of the original Diophantine equation (1.4).It is not difficult to check that the latter obey again crossing recursions, whichcan be figured out, by substituting the transformation (3.10) into the crossingrecurrence relations (2.4a-2.4b), as follows:

x1+n = u xn + vH(λ, μ) yn + E(λ, μ|u, v) (4.2a)

y1+n = u yn + vH(μ, λ) xn + E(μ, λ|u, v) (4.2b)

where

H(λ, μ) =√

μ−2λ−2

D(λ, μ) =d(μ)p(λ, μ)q(λ, μ)

d(λ)q(μ, λ)(4.3a)

E(λ, μ|u, v) =4 − λ

4−2λ(1 − u) − H(λ, μ)

4 − μ

4− 2μv. (4.3b)

In order to determine the crossing recurrence relations satisfied by the integersolutions of the Diophantine equation (1.4) on the regular (λ, μ)-polygonalnumbers, it is enough to find out the minimum (u, v) among the solutions of theassociated Pell-equation (2.1) such that (4.2a-4.2b) have integer coefficients.

Since (1, 1) is always a solution of the Diophantine equation (1.4), we assertthat any class of equivalent solutions must have the initial values (x0, y0) withx0 being from 1 to the sum of coefficients of (4.2a). Therefore the numberof equivalent classes of the solutions corresponding to the solution (u, v) ofthe associated Pell equation is less than u + vH(λ, μ) + E(λ, μ).

Similar to the derivation from (2.4a-2.4b) to (2.5a-2.5b), we can establishfrom (4.2a-4.2b) the following simplified independent recurrence relations

x1+n = 2u xn − xn−1 +4 − λ

2 − λ(1 − u) (4.4a)

y1+n = 2u yn − yn−1 +4 − μ

2 − μ(1 − u). (4.4b)

4.5. Generating functions. For an equivalent class of solutions satisfyingthe crossing recurrence relations (4.2a-4.2b) with initial solutions (x0, y0), letus denote the generating functions (cf. [9, §1.3-1.4]) by

f(x) :=∞∑

n=0

xnxn and g(y) :=∞∑

n=0

ynyn.

Page 12: Regular Polygonal Numbers and Generalized Pell Equations

792 CHU Wenchang

Multiplying (4.2a-4.2b) by zn and then performing the summation with respectto n with 1 ≤ n < ∞, we get the following simplified functional equations

(1 − uz)f(z) − H(λ, μ)vzg(z) =x0 +

{E(λ, μ) − x0

}z

1 − z

(1 − uz)g(z) − H(μ, λ)vzg(z) =y0 +

{E(μ, λ) − y0

}z

1 − z

Resolving this system of equations, we establish two generating functions

f(x) =(1−ux)

{x0−xx0+xE(λ,μ)

}+vxH(λ,μ)

{y0−xy0+xE(μ,λ)

}(1 − x)(1 − 2ux + x2)

(4.5a)

g(y) =(1−uy)

{y0−yy0+yE(μ,λ)

}+vyH(μ,λ)

{x0−yx0+yE(λ,μ)

}(1 − y)(1 − 2uy + y2)

. (4.5b)

5. Computer Algebra and Examples

For two natural numbers (λ, μ) with λ �= μ ≥ 3 and (λ − 2)(μ − 2) beinga non perfect square number, the following procedure will be carried out inorder to determine the recurrence relations, compute the generating functionsand therefore to resolve the problem concerning the regular (λ, μ)-polygonalnumbers.

A. Write down the Diophantine equation (1.4) on the regular (λ, μ)-polygonalnumbers.

B. Figure out the generalized Pell equation U2 −D(λ, μ)V 2 = N(λ, μ) andthe linear transformation Ω[λ, μ].

C. Resolve the associated Pell equation u2−D(λ, μ)v2 = 1 by PQ-algorithm(cf. [4, §8.1] and [8, §7.9].

D. Find out the minimum (u, v) such that the crossing recurrence relations(4.2a-4.2b) have integer coefficients.

E. Determine the number of classes of equivalent solutions and initial valuesfor each class through Brute-force search ([4, §8.3] and [6, §5.3]) andLMM-algorithm [5].

F. Exhibit crossing recurrence relations (4.2a-4.2b) of the first degree andindependent recursions of the second degree (4.4a-4.4b).

G. Display explicitly generating functions (4.5a-4.5b) for each equivalentclass of solutions.

In order to realize this procedure, a Mathematica package has been de-veloped based on the theoretical preparation of the previous sections. It canprovide us the necessary information about the regular (λ, μ)-polygonal num-bers. For the limit of space, here we present only a collection of the first twentyexamples for 3 ≤ λ �= μ ≤ 9 with (λ− 2)(μ− 2) being non perfect number, i.e.(λ, μ) �= (3, 6).

Example 1. Triangular and square numbers:

Page 13: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 793

• Diophantine equation: x(1 + x) = 2y2.• Pell equation: u2 − 2v2 = 1 where u = 1 + 2x & v = 2y.• Recurrences with initial condition (1, 1):

x1+m = 3xm + 4ym + 1y1+m = 3ym + 2xm + 1

}and

{x1+n = 6xn − xn−1 + 2y1+n = 6yn − yn−1 − 0.

• Generating functions:

f(x) =1 + x

(1 − x)(1 − 6x + x2

) and g(y) =1

1 − 6y + y2.

• The first five numbers:

n xn yn zn

1 8 6 362 49 35 12253 288 204 416164 1681 1189 14137215 9800 6930 48024900

Example 2. Triangular and pentagonal numbers:

• Diophantine equation: x(1 + x) = y(3y − 1).• Pell equation: u2 − 3v2 = 6 where u = 3 + 6x & v = 6y − 1.• Recurrences with initial condition (1, 1):

x1+m = 7xm + 12ym + 1y1+m = 7ym + 4xm + 1

}and

{x1+n = 14xn − xn−1 + 6y1+n = 14yn − yn−1 − 2.

• Generating functions:

f(x) =1 + 5x

(1 − x)(1 − 14x + x2

) and g(y) =1 − 3y

(1 − y)(1 − 14y + y2

) .

• The first five numbers:

n xn yn zn

1 20 12 2102 285 165 407553 3976 2296 79062764 55385 31977 15337768055 771420 445380 297544793910

Example 3. Pentagonal and square numbers:

• Diophantine equation: x(3x − 1) = 2y2.• Pell equation: u2 − 6v2 = 1 where u = 6x − 1 & v = 2y.• Recurrences with initial condition (1, 1):

x1+m = 49xm + 40ym − 8y1+m = 49ym + 60xm − 10

}and

{x1+n = 98xn − xn−1 − 16y1+n = 98yn − yn−1 − 0.

Page 14: Regular Polygonal Numbers and Generalized Pell Equations

794 CHU Wenchang

• Generating functions:

f(x) =1 − 18x + x2

(1 − x)(1 − 98x + x2

) and g(y) =1 − y2

(1 − y)(1 − 98y + y2

) .

• The first five numbers:

n xn yn zn

1 81 99 98012 7921 9701 941094013 776161 950599 9036384588014 76055841 93149001 86767363872980015 7452696241 9127651499 83314021887196947001

Example 4. Hexagonal and square numbers:

• Diophantine equation: 2x(2x − 1) = 2y2.• Pell equation: u2 − 2v2 = 1 where u = 4x − 1 & v = 2y.• Recurrences with initial condition (1, 1):

x1+m = 17xm + 12ym − 4y1+m = 17ym + 24xm − 6

}and

{x1+n = 34xn − xn−1 − 8y1+n = 34yn − yn−1 − 0.

• Generating functions:

f(x) =1 − 10x + x2

(1 − x)(1 − 34x + x2

) and g(y) =1 − y2

(1 − y)(1 − 34y + y2

) .

• The first five numbers:

n xn yn zn

1 25 35 12252 841 1189 14137213 28561 40391 16314328814 970225 1372105 18826721310255 32959081 46611179 2172602007770041

Example 5. Regular (6, 5)-polygonal numbers:

• Diophantine equation: 2x(2x − 1) = y(3y − 1).• Pell equation: u2 − 3v2 = 6 where u = 3(4x − 1) & v = 6y − 1.• Recurrences with initial condition (1, 1):

x1+m = 97xm + 84ym − 38y1+m = 97ym + 112xm − 44

}and

{x1+n = 194xn − xn−1 − 48y1+n = 194yn − yn−1 − 32.

• Generating functions:

f(x) =1 − 52x + 3x2

(1 − x)(1 − 194x + x2

) and g(y) =1 − 30y − 3y2

(1 − y)(1 − 194y + y2

) .

Page 15: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 795

• The first five numbers:

n xn yn zn

1 143 165 407552 27693 31977 15337768053 5372251 6203341 577221562417514 1042188953 1203416145 21723156264682834655 202179284583 233456528757 81752926228785223683195

Example 6. Regular (7, 3)-polygonal numbers:

• Diophantine equation: x(5x − 3) = y(1 + y).• Pell equation: u2 − 5v2 = 4 where u = 10x − 3 & v = 1 + 2y.• Recurrences with initial conditions (1, 1) and (5, 10):

x1+m = 161xm + 72ym − 12y1+m = 161ym + 360xm − 28

}and

{x1+n = 322xn − xn−1 − 96y1+n = 322yn − yn−1 + 160.

• Generating functions:

f(x) =3

10(1 − x)+

1 − x

2(1 − 18x + x2)+

1 − x

5(1 + 18x + x2)

g(y) =−1

2(1 − y)+

1 + y

1 − 18y + y2+

1 + y

2(1 + 18y + y2).

• The first five numbers:

n xn yn zn

1 5 10 552 221 493 1217713 1513 3382 57206534 71065 158905 126254789655 487085 1089154 593128762435

Example 7. Regular (7, 4)-polygonal numbers:

• Diophantine equation: x(5x − 3) = 2y2.• Pell equation: u2 − 10v2 = 9 where u = 10x − 3 & v = 2y.• Recurrences with initial conditions (1, 1), (6, 9) and (49, 77):

x1+m = 721xm + 456ym − 216y1+m = 721ym + 1140xm − 342

}and

{x1+n = 1442xn − xn−1 − 432y1+n = 1442yn − yn−1 + 0.

• Generating functions:

f(x) =3

10(1 − x)+

(1 − x)(7 + 64x + 551x2 + 64x3 + 7x4

)10(1 − 1442x3 + x6)

g(y) =(1 + y)

(1 + 8y + 69y2 + 8y3 + y4

)1 − 1442y3 + y6

.

Page 16: Regular Polygonal Numbers and Generalized Pell Equations

796 CHU Wenchang

• The first five numbers:

n xn yn zn

1 6 9 812 49 77 59293 961 1519 23073614 8214 12987 1686621695 70225 111035 12328771225

Example 8. Regular (7, 5)-polygonal numbers:

• Diophantine equation: x(5x − 3) = y(3y − 1).• Pell equation: u2 − 15v2 = 66 where u = 3(10x − 3) & v = 6y − 1.• Recurrences with initial condition (1, 1):

x1+m = 31xm + 24ym − 13y1+m = 31ym + 40xm − 17

}and

{x1+n = 62xn − xn−1 − 18y1+n = 62yn − yn−1 − 10.

• Generating functions:

f(x) =1 − 21x + 2x2

(1 − x)(1 − 62x + x2

) and g(y) =1 − 9y − 2y2

(1 − y)(1 − 62y + y2

) .

• The first five numbers:

n xn yn zn

1 42 54 43472 2585 3337 167016853 160210 206830 641678699354 9930417 12820113 2465329395890975 615525626 794640166 947179489733441251

Example 9. Regular (7, 6)-polygonal numbers:

• Diophantine equation: x(5x − 3) = 2y(2y − 1).• Pell equation: u2 − 5v2 = 4 where u = 10x − 3 & v = 4y − 1.• Recurrences with initial condition (1, 1):

x1+m = 161xm + 144ym − 84y1+m = 161ym + 180xm − 94

}and

{x1+n = 322xn − xn−1 − 96y1+n = 322yn − yn−1 − 80.

• Generating functions:

f(x) =1 − 102x + 5x2

(1 − x)(1 − 322x + x2

) and g(y) =1 − 76y − 5y2

(1 − y)(1 − 322y + y2

) .

Page 17: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 797

• The first five numbers:

n xn yn zn

1 221 247 1217712 71065 79453 126254789653 22882613 25583539 13090349099455034 7368130225 8237820025 1357233575203441812555 2372515049741 2652552464431 14072069153115290487843091

Example 10. Regular (8, 3)-polygonal numbers:

• Diophantine equation: 2x(3x − 2) = y(1 + y).• Pell equation: u2 − 6v2 = 10 where u = 4(3x − 1) & v = 1 + 2y.• Recurrences with initial conditions (1, 1) and (3, 6):

x1+m = 49xm + 20ym − 6y1+m = 49ym + 120xm − 16

}and

{x1+n = 98xn − xn−1 − 32y1+n = 98yn − yn−1 + 48.

• Generating functions:

f(x) =1

3(1 − x)+

1 − x

2(1 − 10x + x2)+

1 − x

6(1 + 10x + x2)

g(y) =−1

2(1 − y)+

1 + y

1 − 10y + y2+

1 + y

2(1 + 10y + y2).

• The first five numbers:

n xn yn zn

1 3 6 212 63 153 117813 261 638 2038414 6141 15041 1131233615 25543 62566 1957283461

Example 11. Regular (8, 4)-polygonal numbers:

• Diophantine equation: 2x(3x − 2) = 2y2.• Pell equation: u2 − 3v2 = 1 where u = 3x − 1 & v = y.• Recurrences with initial condition (1, 1):

x1+m = 7xm + 4ym − 2y1+m = 7ym + 12xm − 4

}and

{x1+n = 14xn − xn−1 − 4y1+n = 14yn − yn−1 − 0.

• Generating functions:

f(x) =1 − 6x + x2

(1 − x)(1 − 14x + x2

) and g(y) =1 − y2

(1 − y)(1 − 14y + y2

) .

Page 18: Regular Polygonal Numbers and Generalized Pell Equations

798 CHU Wenchang

• The first five numbers:

n xn yn zn

1 9 15 2252 121 209 436813 1681 2911 84739214 23409 40545 16438970255 326041 564719 318907548961

Example 12. Regular (8, 5)-polygonal numbers:

• Diophantine equation: 2x(3x − 2) = y(3y − 1).• Pell equation: u2 − 2v2 = 14 where u = 4(3x − 1) & v = 6y − 1.• Recurrences with initial conditions (1, 1) and (8, 11):

x1+m = 577xm + 408ym − 260y1+m = 577ym + 816xm − 368

}and

{x1+n = 1154xn − xn−1 − 384y1+n = 1154yn − yn−1 − 192.

• Generating functions:

f(x) =1

3(1 − x)+

1 − 5x

2(1 − 34x + x2)+

1 − 7x

6(1 + 34x + x2)

g(y) =1

6(1 − y)+

1 + 7y

2(1 − 34y + y2)+

1 + 5y

3(1 + 34y + y2).

• The first five numbers:

n xn yn zn

1 8 11 1762 725 1025 15754253 8844 12507 2346313204 836265 1182657 20980157781455 10205584 14432875 312461813932000

Example 13. Regular (8, 6)-polygonal numbers:

• Diophantine equation: 2x(3x − 2) = 2y(2y − 1).• Pell equation: u2 − 6v2 = 10 where u = 4(3x − 1) & v = 4y − 1.• Recurrences with initial condition (1, 1):

x1+m = 49xm + 40ym − 26y1+m = 49ym + 60xm − 32

}and

{x1+n = 98xn − xn−1 − 32y1+n = 98yn − yn−1 − 24.

• Generating functions:

f(x) =1 − 36x + 3x2

(1 − x)(1 − 98x + x2

) and g(y) =1 − 22y − 3y2

(1 − y)(1 − 98y + y2

) .

Page 19: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 799

• The first five numbers:

n xn yn zn

1 63 77 117812 6141 7521 1131233613 601723 736957 10862105027414 58962681 72214241 104297931341979215 5777740983 7076258637 100146872588357936901

Example 14. Regular (8, 7)-polygonal numbers:

• Diophantine equation: 2x(3x − 2) = y(5y − 3).• Pell equation: u2 − 30v2 = 130 where u = 20(3x − 1) & v = 10y − 3.• Recurrences with initial condition (1, 1):

x1+m = 241xm + 220ym − 146y1+m = 241ym + 264xm − 160

}and

{x1+n = 482xn − xn−1 − 160y1+n = 482yn − yn−1 − 144.

• Generating functions:

f(x) =1 − 168x + 7x2

(1 − x)(1 − 482x + x2

) and g(y) =1 − 138y − 7y2

(1 − y)(1 − 482y + y2

) .

• The first five numbers:

n xn yn zn

1 315 345 2970452 151669 166145 690101533453 73103983 80081401 160325768451849014 35235967977 38599068993 37247203177580364816335 16983663460771 18604671173081 865334473646149974640821781

Example 15. Regular (9, 3)-polygonal numbers:

• Diophantine equation: x(7x − 5) = y(1 + y).• Pell equation: u2 − 7v2 = 18 where u = 14x − 5 & v = 1 + 2y.• Recurrences with initial condition (1, 1):

x1+m = 8xm + 3ym − 1y1+m = 8ym + 21xm − 4

}and

{x1+n = 16xn − xn−1 − 5y1+n = 16yn − yn−1 + 7.

• Generating functions:

f(x) =1 − 7x + x2

(1 − x)(1 − 16x + x2

) and g(y) =1 + 8y − 2y2

(1 − y)(1 − 16y + y2

) .

Page 20: Regular Polygonal Numbers and Generalized Pell Equations

800 CHU Wenchang

• The first five numbers:

n xn yn zn

1 10 25 3252 154 406 826213 2449 6478 209854814 39025 103249 53302296255 621946 1645513 1353857339341

Example 16. Regular (9, 4)-polygonal numbers:

• Diophantine equation: x(7x − 5) = 2y2.• Pell equation: u2 − 14v2 = 25 where u = 14x − 5 & v = 2y.• Recurrences with initial conditions (1, 1) and (2, 3):

x1+m = 15xm + 8ym − 5y1+m = 15ym + 28xm − 10

}and

{x1+n = 30xn − xn−1 − 10y1+n = 30yn − yn−1 + 0.

• Generating functions:

f(x) =5

14(1 − x)+

(1 − x)(9 + 32x + 9x2

)14(1 − 30x2 + x4)

g(y) =(1 + y)3

1 − 30y2 + y4.

• The first five numbers:

n xn yn zn

1 2 3 92 18 33 10893 49 91 82814 529 989 9781215 1458 2727 7436529

Example 17. Regular (9, 5)-polygonal numbers:

• Diophantine equation: x(7x − 5) = y(3y − 1).• Pell equation: u2 − 21v2 = 204 where u = 3(14x − 5) & v = 6y − 1.• Recurrences with initial conditions (1, 1) and (14, 21):

x1+m = 6049xm + 3960ym − 2820y1+m = 6049ym + 9240xm − 4308

}and

{x1+n = 12098xn − xn−1 − 4320y1+n = 12098yn − yn−1 − 2016.

• Generating functions:

f(x) =5

14(1 − x)+

1 − 31x

2(1 − 110x + x2)+

1 − 71x

7(1 + 110x + x2)

g(y) =1

6(1 − y)+

1 + 71y

3(1 − 110y + y2)+

1 + 31y

2(1 + 110y + y2).

Page 21: Regular Polygonal Numbers and Generalized Pell Equations

Regular Polygonal Numbers 801

• The first five numbers:

n xn yn zn

1 14 21 6512 7189 10981 1808680513 165026 252081 953171198014 86968201 132846121 264721377306969015 1996480214 3049673901 13950766352135999751

Example 18. Regular (9, 6)-polygonal numbers:

• Diophantine equation: x(7x − 5) = 2y(2y − 1).• Pell equation: u2 − 7v2 = 18 where u = 14x − 5 & v = 4y − 1.• Recurrences with initial conditions (1, 1) and (10, 13):

x1+m = 32257xm+24384ym−17616y1+m = 32257ym+42672xm−23304

}and

{x1+n = 64514xn−xn−1−23040y1+n = 64514yn−yn−1−16128.

• Generating functions:

f(x) =5

14(1 − x)+

9(1 − 127x)

14(1 − 254x + x2)− 72x

1 + 254x + x2

g(y) =1

4(1 − y)+

108y

1 − 254y + y2+

3(1 + 127y)

4(1 + 254y + y2).

• The first five numbers:

n xn yn zn

1 10 13 3252 39025 51625 53302296253 621946 822757 13538573393414 2517635809 3330519121 221847152273627061615 40124201194 53079328957 5634830324997758086741

Example 19. Regular (9, 7)-polygonal numbers:

• Diophantine equation: x(7x − 5) = y(5y − 3).• Pell equation: u2 − 35v2 = 310 where u = 5(14x − 5) & v = 10y − 3.• Recurrences with initial condition (1, 1):

x1+m = 71xm + 60ym − 43y1+m = 71ym + 84xm − 51

}and

{x1+n = 142xn − xn−1 − 50y1+n = 142yn − yn−1 − 42.

• Generating functions:

f(x) =1 − 55x + 4x2

(1 − x)(1 − 142x + x2

) and g(y) =1 − 39y − 4y2

(1 − y)(1 − 142y + y2

) .

Page 22: Regular Polygonal Numbers and Generalized Pell Equations

802 CHU Wenchang

• The first five numbers:

n xn yn zn

1 88 104 268842 12445 14725 5420419753 1767052 2090804 109286502798344 250908889 296879401 2203434463999779015 35627295136 42154784096 4442564555387704166896

Example 20. Regular (9, 8)-polygonal numbers:

• Diophantine equation: x(7x − 5) = 2y(3y − 2).• Pell equation: u2 − 42v2 = 57 where u = 3(14x − 5) & v = 2(3y − 1).• Recurrences with initial condition (1, 1):

x1+m = 337xm + 312ym − 224y1+m = 337ym + 364xm − 242

}and

{x1+n = 674xn − xn−1 − 240y1+n = 674yn − yn−1 − 224.

• Generating functions:

f(x) =1 − 250x + 9x2

(1 − x)(1 − 674x + x2

) and g(y) =1 − 216y − 9y2

(1 − y)(1 − 674y + y2

) .

• The first five numbers:

n xn yn zn

1 425 459 6311252 286209 309141 2867038553613 192904201 208360351 1302421071898089014 130017145025 140434567209 591656030012565450146255 87631362842409 94652689938291 26877395137662573622784125461

References

[1] L. E. Dickson, History of the Theory of Numbers: Volume II - Diophantine Analy-sis, New York Stechert, 1934.

[2] G. H. Hardy & E. M. Wright, An Introduction to the Theory of Numbers, OxfordUniversity Press, 1979.

[3] L. K. Hua, Introduction to the Theory of Numbers, Springer-Verlag, Berlin - New York,1982.

[4] V. J. LeVeque, Topics in Number Theory, Addison-Wesley, New York, 1956.[5] K. Matthews, The Diophantine equation x2 − Dy2 = N , Expositiones Mathematicae

18 (2000), 323-331.[6] R. E. Mollin, Fundamental Number Theory with Applications, CRC Press, Boca Raton,

1998.[7] T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York,

1981.[8] I. Niven, H. S. Zuckerman e H. L. Montgomery, An Introduction to the Theory of

Numbers, John Wiley & Sons, New York, 1980.[9] H. S. Wilf, Generatingfunctionology (second edition), Academic Press Inc., London,

1994.

Received: April 19, 2006