> # The above equation tauseven is the 7th order degree 8 equation (2.4).

> # (2.4) is expressed here as a relation between tau[0], tau[1], tau[2], tau[3], tau[4], tau[5], tau[6], tau[7].

> # This directly verifies the proof of part (1) of Proposition 2.1.

> # In order to derive and verify part (2), the above recurrence is iterated to generate 14 adjacent iterates

> # given in terms of the 7 initial values tau[0], tau[1], tau[2], tau[3], tau[4], tau[5], tau[6].

> # The iterates are denoted t[n] for brevity.

> # t[0], t[1], t[2], t[3], t[4], t[5], t[6] are 7 arbitrary initial data for (2.4).

> topsol := solve(tauseven, tau[7]):

> for n from 7 to 10 do t[n] := topsol: for m from 0 to 6 do t[n] := factor(simplify(subs(tau[m] = t[m + n - 7], t[n]))): od: print(t[n]): od:

> # Have generated t[7], t[8], t[9], t[10]. Rather than generating up to t[13], which is slow

> # due to the increasing size of the expressions, apply the inverse map to generate t[-1], t[-2], t[-3].

> # This is faster and more efficient.

> botsol := solve(tauseven, tau[0]);

> for n from 1 to 3 do t[-n] := botsol: for m from 0 to 6 do t[-n] := factor(simplify(subs(tau[m + 1] = t[m - n + 1], t[-n]))): od: print(t[-n]): od:

> # Remark : Observe that these iterates are all Laurent polynomials, in accordance with Proposition 2.3.

> # Now calculate determinant of matrix corresponding to 5 copies of Somos - 9 recurrence.

> f := (i, j) → t[i + j - 5] · t[i - j + 6]: M := Matrix(5, f): simplify(Determinant(M));

> nullM := NullSpace(M);

> nops(nullM); kernelvec := op(1, nullM);

> nullity := 5 - Rank(M); for j from 1 to 5 do al[j] := kernelvec[j] od;

> # Entries of vector that spans the 1 - dimensional nullspace (kernel) of matrix M.

> # Checking that Somos - 9 relation is invariant under shifts :

> # Would like to normalize the entries of the vector in the kernel, and show they are invariant under shift.

> # It is convenient to first show they are functions of the initial data w[0], w[1], w[2], w[3], then check invariance.

> for j from 1 to 4 do alw[j] := al[j]: for m from 0 to 3 do alw[j] := subs(t[m] = w[m] · t[m + 1] · t[m + 2] / (t[m + 3]), alw[j]): od: od:

> for j from 1 to 4 do alw[j] := simplify(alw[j]): print(alw[j]): od: k[1] := denom(alw[4]);

> # Can recognize this polynomial as the first integral K[1] for the map (P.iv), given by (1.3).

> alw[5] := 1: for j from 1 to 5 do alpha[j] := simplify(-k[1] · alw[j] · denom(alw[1])) od;

> # Write all normalized coefficients as polynomials in the two invariants (first integrals) for the map (P.iv).

> k[2] := collect(collect(collect(simplify((alpha[2] + k[1]²) · a⁻¹), a), b), nu);

> # Recognize this as the first integral K[2] for the map (P.iv), given by (1.4).

> simplify(alpha[1] - k[1]); simplify(alpha[2] - a · k[2] + k[1]²); simplify(alpha[3] - a · (a · k[2] - 2 · k[1]²)); simplify(alpha[4] - a · (a² · k[1] + b · k[1]² + nu · k[1] · k[2] + k[2]²)); simplify(alpha[5] + k[1] · (a² · k[1] + b · k[1]² + nu · k[1] · k[2] + k[2]²));

> # This completes the proof of part (2) of Proposition 2.1.

