Finding g-gonal numbers in recurrence
sequences
Szabolcs Tengely
Mathematical Institute
University of Debrecen
and the Number Theory Research Groupof the Hungarian Academy of Sciences
P.O.Box 124010 Debrecen
Hungarytengely@math.klte.hu
Abstract
In this note we find all g-gonal numbers in the Fibonacci, Lucas, Pell and Associated Pellsequences for g ∈ {6, 8, 9, 10, . . . , 20}.
1. Introduction
The m-th g-gonal number is defined bym{(g − 2)m − (g − 4)}.
Gm,g =2
If m is a positive integer and g = 3, 4, 5, 6, 7, 8, . . . , then the number Gm,g is called triangular,square, pentagonal, hexagonal, heptagonal, octagonal etc. There are many articles concerning
the mixed exponential-polynomial Diophantine equation
Rn = P (x),where Rn is a linear recursive sequence and P ∈ Z[X] is a polynomial. Here we refer to [3],[10], [16], [17], [18], [19], [20] and the references given there. Several papers have been publishedidentifying the numbers Gm,g (for certain values of g) in the Fibonacci sequence {Fn }, Lucassequence {Ln }, Pell sequence {Pn } and Associated Pell sequence {Qn }, where these sequences
are defined by
F0 = 0, F1 = 1, Fn = Fn−1 + Fn−2 for n ≥ 2,
L0 = 2, L1 = 1, Ln = Ln−1 + Ln−2 for n ≥ 2,
P0 = 0, P1 = 1, Pn = 2Pn−1 + Pn−2 for n ≥ 2,
Q0 = 1, Q1 = 1, Qn = 2Qn−1 + Qn−2 for n ≥ 2.
In the table below we summarize related results in cases of g = 3, 4, 5 and 7.
12FnLnPnQnGm,3[11]: {0, 1, 3, 21, 55}[12]: {1, 3}[15]: {0, 1}[24]: {1, 3}

Gm,4[8, 9]: {0, 1, 144}[5]: {1, 4}[7]: {0, 1, 169}[7]: {1}Gm,5[13]: {0, 1, 5}[14]: {2, 1, 7}[23]: {0, 1, 2, 5, 12, 70}[22]: {1, 7}Gm,7[26]: {0, 1, 13, 34, 55}[25]: {1, 4, 7, 18}[28]: {0, 1, 70}[27]: {1, 7, 99}

We note that the result related to the equation Fn = Gm,4 is a straightforward consequence oftwo papers by Ljunggren [8, 9] and it was rediscovered by Cohn [5].
In the present paper we resolve the equations
Fn = Gm,g ,Pn = Gm,g ,Ln = Gm,g ,Qn = Gm,g ,for g ∈ {6, 8, 9, 10, . . . , 20}.
Our main result is the following.
Theorem 1.1. All the solutions of the equations Fn = Gm,g , Ln = Gm,g , Pn = Gm,g and Qn = Gm,gwith m, n ≥ 0 for g ∈ {6, 8, 9, 10, . . . , 20} are those which are summarized in the table below.
FnLnPnQnGm,6{0, 1, 3, 21, 55}{1, 3, 5778}{0, 1}{1, 3}

Gm,8{0, 1, 5, 8, 21, 4181}{1}{0, 1, 5, 408}
{1}

Gm,9
{0, 1}{1}{0, 1}{1}

Gm,10{0, 1}{1, 7, 76}{0, 1}{1, 7}

Gm,11{0, 1, 8}{1, 11}{0, 1}{1}

Gm,12{0, 1}{1}{0, 1, 12}
{1}

Gm,13
{0, 1, 13}{1}{0, 1, 70}
{1}

Fn
Ln
Pn
Qn

Gm,14
{0, 1, 34}{1, 11, 76}{0, 1}{1}

Gm,15{0, 1}{1}{0, 1, 12}{1}Gm,16{0, 1, 13}{1}{0, 1}{1}

Gm,17{0, 1, 2584}{1, 322}{0, 1}{1, 17, 47321}

Gm,18{0, 1}{1, 18}{0, 1}{1}

Gm,19{0, 1, 2584}{1}{0, 1}{1, 99}Gm,20{0, 1}{1}{0, 1}{1, 17}

Proof. The statement follows from Lemma 2, Lemma 3, Lemma 4 and Lemma 5.

We use the following well known properties of the sequences Fn , Ln , Pn and Qn :L2n − 5Fn2 = 4(−1)n ,Q2n − 2Pn2 = (−1)n .

(1)(2)

2. The equation Fn = Gm,gIf n is even, then from (1) we getCFeven:n

