%I M0735 #158 Sep 25 2024 11:23:47
%S 1,1,1,1,1,2,3,5,11,37,83,274,1217,6161,22833,165713,1249441,9434290,
%T 68570323,1013908933,11548470571,142844426789,2279343327171,
%U 57760865728994,979023970244321,23510036246274433,771025645214210753
%N Somos-5 sequence: a(n) = (a(n-1) * a(n-4) + a(n-2) * a(n-3)) / a(n-5), with a(0) = a(1) = a(2) = a(3) = a(4) = 1.
%C Using the addition formula for the Weierstrass sigma function it is simple to prove that the subsequence of even terms of a Somos-5 type sequence satisfy a 4th-order recurrence of Somos-4 type and similarly the odd subsequence satisfies the same 4th-order recurrence. - _Andrew Hone_, Aug 24 2004
%C log(a(n)) ~ 0.071626946 * n^2. (Hone)
%C The Brown link article gives interesting information about related sequences including recurrences and numerical approximations.
%C The n-th term is a divisor of the (n+k*(2*n-4))-th term for all integers n and k. - _Peter H van der Kamp_, May 18 2015
%C The elliptic curve y^2 + xy = x^3 + x^2 - 2x (LMFDB label 102.a1) has infinite order point P = (2, 2) and 2-torsion point T = (0, 0). Define d(n) = a(n+2). The x and y coordinates of nP + T have denominators d(n)^2 and d(n)^3. - _Michael Somos_, Oct 29 2022
%D Paul C. Kainen, Fibonacci in Somos-5 ..., Fib. Q., 60:4 (2022), 362-364.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A006721/b006721.txt">Table of n, a(n) for n=0..100</a>
%H K. S. Brown, <a href="http://www.mathpages.com/home/kmath162/kmath162.htm">A Quasi-Periodic Sequence</a>
%H R. H. Buchholz and R. L. Rathbun, <a href="http://www.jstor.org/stable/2974977">An infinite set of Heron triangles with two rational medians</a>, Amer. Math. Monthly, 104 (1997), 107-115.
%H Xiang-Ke Chang and Xing-Biao Hu, <a href="https://doi.org/10.1016/j.laa.2012.01.016">A conjecture based on Somos-4 sequence and its extension</a>, Linear Algebra Appl. 436, No. 11, 4285-4295 (2012).
%H Bryant Davis, Rebecca Kotsonis, and Jeremy Rouse, <a href="http://arxiv.org/abs/1507.05896">The density of primes dividing a term in the Somos-5 sequence</a>, arXiv:1507.05896 [math.NT], 2015.
%H Harini Desiraju and Brady Haran, <a href="https://www.youtube.com/watch?v=p-HN_ICaCyM">The Troublemaker Number</a>, Numberphile video (2022).
%H S. Fomin and A. Zelevinsky, <a href="https://arxiv.org/abs/math/0104241">The Laurent phenomenon</a>, arXiv:math/0104241 [math.CO], 2001.
%H David Gale, <a href="http://dx.doi.org/10.1007/BF03024070">The strange and surprising saga of the Somos sequences</a>, in Mathematical Entertainments, Math. Intelligencer 13(1) (1991), pp. 40-42.
%H R. W. Gosper and Richard C. Schroeppel, <a href="http://arxiv.org/abs/math/0703470">Somos Sequence Near-Addition Formulas and Modular Theta Functions</a>, arXiv:math/0703470 [math.NT]
%H J. W. E. Harrow and A. N. W. Hone, <a href="https://arxiv.org/abs/2409.00406">Casting more light in the shadows: dual Somos-5 sequences</a>, arXiv:2409.00406 [nlin.SI], 2024. See p. 2.
%H Andrew N. W. Hone, <a href="http://dx.doi.org/10.1112/S0024609304004163">Elliptic curves and quadratic recurrence sequences</a>, Bull. Lond. Math. Soc. 37 (2005) 161-171.
%H Andrew N. W. Hone, <a href="https://arxiv.org/abs/math/0501554">Sigma function solution of the initial value problem for Somos 5 sequences</a>, arXiv:math/0501554 [math.NT], 2005-2006.
%H Andrew N. W. Hone, <a href="https://arxiv.org/abs/2107.03197">Heron triangles with two rational median and Somos-5 sequences</a>, arXiv:2107.03197 [math.NT], 2022.
%H Andrew N. W. Hone, <a href="https://arxiv.org/abs/2401.05581">Heron triangles and the hunt for unicorns</a>, arXiv:2401.05581 [math.NT], 2024.
%H LMFDB, <a href="https://www.lmfdb.org/EllipticCurve/Q/102/a/1">Elliptic Curve 102.a1 (Cremona label 102a1)</a>
%H Xinrong Ma, <a href="https://doi.org/10.1016/j.disc.2009.07.012">Magic determinants of Somos sequences and theta functions</a>, Discrete Mathematics 310.1 (2010): 1-5.
%H J. L. Malouf, <a href="http://dx.doi.org/10.1016/0012-365X(92)90714-Q">An integer sequence from a rational recursion</a>, Discr. Math. 110 (1992), 257-261.
%H J. Propp, <a href="http://faculty.uml.edu/jpropp/somos.html">The Somos Sequence Site</a>
%H J. Propp, <a href="http://faculty.uml.edu/jpropp/reach/shirt.html">The 2002 REACH tee-shirt</a>
%H R. M. Robinson, <a href="http://dx.doi.org/10.1090/S0002-9939-1992-1140672-5">Periodicity of Somos sequences</a>, Proc. Amer. Math. Soc., 116 (1992), 613-619.
%H Matthew Christopher Russell, <a href="http://www.math.rutgers.edu/~zeilberg/Theses/MatthewRussellThesis.pdf">Using experimental mathematics to conjecture and prove theorems in the theory of partitions and commutative and non-commutative recurrences</a>, PhD Dissertation, Mathematics Department, Rutgers University, May 2016; see <a href="https://pdfs.semanticscholar.org/fdeb/e20954dacb7ec7a24afe2cf491b951c5a28d.pdf">also</a>.
%H Vladimir Shevelev and Peter J. C. Moses, <a href="https://arxiv.org/abs/1112.5715">On a sequence of polynomials with hypothetically integer coefficients</a>, arXiv preprint arXiv:1112.5715 [math.NT], 2011.
%H Michael Somos, <a href="https://grail.eecs.csuohio.edu/~somos/somos6.html">Somos 6 Sequence</a>
%H Michael Somos, <a href="http://faculty.uml.edu/jpropp/somos/history.txt">Brief history of the Somos sequence problem</a>
%H D. E. Speyer, <a href="http://arXiv.org/abs/math.CO/0402452">Perfect matchings and the octahedral recurrence</a>, arXiv:math/0402452 [math.CO], 2004.
%H Alex Stone, <a href="https://www.quantamagazine.org/the-astonishing-behavior-of-recursive-sequences-20231116/">The Astonishing Behavior of Recursive Sequences</a>, Quanta Magazine, Nov 16 2023, 13 pages.
%H Peter H. van der Kamp, <a href="http://arxiv.org/abs/1505.00194">Somos-4 and Somos-5 are arithmetic divisibility sequences</a>, arXiv:1505.00194 [math.NT], 2015.
%H A. J. van der Poorten, <a href="https://arxiv.org/abs/math/0403225">Elliptic curves and continued fractions</a>, arXiv:math/0403225 [math.NT], 2004.
%H A. J. van der Poorten, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Poorten/vdp40.html">Elliptic curves and continued fractions</a>, J. Int. Sequences, Volume 8, no. 2 (2005), article 05.2.5.
%H A. J. van der Poorten, <a href="https://arxiv.org/abs/math/0412293">Recurrence relations for elliptic sequences: : every Somos 4 is a Somos k</a>, arXiv:math/0412293 [math.NT], 2004.
%H A. J. van der Poorten, <a href="https://arxiv.org/abs/math/0608247">Hyperelliptic curves, continued fractions and Somos sequences</a>, arXiv:math/0608247 [math.NT], 2006.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SomosSequence.html">Somos Sequence.</a>
%H D. Zagier, <a href="http://www-groups.mcs.st-andrews.ac.uk/~john/Zagier/Problems.html">Problems posed at the St Andrews Colloquium, 1996</a>
%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>
%F Comments from _Andrew Hone_, Aug 24 2004: "Both the even terms b(n)=a(2n) and odd terms b(n)=a(2n+1) satisfy the fourth-order recurrence b(n)=(b(n-1)*b(n-3)+8*b(n-2)^2)/b(n-4).
%F "Hence the general formula is a(2n)=A*B^n*sigma(c+n*k)/sigma(k)^(n^2), a(2n+1)=D*E^n*sigma(f+n*k)/sigma(k)^(n^2) where sigma is the Weierstrass sigma function associated to the elliptic curve y^2=4*x^3-(121/12)*x+845/216 (this is birationally equivalent to the minimal model V^2+U*V+6*V=U^3+7*U^2+12*U given by van der Poorten).
%F "The real/imaginary half-periods of the curve are w1=1.181965956, w3=0.973928783*I and the constants are A=0.142427718-1.037985022*I, B=0.341936209+0.389300717*I, c=0.163392411+w3, k=1.018573545, D=-0.363554228-0.803200610*I, E=0.644801269+0.734118205*I, f=c+k/2-w1 all to 9 decimal places."
%F a(4 - n) = a(n). a(n+2) * a(n-2) = 2 * a(n+1) * a(n-1) - a(n)^2 if n is even. a(n+2) * a(n-2) = 3 * a(n+1) * a(n-1) - a(n)^2 if n is odd.
%p for n from 0 to 4 do a[n]:= 1 od:
%p for n from 5 to 50 do a[n]:=(a[n-1] * a[n-4] + a[n-2] * a[n-3]) / a[n-5] od:
%p seq(a[i],i=0..50); # _Robert Israel_, May 19 2015
%t a[0] = a[1] = a[2] = a[3] = a[4] = 1; a[n_] := a[n] = (a[n - 1] a[n - 4] + a[n - 2] a[n - 3])/a[n - 5]; Array[a, 27, 0] (* _Robert G. Wilson v_, Aug 15 2010 *)
%t a[ n_] := If[ Abs [n - 2] < 3, 1, If[ n < 0, a[4 - n], a[n] = (a[n - 1] a[n - 4] + a[n - 2] a[n - 3]) / a[n - 5]]]; (* _Michael Somos_, Jul 15 2011 *)
%t RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==1,a[n]==(a[n-1]a[n-4]+ a[n-2]a[n-3])/a[n-5]},a,{n,30}] (* _Harvey P. Dale_, Dec 25 2011 *)
%o (PARI) {a(n) = if( abs(n-2) < 3, 1, if( n<0, a(4-n), (a(n-1) * a(n-4) + a(n-2) * a(n-3)) / a(n-5)))}; /* _Michael Somos_, Jul 15 2011 */
%o (PARI) {a(n) = my(E = ellinit([1, 1, 0, -2, 0]), P = [2, 2], T = [0, 0]); if(n == 2, 1, n = abs(n-2); sqrtint(denominator(elladd(E, T, ellmul(E, P, n))[1])))}; /* _Michael Somos_, Oct 29 2022 */
%o (Haskell)
%o a006721 n = a006721_list !! n
%o a006721_list = [1,1,1,1,1] ++
%o zipWith div (foldr1 (zipWith (+)) (map b [1..2])) a006721_list
%o where b i = zipWith (*) (drop i a006721_list) (drop (5-i) a006721_list)
%o -- _Reinhard Zumkeller_, Jan 22 2012
%o (Python)
%o from gmpy2 import divexact
%o A006721 = [1,1,1,1,1]
%o for n in range(5,1001):
%o A006721.append(int(divexact(A006721[n-1]*A006721[n-4]+A006721[n-2]*A006721[n-3], A006721[n-5]))) # _Chai Wah Wu_, Aug 15 2014
%o (Magma) I:=[1,1,1,1,1]; [n le 5 select I[n] else (Self(n-1) * Self(n-4) + Self(n-2) * Self(n-3)) div Self(n-5): n in [1..30]]; // _Vincenzo Librandi_, May 18 2015
%Y Cf. A006720, A006722, A006723, A048736.
%K easy,nonn,nice
%O 0,6
%A _N. J. A. Sloane_
%E a(26)-a(27) from _Robert G. Wilson v_, Aug 15 2010
%E Definition corrected by _Chai Wah Wu_, Aug 15 2014