The OEIS is supported by the many generous donors to the OEIS Foundation.


(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006720 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).
(Formerly M0857)
1, 1, 1, 1, 2, 3, 7, 23, 59, 314, 1529, 8209, 83313, 620297, 7869898, 126742987, 1687054711, 47301104551, 1123424582771, 32606721084786, 1662315215971057, 61958046554226593, 4257998884448335457, 334806306946199122193, 23385756731869683322514, 3416372868727801226636179 (list; graph; refs; listen; history; text; internal format)



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

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

The density of primes dividing some term in the sequence is 11/21. - Jeremy Rouse, Sep 18 2013

The n-th term is a divisor of the (n+k*(2*n-3))-rd term for all integers n and k. - Peter H van der Kamp, May 18 2015


Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 565.

G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; pp. 9, 179.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


Robert G. Wilson v, Table of a(n) for n = 0..100.

Paul Barry, Riordan-Bernstein Polynomials, Hankel Transforms and Somos Sequences, Journal of Integer Sequences, Vol. 15 2012, #12.8.2. - From N. J. A. Sloane, Dec 29 2012

Paul Barry, On the Hurwitz Transform of Sequences, Journal of Integer Sequences, Vol. 15 (2012), #12.8.7.

Paul Barry, Riordan arrays, the A-matrix, and Somos 4 sequences, arXiv:1912.01126 [math.CO], 2019.

H. W. Braden, V. Z. Enolskii and A. N. W. Hone, Bilinear recurrences and addition formulas for hyperelliptic sigma functions, arXiv:math/0501162 [math.NT], 2005.

R. H. Buchholz and R. L. Rathbun, An infinite set of Heron triangles with two rational medians, Amer. Math. Monthly, 104 (1997), 107-115.

Xiangke Chang and Xingbiao Hu, A conjecture based on Somos-4 sequence and its extension, Linear Algebra Appl. 436, No. 11, 4285-4295 (2012).

S. B. Ekhad and D. Zeilberger, How To Generate As Many Somos-Like Miracles as You Wish, arXiv preprint arXiv:1303.5306[math.CO], 2013.

Graham Everest, Gerard Mclaren and Tom Ward, Primitive divisors of elliptic divisibility sequences, arXiv:math/0409540 [math.NT], 2004-2006.

G. Everest, S. Stevens, D. Tamsett and T. Ward, Primitive divisors of quadratic polynomial sequences, arXiv:math/0412079v1 [math.NT], 2004.

G. Everest et al., Primes generated by recurrence sequences, arXiv:math/0412079 [math.NT], 2006.

G. Everest et al., Primes generated by recurrence sequences, Amer. Math. Monthly, 114 (No. 5, 2007), 417-431.

S. Fomin and A. Zelevinsky, The Laurent phenomemon, arXiv:math/0104241 [math.CO], 2001.

Allan Fordy and Andrew Hone, Discrete integrable systems and Poisson algebras from cluster maps, arXiv preprint arXiv:1207.6072 [nlin.SI], 2012.

A. P. Fordy, Periodic Cluster Mutations and Related Integrable Maps, arXiv preprint arXiv:1403.8061 [math-ph], 2014.

A. P. Fordy, Mutation-periodic quivers, integrable maps and associated Poisson algebras, Phil Trans. R. Soc. Lond. Ser A (Math. Phys. Eng. Sci.) 369 (1939) (2011) 1264-1279.

David Gale, The strange and surprising saga of the Somos sequences, in Mathematical Entertainments, Math. Intelligencer 13(1) (1991), pp. 40-42.

R. W. Gosper and Richard C. Schroeppel, Somos Sequence Near-Addition Formulas and Modular Theta Functions, arXiv:math/0703470 [math.NT], 2007.

A. N. W. Hone, Sigma function solution of the initial value problem for Somos 5 sequences, arXiv:math/0501554 [math.NT], 2005-2006.

A. N. W. Hone, Algebraic curves, integer sequences and a discrete Painlevé transcendent, Proceedings of SIDE 6, Helsinki, Finland, 2004; arXiv:0807.2538 [nlin.SI], 2008.

A. N. W. Hone, Elliptic curves and quadratic recurrence sequences, Bull. Lond. Math. Soc. 37 (2005) 161-171.