Y 2 = 5((g − 2)X 2 − (g − 4)X)2 + 16,CFodd:n

Y 2 = 5((g − 2)X 2 − (g − 4)X)2 − 16.

and if n is odd, then
One can easily check that (X, Y ) = (0, 4) is a point on the curve CFevenand (X, Y ) = (1, 2) isnodd
a point on CFn , that is these curves define elliptic curves. We need to find the integral points
on these genus 1 curves for fixed g to solve the equation Fn = Gm,g . One can apply the socalled elliptic logarithm method (see [6],[29],[30]). This method is now available in the computer
algebra package MAGMA [1]. We have the following result.

3Lemma 2.1. The solutions of the equation Fn = Gm,g with m, n ≥ 0 and g ∈ {6, 8, 9, 10, . . . , 20}
areF0 = G0,g , F1 = F2 = G1,g , where g ∈ {6, 8, 9, 10, . . . , 20},
F4 = G−1,6 , F8 = G−3,6 , F10 = G−5,6 ,F5 = G−1,8 , F6 = G2,8 , F8 = G3,8 , F19 = G−37,8 ,F6 = G−1,11 , F7 = G2,13 , F9 = G−2,14 , F7 = G−1,16 ,F18 = G19,17 , F18 = G−17,19 .
Proof. we have reduced the problem to computing integral points on certain elliptic curves.
Using the computer package MAGMA [1], we find the solutions listed in the theorem.
3. The equation Ln = Gm,gIf n is even, then from (1) we get
CLeven:n

Y 2 = 5((g − 2)X 2 − (g − 4)X)2 − 80,

CLodd:nY 2 = 5((g − 2)X 2 − (g − 4)X)2 + 80.

and if n is odd, thenIt is easy to see that (1, 10) ∈ CLodd(Q). Here, we have the following result.
nLemma 3.1. The solutions of the equation Ln = Gm,g with m, n ≥ 0 and g ∈ {6, 8, 9, 10, . . . , 20}
are
L1 = G1,g , where g ∈ {6, 8, 9, 10, . . . , 20},
L2 = G−1,6 , L18 = G54,6 , L4 = G−1,10 ,L9 = G−4,10 , L5 = G2,11 , L5 = G−1,14 , L9 = G4,14 ,L12 = G7,17 , L6 = G2,18 .
(Q), therefore it is an elliptic curve and we use
Proof. The point (1, 10) is on the curve CLoddn
MAGMA again to find all integral points on these curves. Similarly we have points on CLeven(Q)
nfor g ∈ {6, 10, 17, 18}, so the same method works to solve the problem in these cases. Forg ∈ {8, 9, 11, 13, 14, 16, 19} we get that the equations do not have solutions in Q5 . As an example
we consider the case g = 8. The equation isY 2 = 180X 4 − 240X 3 + 80X 2 − 80.
The above equation does not have solutions modulo 125. It remains to deal with the casesg ∈ {12, 15, 20}. The corresponding equations are
g = 12 :g = 15 :g = 20 :Y 2 = 500X 4 − 800X 3 + 320X 2 − 80,
Y 2 = 845X 4 − 1430X 3 + 605X 2 − 80,
Y 2 = 1620X 4 − 2880X 3 + 1280X 2 − 80.

4We give the proof for g = 12, the other two equations can be solved similarly. All solutions ofthe Diophantine equation A2 − 5B 2 = −5C 2 can be given in parametric form as follows (see e.g.,[4])t
A = − 10uv,
ht
B = − (u2 + 5v 2 ),ht 2
C = (u − 5v 2 ),hwhere h | 50 and gcd(u, v) = 1. The equation Y 2 = 500X 4 − 800X 3 + 320X 2 − 80 can be written
as Y 2 − 5(10X 2 − 8X)2 = −5(4)2 . Hence we havet
Y = − 10uv,ht
2
10X − 8X = − (u2 + 5v 2 ),ht 2(u − 5v 2 ).
4 =hTherefore we get that t | 4. We rewrite the second equation as (10X − 4)2 − 16 = −10 ht (u2 + 5v 2 ).
Since 16 = 4 ht (u2 − 5v 2 ) we obtaintt(10X − 4)2 = −6 u2 − 70 v 2 .
hhFor given t, h we parametrize all solutions of these equations as
10X − 4 = p1,t,h (r, s),u = p2,t,h (r, s),v = p3,t,h (r, s),where p1,t,h , p2,t,h , p3,t,h are homogeneous degree 2 polynomials. Thus we obtain quartic Thue
equationst
4 = (p2,t,h (r, s)2 − 5p3,t,h (r, s)2 ).
hWe use MAGMA to solve these equations and than obtain all solutions of the equation Ln =Gm,12 .
4. The equation Pn = Gm,gIf n is even, then from (2) we getCPeven:n