**Acknowledgments:** The research of ANWH was supported by Fellowship EP/M004333/1 from the Engineering & Physical Sciences Research Council, UK and grant IEC\R3\193024 from the Royal Society; he is also grateful to the School of Mathematics and Statistics, University of New South Wales, for hosting him during 2017-2019 as a Visiting Professorial Fellow with funding from the Distinguished Researcher Visitor Scheme, and to Wolfgang Schief, who provided additional support during his time in Sydney. We would like to thank the two anonymous referees for numerous detailed comments, which have helped to clarify the paper in several places.

## References

[1] M. Adler, P. van Moerbeke, and P. Vanhaecke. *Algebraic integrability, Painlevé geometry and Lie algebras*, vol. 47 of *Ergebnisse der Mathematik und ihrer Grenzgebiete*. Springer-Verlag, Berlin, 2004.
[2] N.I. Akhiezer, Elements of the Theory of Elliptic Functions, Translations of Mathematical Monographs, vol. 79, American Mathematical Society, 1990.

[3] A.I. Aptekarev, Asymptotic properties of polynomials orthogonal on a system of contours and periodic motions of Toda lattices, Mat. Sb. **125** (1984) 231–258.

[4] C. Benassi and A. Moro, Thermodynamic limit and dispersive regularization in matrix models, Phys. Rev. E **101** (2020) 052118.

[5] M. Bertola, Padé approximants on Riemann surfaces and KP tau functions, Analysis Math. Phys. **11** (2021) 149.

[6] M. Bellon and C.M. Viallet, Algebraic entropy, Comm. Math. Phys. **204** (1999) 425–437.

[7] M. Bruschi, O. Ragnisco, P.M. Santini and T. Gui-Zhang, Integrable symplectic maps, Physica D **49** (1991) 273–294.

[8] X.-K. Chang, X.-B. Hu and G. Xin, Hankel Determinant Solutions to Several Discrete Integrable Systems and the Laurent Property, SIAM J. Discrete Math. **29** (2015) 667–682.

[9] Y. Chen and A.R. Its, A Riemann–Hilbert approach to the Akhiezer polynomials, Phil. Trans. R. Soc. A **366** (2008) 973–1003.

[10] X.-M. Chen, X.-B. Hu and F. Müller-Hoissen, Non-isospectral extension of the Volterra lattice hierarchy, and Hankel determinants, Nonlinearity **31** (2018) 4393–4422.

[11] P.A. Clarkson, K. Jordaan and A. Loureiro, Generalized higher-order Freud weights, Proc. R. Soc. A **479** (2023) 20220788.

[12] C. Cresswell and N. Joshi, The discrete first, second and thirty-fourth Painlevé hierarchies, J. Phys. A: Math. Gen. **32** (1999) 655–69.

[13] D.K. Demskoi, D.T. Tran, P.H. van der Kamp and G.R.W. Quispel, A novel nth order difference equation that may be integrable, J. Phys. A: Math. Theor. **45** (2012) 135202.

[14] J. Diller and C. Favre, Dynamics of bimeromorphic maps of surfaces, Amer. J. of Math. **123** (2001) 1135–1169.

[15] A. Doliwa and A. Siemaszko, Hermite-Padé approximation and integrability, J. Approximation Theory **292** (2023); arXiv:2201.06829

[16] J.J. Duistermaat, Discrete Integrable Systems: QRT Maps and Elliptic Surfaces, Springer, 2010.

[17] D. Duverney and I. Shiokawa, Continuants and convergence of certain continued fractions, arXiv:2210.09862v1

[18] S. Fomin and A. Zelevinsky, Cluster algebras I: Foundations, J. Amer. Math. Soc. **15** (2002) 497–529.

[19] A.P. Fordy and A.N.W Hone, Discrete integrable systems and Poisson algebras from cluster maps, Comm. Math. Phys. **325** (2014) 527–584.

[20] F. Gesztesy, H. Holden, B. Simon and Z. Zhao, On the Toda and Kac-van Moerbeke Systems, Trans. Amer. Math. Soc. **339** (1993) 849–868.