Andrew N. W. Hone, Growth of Mahler measure and algebraic entropy of dynamics with the Laurent property, arXiv:2109.08217 [math.NT], 2021.

A. N. W. Hone and R. Inoue, Discrete Painlevé equations from Y-systems, arXiv preprint arXiv:1405.5379 [math-ph], 2014

R. Jones and J. Rouse, Galois Theory of Iterated Endomorphisms, arXiv:0706.2384 [math.NT], 2007-2009; Proceedings of the London Mathematical Society, 100, no. 3 (2010), 763-794.

Xinrong Ma, Magic determinants of Somos sequences and theta functions, Discrete Mathematics 310.1 (2010): 1-5.

J. L. Malouf, An integer sequence from a rational recursion, Discr. Math. 110 (1992), 257-261.

Valentin Ovsienko and Serge Tabachnikov, Dual numbers, weighted quivers, and extended Somos and Gale-Robinson sequences, arXiv:1705.01623 [math.CO], 2017. See p. 3.

J. Propp, The Somos Sequence Site

J. Propp, The 2002 REACH tee-shirt

R. M. Robinson, Periodicity of Somos sequences, Proc. Amer. Math. Soc., 116 (1992), 613-619.

Matthew Christopher Russell, Using experimental mathematics to conjecture and prove theorems in the theory of partitions and commutative and non-commutative recurrences, PhD Dissertation, Mathematics Department, Rutgers University, May 2016.

Vladimir Shevelev and Peter J. C. Moses, On a sequence of polynomials with hypothetically integer coefficients, arXiv preprint arXiv:1112.5715 [math.NT], 2011.

Michael Somos, Somos 6 Sequence

Michael Somos, Brief history of the Somos sequence problem

Michael Somos, Four polynomial sequences w,x,y,z are discrete versions of the four Jacobi theta functions or the four Weierstrass sigma functions, (PARI/GP code), 2016.

D. E. Speyer, Perfect matchings and the octahedral recurrence, arXiv:math/0402452 [math.CO], 2004.

P. H. van der Kamp, Somos-4 and Somos-5 are arithmetic divisibility sequences, arXiv:1505.00194 [math.NT], 2015.

A. J. van der Poorten, Recurrence relations for elliptic sequences: every Somos 4 is a Somos k, arXiv:math/0412293 [math.NT], 2004.

A. J. van der Poorten, Hyperelliptic curves, continued fractions and Somos sequences, arXiv:math/0608247 [math.NT], 2006.

A. J. van der Poorten, Elliptic curves and continued fractions, J. Int. Sequences, Volume 8, no. 2 (2005), article 05.2.5.

Leandro Vendramin, Mini-couse on GAP - Exercises, Universidad de Buenos Aires (Argentina, 2020).

Eric Weisstein's World of Mathematics, Somos Sequence

Index entries for two-way infinite sequences


a(n) = a(3-n) = (-1)^n * A006769(2*n-3) for all n in Z.

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.

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

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


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

A006720 := proc(n)

    option remember;

    if n <= 3 then



        (procname(n-1)*procname(n-3)+procname(n-2)^2)/procname(n-4) ;

    end if;

end proc: # R. J. Mathar, Jul 12 2012


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 *)

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 *)


(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


a006720 n = a006720_list !! n

a006720_list = [1, 1, 1, 1] ++

   zipWith div (foldr1 (zipWith (+)) (map b [1..2])) a006720_list

   where b i = zipWith (*) (drop i a006720_list) (drop (4-i) a006720_list)

-- Reinhard Zumkeller, Jan 22 2012


from gmpy2 import divexact

A006720 = [1, 1, 1, 1]

for n in range(4, 101):

    A006720.append(divexact(A006720[n-1]*A006720[n-3]+A006720[n-2]**2, A006720[n-4]))

# Chai Wah Wu, Sep 01 2014

(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


Cf. A006721, A006722, A006723, A006769, A048736, A028945, A028935, A151502, A165896.

For primes see A129739, A129740, A129741.

Cf. A227199 (primes dividing some term).

Cf. A178384, A247368.

Sequence in context: A346161 A082449 A129741 * A084710 A088173 A129739

Adjacent sequences:  A006717 A006718 A006719 * A006721 A006722 A006723




N. J. A. Sloane



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 24 00:05 EST 2022. Contains 350515 sequences. (Running on oeis4.)