Y 2 = 2((g − 2)X 2 − (g − 4)X)2 + 4,CPodd:n

Y 2 = 2((g − 2)X 2 − (g − 4)X)2 − 4.

and if n is odd, then5

We have that (0, 2) ∈ CPeven(Q) and (1, 2) ∈ CPodd(Q). We compute the integral points on thesenncurves and obtain the following result.
Lemma 4.1. The solutions of the equation Pn = Gm,g with m, n ≥ 0 and g ∈ {6, 8, 9, 10, . . . , 20}
areP0 = G0,g , P1 = G1,g , where g ∈ {6, 8, 9, 10, . . . , 20},
P3 = G−1,8 , P8 = G12,8 , P4 = G2,12 ,P6 = G4,13 , P4 = G−1,15 .
5. The equation Qn = Gm,gIf n is even, then from (2) we get:
CQevenn

Y 2 = 2((g − 2)X 2 − (g − 4)X)2 − 8,CQodd:n

Y 2 = 2((g − 2)X 2 − (g − 4)X)2 + 8.

and if n is odd, thenHere we have that (1, 0) ∈ CQeven(Q) and (1, 4) ∈ CQodd(Q). Substituting X = U + 1 in case ofnneven
CQn we getY 2 = U (2g 2 − 8g + 8)U 3 + (4g 2 − 8g)U 2 + (2g 2 + 8g − 16)U + 8g .
Hence we have thatU | 8g or(2g 2 − 8g + 8)U 3 + (4g 2 − 8g)U 2 + (2g 2 + 8g − 16)U + 8g =  or
(2g 2 − 8g + 8)U 3 + (4g 2 − 8g)U 2 + (2g 2 + 8g − 16)U + 8g = −.
We have the following result.
Lemma 5.1. The solutions of the equation Qn = Gm,g with m, n ≥ 0 and g ∈ {6, 8, 9, 10, . . . , 20}
areQ0 = G1,g , Q1 = G1,g , where g ∈ {6, 8, 9, 10, . . . , 20},
Q2 = G−1,6 , Q3 = G−1,10 , Q4 = G2,17 ,Q13 = G−79,17 , Q6 = G−3,19 , Q4 = G−1,20 .
Remark. Siegel [21] in 1926 proved that the hyperelliptic equationy 2 = a0 xn + a1 xn−1 + . . . + an =: f (x)has only a finite number of integer solutions if f has at least three simple roots. This result isineffective, that is, its proof does not provide any algorithm for finding the solutions. By using
explicit lower bounds for linear forms in logarithms Baker [2] gave an effective version of theabove result of Siegel. To show that for fixed g the equation
Gm,g = Rn ,Rn ∈ {Fn , Ln , Pn , Qn }

