%I M0857 #236 Feb 22 2024 09:04:59
%S 1,1,1,1,2,3,7,23,59,314,1529,8209,83313,620297,7869898,126742987,
%T 1687054711,47301104551,1123424582771,32606721084786,1662315215971057,
%U 61958046554226593,4257998884448335457,334806306946199122193,23385756731869683322514,3416372868727801226636179
%N Somos-4 sequence: a(0)=a(1)=a(2)=a(3)=1; for n >= 4, a(n) = (a(n-1) * a(n-3) + a(n-2)^2) / a(n-4).
%C From the 5th term on, all terms have a primitive divisor; in other words, a prime divisor that divides no earlier term in the sequence. A proof appears in the Everest-McLaren-Ward paper. - Graham Everest (g.everest(AT)uea.ac.uk), Oct 26 2005
%C Twelve prime terms are known, occurring at indices 4, 5, 6, 7, 8, 11, 13, 16, 43, 52, 206, 647. The last two have been checked for probable primality only. The 647th term has 18498 decimal digits. Possibly these are the only prime terms in the entire sequence. - Graham Everest (g.everest(AT)uea.ac.uk), Nov 28 2006
%C The density of primes dividing some term in the sequence is 11/21. - _Jeremy Rouse_, Sep 18 2013
%C a(n) is a divisor of a(n+k*(2*n-3)) for all integers n and k. - _Peter H van der Kamp_, May 18 2015
%C a(n) is a divisor of A051138(k*(2*n-3)) for all integers n and k. - _Helmut Ruhland_, Jan 26 2024
%D Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 565.
%D G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; pp. 9, 179.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Robert G. Wilson v, <a href="/A006720/b006720.txt">Table of a(n) for n = 0..100</a>.
%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Barry4/bern2.html">Riordan-Bernstein Polynomials, Hankel Transforms and Somos Sequences</a>, Journal of Integer Sequences, Vol. 15 2012, #12.8.2. - From _N. J. A. Sloane_, Dec 29 2012
%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Barry5/barry223.html">On the Hurwitz Transform of Sequences</a>, Journal of Integer Sequences, Vol. 15 (2012), #12.8.7.
%H Paul Barry, <a href="https://arxiv.org/abs/1912.01126">Riordan arrays, the A-matrix, and Somos 4 sequences</a>, arXiv:1912.01126 [math.CO], 2019.
%H Paul Barry, <a href="https://arxiv.org/abs/2306.05025">Integer sequences from elliptic curves</a>, arXiv:2306.05025 [math.NT], 2023.
%H H. W. Braden, V. Z. Enolskii and A. N. W. Hone, <a href="http://arXiv.org/abs/math.NT/0501162">Bilinear recurrences and addition formulas for hyperelliptic sigma functions</a>, arXiv:math/0501162 [math.NT], 2005.
%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 Xiangke Chang and Xingbiao 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 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. B. Ekhad and D. Zeilberger, <a href="http://arxiv.org/abs/1303.5306">How To Generate As Many Somos-Like Miracles as You Wish</a>, arXiv preprint arXiv:1303.5306[math.CO], 2013.
%H Graham Everest, Gerard Mclaren and Tom Ward, <a href="http://arxiv.org/abs/math/0409540">Primitive divisors of elliptic divisibility sequences</a>, arXiv:math/0409540 [math.NT], 2004-2006.
%H G. Everest, S. Stevens, D. Tamsett and T. Ward, <a href="http://arxiv.org/abs/math/0412079v1">Primitive divisors of quadratic polynomial sequences</a>, arXiv:math/0412079v1 [math.NT], 2004.
%H G. Everest et al., <a href="http://arxiv.org/abs/math/0412079">Primes generated by recurrence sequences</a>, arXiv:math/0412079 [math.NT], 2006.
%H G. Everest et al., <a href="http://www.jstor.org/stable/27642221">Primes generated by recurrence sequences</a>, Amer. Math. Monthly, 114 (No. 5, 2007), 417-431.
%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 Allan Fordy and Andrew Hone, <a href="http://arxiv.org/abs/1207.6072">Discrete integrable systems and Poisson algebras from cluster maps</a>, arXiv preprint arXiv:1207.6072 [nlin.SI], 2012.
%H A. P. Fordy, <a href="http://arxiv.org/abs/1403.8061">Periodic Cluster Mutations and Related Integrable Maps</a>, arXiv preprint arXiv:1403.8061 [math-ph], 2014.
%H A. P. Fordy, <a href="https://doi.org/10.1098/rsta.2010.0318">Mutation-periodic quivers, integrable maps and associated Poisson algebras</a>, Phil Trans. R. Soc. Lond. Ser A (Math. Phys. Eng. Sci.) 369 (1939) (2011) 1264-1279.
%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], 2007.
%H A. 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 A. N. W. Hone, <a href="http://arXiv.org/abs/0807.2538">Algebraic curves, integer sequences and a discrete Painlevé transcendent</a>, Proceedings of SIDE 6, Helsinki, Finland, 2004; arXiv:0807.2538 [nlin.SI], 2008.
%H A. 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/2109.08217">Growth of Mahler measure and algebraic entropy of dynamics with the Laurent property</a>, arXiv:2109.08217 [math.NT], 2021.
%H A. N. W. Hone and R. Inoue, <a href="http://arxiv.org/abs/1405.5379">Discrete Painlevé equations from Y-systems</a>, arXiv preprint arXiv:1405.5379 [math-ph], 2014
%H R. Jones and J. Rouse, <a href="http://arxiv.org/abs/0706.2384">Galois Theory of Iterated Endomorphisms</a>, arXiv:0706.2384 [math.NT], 2007-2009; Proceedings of the London Mathematical Society, 100, no. 3 (2010), 763-794.
%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 Valentin Ovsienko and Serge Tabachnikov, <a href="https://arxiv.org/abs/1705.01623">Dual numbers, weighted quivers, and extended Somos and Gale-Robinson sequences</a>, arXiv:1705.01623 [math.CO], 2017. See p. 3.
%H Kevin I. Piterman and Leandro Vendramin, <a href="https://crossroads-2023.github.io/vendramin/gap.pdf">Computer algebra with GAP</a>, 2023. See p. 39.
%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 Helmut Ruhland, <a href="https://arxiv.org/abs/2312.02085">Somos-4 and a quartic Surface in RP^3</a>, arXiv:2312.02085 [math.AG], 2023.
%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.
%H Vladimir Shevelev and Peter J. C. Moses, <a href="http://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 Michael Somos, <a href="https://grail.eecs.csuohio.edu/~somos/wxyz.html">Four polynomial sequences w,x,y,z are discrete versions of the four Jacobi theta functions or the four Weierstrass sigma functions</a>, 2016.
%H D. E. Speyer, <a href="https://arxiv.org/abs/math/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 Andrei K. Svinin, <a href="https://arxiv.org/abs/2307.05866">Somos-4 equation and related equations</a>, arXiv:2307.05866 [math.CA], 2023.
%H P. 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/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 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 Leandro Vendramin, <a href="https://www.mun.ca/aac/AACMiniCourses/GAP/problems.pdf">Mini-couse on GAP - Exercises</a>, Universidad de Buenos Aires (Argentina, 2020).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SomosSequence.html">Somos Sequence</a>
%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>
%F a(n) = a(3-n) = (-1)^n * A006769(2*n-3) for all n in Z.
%F a(n+1)/a(n) seems to be asymptotic to C^n with C = 1.226.... - _Benoit Cloitre_, Aug 07 2002. Confirmed by Hone - see below.
%F The terms of the sequence have the leading order asymptotics log a(n) ~ D n^2 with D = zeta(w1)*k^2/(2*w1) - log|sigma(k)| = 0.10222281... where zeta and sigma are the Weierstrass functions with invariants g2 = 4, g3 = -1, w1 = 1.496729323 is the real half-period of the corresponding elliptic curve, k = -1.134273216 as above. This agrees with Benoit Cloitre's numerical result with C = exp(2D) = 1.2268447... - _Andrew Hone_, Feb 09 2005
%F a(n) = (a(n-1)*a(n-3) + a(n-2)^2)/a(n-4); a(0) = a(1) = a(2) = a(3) = 1; exact formula is a(n) = A*B^n*sigma (z_0+nk)/(sigma (k))^(n^2), where sigma is the Weierstrass sigma function associated to the elliptic curve y^2 = 4*x^3-4*x+1, A = 1/sigma(z_0) = 0.112724016 - 0.824911687*i, B = sigma(k)*sigma (z_0)/sigma (z_0+k) = 0.215971963 + 0.616028193*i, k = 1.859185431, z_0 = 0.204680500 + 1.225694691*i, sigma(k) = 1.555836426, all to 9 decimal places. This is a special case of a general formula for 4th-order bilinear recurrences. The Somos-4 sequence corresponds to the sequence of points (2n-3)P on the curve, where P = (0, 1). - _Andrew Hone_, Oct 12 2005
%F a(2*n) = b(-n), a(2*n+1) = b(n-1) where b(n) = A188313(n) for all n in Z. - _Michael Somos_, Feb 27 2022
%p Digits:=11; f(x):=4*x^3-4*x+1;sols:=evalf(solve(f(x),x)); e1:=Re(sols[1]); e3:=Re(sols[2]); w1:=evalf(Int((f(x))^(-0.5),x=e1..infinity)); w3:=I*evalf(Int((-f(x))^(-0.5),x=-infinity..e3)); k:=2*w1-evalf(Int((f(x))^(-0.5),x=1..infinity)); z0:=w3+evalf(Int((f(x))^(-0.5),x=e3..-1)); A:=1/WeierstrassSigma(z0,4.0,-1.0); B:=WeierstrassSigma(k,4.0,-1.0)/WeierstrassSigma(z0+k,4.0,-1.0)/A; for n from 0 to 10 do a[n]:=A*B^n*WeierstrassSigma(z0+n*k,4.0,-1.0)/(WeierstrassSigma(k,4.0,-1.0))^(n^2) od; # _Andrew Hone_, Oct 12 2005
%p A006720 := proc(n)
%p option remember;
%p if n <= 3 then
%p 1;
%p else
%p (procname(n-1)*procname(n-3)+procname(n-2)^2)/procname(n-4) ;
%p end if;
%p end proc: # _R. J. Mathar_, Jul 12 2012
%t a[0] = a[1] = a[2] = a[3] = 1; a[n_] := a[n] = (a[n - 1] a[n - 3] + a[n - 2]^2)/a[n - 4]; Array[a, 23] (* _Robert G. Wilson v_, Jul 04 2007 *)
%t RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==1,a[n]==(a[n-1]a[n-3]+a[n-2]^2)/ a[n-4]},a,{n,30}] (* _Harvey P. Dale_, Apr 07 2018 *)
%t b[ n_] := If[-2<=n<=2, {2, 1, 1, 3, 23}[[n+3]], 2*a[n+2]^3*a[n+3] + a[n+1]^2*(a[n+3]*a[n+4] - a[n+2]*a[n+5])]; a[ n_] := If[OddQ[n], b[(n-3)/2], b[-n/2]]; (* _Michael Somos_, Feb 28 2022 *)
%o (PARI) a=vector(99);a[1]=a[2]=a[3]=a[4]=1;for(n=5,#a,a[n]=(a[n-1]*a[n-3]+a[n-2]^2)/a[n-4]); a \\ _Charles R Greathouse IV_, Jun 16 2011
%o (Haskell)
%o a006720 n = a006720_list !! n
%o a006720_list = [1,1,1,1] ++
%o zipWith div (foldr1 (zipWith (+)) (map b [1..2])) a006720_list
%o where b i = zipWith (*) (drop i a006720_list) (drop (4-i) a006720_list)
%o -- _Reinhard Zumkeller_, Jan 22 2012
%o (Python)
%o from gmpy2 import divexact
%o A006720 = [1, 1, 1, 1]
%o for n in range(4, 101):
%o A006720.append(divexact(A006720[n-1]*A006720[n-3]+A006720[n-2]**2,A006720[n-4]))
%o # _Chai Wah Wu_, Sep 01 2014
%o (Magma) I:=[1,1,1,1]; [n le 4 select I[n] else (Self(n-1)*Self(n-3)+Self(n-2)^2)/Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, Aug 07 2017
%Y Cf. A006721, A006722, A006723, A006769, A048736, A028945, A028935, A151502, A165896, A188313, A051138, A006769.
%Y For primes see A129739, A129740, A129741.
%Y Cf. A227199 (primes dividing some term).
%Y Cf. A178384, A247368.
%K nonn,easy,nice
%O 0,5
%A _N. J. A. Sloane_