[21] G. Gubbiotti, N. Joshi, D.T. Tran and C.-M. Viallet, Complexity and integrability in 4D bi-rational maps with two invariants. In: Nijhoff F., Shi Y., Zhang D. (eds), Asymptotic, Algebraic and Geometric Aspects of Integrable Systems. Springer Proceedings in Mathematics & Statistics, vol. **338**, Springer, Cham, pp.17–36, 2020.

[22] G. Gubbiotti, N. Joshi, D.T. Tran and C.-M. Viallet, Bi-rational maps in four dimensions with two invariants, J. Phys. A: Math. Theor. **53** (2020) 115201.

[23] G. Gubbiotti, Lagrangians and integrability for additive fourth-order difference equations, Eur. Phys. J. Plus **135** (2020) 853.

[24] K. Hamad, A.N.W. Hone, P. van der Kamp and G.R.W. Quispel, QRT maps and related Laurent systems, Adv. Appl. Math. **96** (2018) 216–248.

[25] A.N.W. Hone, Sigma function solution of the initial value problem for Somos 5 sequences, Trans. Amer. Math. Soc. **359** (2007) 5019–5034.

[26] A. N. W. Hone, Singularity confinement for maps with the Laurent property, Phys. Lett. A **361** (2007) 341–345.

[27] A.N.W. Hone and M. Senthilvelan, Note on the Poisson structure of the damped oscillator, J. Math. Phys. **50** (2009) 102902.
[28] A.N.W. Hone and M. Petrera, Three-dimensional discrete systems of Hirota-Kimura type and deformed Lie-Poisson algebras, Journal of Geometric Mechanics **1** (2009) 55-85.

[29] A.N.W. Hone, Analytic solution and integrability for a bilinear recurrence of order six, Applicable Analysis **89** (2010) 473-492.

[30] A.N.W. Hone, T.E. Kouloukas and G.R.W. Quispel, Some integrable maps and their Hirota bilinear forms, J. Phys. A: Math. Theor. **51** (2018) 044004.

[31] A.N.W. Hone, Continued fractions and Hankel determinants from hyperelliptic curves, Comm. Pure Appl. Math. **73** (2020) 2310-2347.

[32] A.N.W. Hone, J.A.G. Roberts, P. Vanhaecke and F. Zullo, Integrable maps in 4D and modified Volterra lattices, Open Communications in Nonlinear Mathematical Physics, Special Issue in Memory of Decio Levi (2024) ocnmp:12491; arXiv:2310.19584

[33] A. Iatrou and J.A.G. Roberts, Integrable mappings of the plane preserving biquadratic invariant curves II, Nonlinearity **15** (2002) 459-489.

[34] N. Joshi and C.-M. Viallet, Rational maps with invariant surfaces, J. Int. Syst. **3** (2018) xyy017.

[35] M. Kac and P. van Moerbeke, On an Explicitly Soluble System of Nonlinear Differential Equations Related to Certain Toda Lattices, Adv. Math. **16** (1975) 160-169.

[36] M. Kanki, J. Mada, K.M. Tamizhmani, T. Tokihiro, Discrete Painlevé II equation over finite fields, J. Phys. A: Math. Theor. **45** (2012) 342001.

[37] A.V. Kitaev, A note on the averaging for single-phase elliptic solutions of the Toda and the Volterra lattices, Physica D **74** (1994) 45-58.

[38] T. Lam and P. Pylyavskyy, Laurent phenomenon algebras, Cam. J. Math. **4** (2012) 121-162.

[39] S. Maeda, Completely integrable symplectic mapping, Proc. Japan Acad. Ser. A Math. Sci. **63** (1987) 198-200.

[40] T. Mase, Investigation into the role of the Laurent property in integrability, J. Math. Phys. **57** (2016) 022703.

[41] T. Mase, R. Willox, A. Ramani, B. Grammaticos, Singularity confinement as an integrability criterion, J. Phys. A: Math. Theor. **52** (2019) 205201.