6has only finitely many effectively computable solutions one has to prove that the quartic polynomials defining the genus 1 curves CReven, CRodd
have at least three simple roots. It is easy tonnsee that the discriminant of these quartic polynomials can be zero only if g = 0 or g = 2, hence
there are only finitely many effectively computable solutions for fixed g > 2.
Acknowledgement. The author is grateful to the referee for the useful remarks. The research
was supported by OTKA PD75264 and János Bolyai Research Scholarship of the Hungarian
Academy of Sciences.
References[1] W. Bosma, J. Cannon, and C. Playoust. The Magma algebra system. I. The user language. J. SymbolicComput., 24(3-4):235–265, 1997. Computational algebra and number theory (London, 1993).
[2] A. Baker. Bounds for the solutions of the hyperelliptic equation. Proc. Cambridge Philos. Soc., 65:439–444,1969.
[3] Y. Bugeaud, M. Mignotte, and S. Siksek. Classical and modular approaches to exponential Diophantineequations. I. Fibonacci and Lucas perfect powers. Ann. of Math. (2), 163(3):969–1018, 2006.
[4] E. L. Cohen, On the Diophantine Equation x2 − Dy 2 = nz 2 , J. Number Theory 40 (1992), 86-91.
[5] J. H. E. Cohn. Lucas and Fibonacci numbers and some Diophantine equations. Proc. Glasgow Math. Assoc.,
7:24–28 (1965), 1965.
[6] J. Gebel, A. Pethő, and H. G. Zimmer. Computing integral points on elliptic curves. Acta Arith., 68(2):171–192, 1994.
[7] Shin-ichi Katayama and Shigeru Katayama. Fibonacci, Lucas and Pell numbers and class numbers of bicyclicbiquadratic fields. Math. Japon., 42(1):121–126, 1995.
[8] W. Ljunggren. uber die unbestimmte gleichung Ax2 − By 4 = C. Arch. f. Mat. og Naturvid., 41(10):18 pp.,
1938.
[9] W. Ljunggren. On the Diophantine equation x2 + 4 = Ay 4 . Norske Vid. Selsk. Forh., Trondheim, 24:82–84(1952), 1951.
[10] Hymie London and Raphael Finkelstein. On Fibonacci and Lucas numbers which are perfect powers. Fibonacci Quart. 7 (1969), no. 5, 476-481, 487; errata, ibid., 8(3):248, 1970.
[11] Ming Luo. On triangular Fibonacci numbers. Fibonacci Quart., 27(2):98–108, 1989.
[12] Ming Luo. On triangular Lucas numbers. In Applications of Fibonacci numbers, Vol. 4 (Winston-Salem, NC,1990), pages 231–240. Kluwer Acad. Publ., Dordrecht, 1991.
[13] Ming Luo. Pentagonal numbers in the Fibonacci sequence. In Applications of Fibonacci numbers, Vol. 6(Pullman, WA, 1994), pages 349–354. Kluwer Acad. Publ., Dordrecht, 1996.
[14] Ming Luo. Pentagonal numbers in the Lucas sequence. Portugal. Math., 53(3):325–329, 1996.
[15] Wayne L. McDaniel. Triangular numbers in the Pell sequence. Fibonacci Quart., 34(2):105–107, 1996.
[16] A. Pethő. Full cubes in the Fibonacci sequence. Publ. Math. Debrecen, 30(1-2):117–127, 1983.
[17] A. Pethő. Perfect powers in second order recurrences. In Topics in classical number theory, Vol. I, II (Budapest, 1981), volume 34 of Colloq. Math. Soc. János Bolyai, pages 1217–1227. North-Holland, Amsterdam,1984.
[18] Attila Pethő. Diophantine properties of linear recursive sequences. II. Acta Math. Acad. Paedagog. Nyházi.
(N.S.), 17(2):81–96 (electronic), 2001.
[19] Neville Robbins. On Fibonacci numbers which are powers. II. Fibonacci Quart., 21(3):215–218, 1983.
[20] T. N. Shorey and R. Tijdeman. Exponential Diophantine equations, volume 87 of Cambridge Tracts inMathematics. Cambridge University Press, Cambridge, 1986.
[21] C. L. Siegel. The integer solutions of the equation y 2 = axn + bxn−1 + . . . + k. J. Lond. Math. Soc., 1:66–68,1926.

7[22] V. Siva Rama Prasad and B. Srinivasa Rao. Pentagonal numbers in the associated Pell sequence and Diophantine equations x2 (3x − 1)2 = 8y 2 ± 4. Fibonacci Quart., 39(4):299–303, 2001.
[23] V. Siva Rama Prasad and B. Srinivasa Rao. Pentagonal numbers in the Pell sequence and Diophantine
equations 2x2 = y 2 (3y − 1)2 ± 2. Fibonacci Quart., 40(3):233–241, 2002. A special tribute to Calvin T. Long.
[24] V. Siva Rama Prasad and B. Srinivasa Rao. Triangular numbers in the associated Pell sequence and Diophantine equations x2 (x + 1)2 = 8y 2 ± 4. Indian J. Pure Appl. Math., 33(11):1643–1648, 2002.
[25] B. Srinivasa Rao. Heptagonal numbers in the Lucas sequence and Diophantine equations x2 (5x − 3)2 =20y 2 ± 16. Fibonacci Quart., 40(4):319–322, 2002.
[26] B. Srinivasa Rao. Heptagonal numbers in the Fibonacci sequence and Diophantine equations 4x2 = 5y 2 (5y −3)2 ± 16. Fibonacci Quart., 41(5):414–420, 2003.
[27] B. Srinivasa Rao. Heptagonal numbers in the associated Pell sequence and Diophantine equations x2 (5x −3)2 = 8y 2 ± 4. Fibonacci Quart., 43(4):302–306, 2005.
[28] B. Srinivasa Rao. Heptagonal numbers in the Pell sequence and Diophantine equations 2x2 = y 2 (5y −3)2 ±2.
Fibonacci Quart., 43(3):194–201, 2005.
[29] R. J. Stroeker and N. Tzanakis. Solving elliptic Diophantine equations by estimating linear forms in elliptic
logarithms. Acta Arith., 67(2):177–196, 1994.
[30] N. Tzanakis. Solving elliptic Diophantine equations by estimating linear forms in elliptic logarithms. The
case of quartic equations. Acta Arith., 75(2):165–190, 1996.