[42] J. Moser, Three Integrable Systems Connected with Isospectral Deformations, Adv. Math. **16** (1975) 197-220.

[43] D. Mumford, Tata Lectures on Theta II, Birkhäuser, Boston, 1984.

[44] OEIS Foundation Inc. (2021), The On-Line Encyclopedia of Integer Sequences, http://oeis.org/A006721

[45] R. Penrose and C.A.B. Smith, A quadratic mapping with invariant cubic curve, Math. Proc. Camb. Phil. Soc. **89** (1981) 89-105.

[46] A.J. van der Poorten, Non-periodic continued fractions in hyperelliptic function fields. Bull. Austral. Math. Soc. **64** (2001) 331-343.

[47] A.J. van der Poorten, Elliptic curves and continued fractions. J. Integer Seq. **8** (2005), no. 2, Article 05.2.5, 19 pp.

[48] A.J. van der Poorten, Curves of genus 2, continued fractions, and Somos sequences, J. Integer Seq. **8** (2005), no. 3, Article 05.3.4, 9 pp.

[49] A.J. van der Poorten, Hyperelliptic curves, continued fractions, and Somos sequences, Dynamics & stochastics, 212-224. IMS Lecture Notes Monogr. Ser. **48**, Inst. Math. Statist., Beachwood, OH, 2006.

[50] G.R.W. Quispel, J.A.G. Roberts and C.J. Thompson, Integrable mappings and soliton equations, Phys. Lett. A **126** (1988) 419-421.

[51] G.R.W. Quispel, H.W. Capel and J.A.G. Roberts, Duality for discrete integrable systems, J. Phys. A: Math. Gen. **38** (2005) 3965-3980.

[52] A. Ramani, A.S. Carstea, B. Grammaticos and Y. Ohta, On the autonomous limit of discrete Painlevé equations, Physica A **305** (2002) 437-444.

[53] J. Shohat, On Stieltjes Continued Fractions, Amer. J. Math. **54** (1932) 79-84.

[54] M. Somos, Problem 1470, Crux Mathematicorum **15** (1989) 208.
[55] T.-J. Stieltjes, Recherches sur les fractions continues, Ann. Fac. Sci. Toulouse Math. **8** (1894) J1-J122.

[56] A.K. Svinin, On some classes of discrete polynomials and ordinary difference equations, J. Phys. A: Math. Theor. **47** (2014) 155201.

[57] A.K. Svinin, On integrals for some class of ordinary difference equations admitting a Lax representation, J. Phys. A: Math. Theor. **49** (2016) 095201.

[58] A.K. Svinin, On solutions for some class of integrable discrete difference equations, Journal of Difference Equations **27** (2021) 1734-1750.

[59] L. Takhtajan, On foundation of the generalized Nambu mechanics, Comm. Math. Phys. **160** (1994) 295-315.

[60] P. Vanhaecke, Integrable systems in the realm of algebraic geometry, 2nd edition, Springer, 2001.

[61] V.L. Vereshchagin, Hamiltonian structure of averaged difference systems, Math. Zametkii **44** (1988) 584-595.

[62] A.P. Veselov, Integration of the stationary problem for a classical spin chain, Theor. Math. Phys. **71** (1987) 446-450.

[63] A.P. Veselov, Integrable Maps, Russ. Math. Surv. **46** (1991) 1-51.

[64] C.-M. Viallet, On the algebraic structure of rational discrete dynamical systems, J. Phys. A: Math. Theor. **48** (2015) 16FT01.

[65] Z. Yan, Discrete exact solutions of modified Volterra and Volterra lattice equations via the new discrete sine-Gordon expansion algorithm, Nonlinear Analysis **64** (2006) 1798-1811.

[66] U. Zannier, Hyperelliptic continued fractions and generalized Jacobians, Amer. J. Math. **141** (2019) 1-40.