cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 13 results. Next

A369611 Tropical version of Somos-7 sequence A006723.

Original entry on oeis.org

-1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29, 31, 32, 33, 35, 37, 38, 40, 41, 43, 45, 47, 48, 50, 52, 54, 56, 58, 59, 62, 64, 66, 68, 70, 72, 75, 77, 79, 81, 84, 86, 89
Offset: 0

Views

Author

Helmut Ruhland, Jan 27 2024

Keywords

Comments

Given the Somos-7 sequence with variables s(1), s(2), s(3), s(4), s(5), s(6), s(7) and recursion s(n) = (s(n-1)*s(n-6) + s(n-2)*s(n-5) + s(n-3)*s(n-4))/s(n-7), then s(n) is a Laurent polynomial in the variables with the numerator being irreducible and the denominator is Product_{k=0..6} s(k+1)^a(n-k).
Second difference has period 30.

Crossrefs

Programs

  • Maxima
    N : 7$ Len : 50$  /* tropical version of Somos-N, 2 <= N <= 7, Len = length of the calculated list */
    NofRT : floor (N / 2)$  /* number of terms in a Somos-N recurrence */
    A : makelist (0, Len)$  A[1] : -1$ for i: 2 thru N do ( A[i] : 0 )$
    for i: N + 1 thru Len do (
       M : minf, for j : 1 thru NofRT do ( M : max ( M, A[i - j] + A[i - N + j] ) ),
       A[i] : M - A[i - N]
    )$ A;

Formula

a(n) = max( a(n-1) + a(n-6), a(n-2) + a(n-5), a(n-4) + a(n-3) ) - a(n-7) for all n in Z.
G.f.: ( 1-x^2-x^3 ) / ( (1+x)*(1+x+x^2)*(x^4+x^3+x^2+x+1)*(x-1)^3 ). - R. J. Mathar, Jan 28 2024

A038754 a(2n) = 3^n, a(2n+1) = 2*3^n.

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Comments

In general, for the recurrence a(n) = a(n-1)*a(n-2)/a(n-3), all terms are integers iff a(0) divides a(2) and first three terms are positive integers, since a(2n+k) = a(k)*(a(2)/a(0))^n for all nonnegative integers n and k.
Equals eigensequence of triangle A070909; (1, 1, 2, 3, 6, 9, 18, ...) shifts to the left with multiplication by triangle A070909. - Gary W. Adamson, May 15 2010
The a(n) represent all paths of length (n+1), n >= 0, starting at the initial node on the path graph P_5, see the second Maple program. - Johannes W. Meijer, May 29 2010
a(n) is the difference between numbers of multiple of 3 evil (A001969) and odious (A000069) numbers in interval [0, 2^(n+1)). - Vladimir Shevelev, May 16 2012
A "half-geometric progression": to obtain a term (beginning with the third one) we multiply the before previous one by 3. - Vladimir Shevelev, May 21 2012
Pisano periods: 1, 2, 1, 4, 8, 2, 12, 4, 1, 8, 10, 4, 6, 12, 8, 8, 32, 2, 36, 8, ... . - R. J. Mathar, Aug 10 2012
Numbers k such that the k-th cyclotomic polynomial has a root mod 3. - Eric M. Schmidt, Jul 31 2013
Range of row n of the circular Pascal array of order 6. - Shaun V. Ault, Jun 05 2014
Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 1. - Sean A. Irvine, Jun 03 2025

Examples

			In the interval [0,2^5) we have 11 multiples of 3 numbers, from which 10 are evil and only one (21) is odious. Thus a(4) = 10 - 1 = 9. - _Vladimir Shevelev_, May 16 2012
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a038754 n = a038754_list !! n
    a038754_list = concat $ transpose [a000244_list, a008776_list]
    -- Reinhard Zumkeller, Oct 19 2015
    
  • Magma
    [n le 2 select n else 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 18 2016
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=3*a[n-2]+2 od: seq(a[n]+1, n=0..34); # Zerinvary Lajos, Mar 20 2008
    with(GraphTheory): P:=5: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=35; for n from 1 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P) od: seq(a(n),n=1..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    LinearRecurrence[{0,3},{1,2},40] (* Harvey P. Dale, Jan 26 2014 *)
    CoefficientList[Series[(1+2x)/(1-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 18 2016 *)
    Module[{nn=20,c},c=3^Range[0,nn];Riffle[c,2c]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    a(n)=(1/6)*(5-(-1)^n)*3^floor(n/2)
    
  • PARI
    a(n)=3^(n>>1)<
    				
  • SageMath
    [2^(n%2)*3^((n-(n%2))/2) for n in range(61)] # G. C. Greubel, Oct 10 2022

Formula

a(n) = a(n-1)*a(n-2)/a(n-3) with a(0)=1, a(1)=2, a(2)=3.
a(2*n) = (3/2)*a(2*n-1) = 3^n, a(2*n+1) = 2*a(2*n) = 2*3^n.
From Benoit Cloitre, Apr 27 2003: (Start)
a(1)=1, a(n)= 2*a(n-1) if a(n-1) is odd, or a(n)= (3/2)*a(n-1) if a(n-1) is even.
a(n) = (1/6)*(5-(-1)^n)*3^floor(n/2).
a(2*n) = a(2*n-1) + a(2*n-2) + a(2*n-3).
a(2*n+1) = a(2*n) + a(2*n-1). (End)
G.f.: (1+2*x)/(1-3*x^2). - Paul Barry, Aug 25 2003
From Reinhard Zumkeller, Sep 11 2003: (Start)
a(n) = (1 + n mod 2) * 3^floor(n/2).
a(n) = A087503(n) - A087503(n-1). (End)
a(n) = sqrt(3)*(2+sqrt(3))*(sqrt(3))^n/6 - sqrt(3)*(2-sqrt(3))*(-sqrt(3))^n/6. - Paul Barry, Sep 16 2003
From Reinhard Zumkeller, May 26 2008: (Start)
a(n) = A140740(n+2,2).
a(n+1) = a(n) + a(n - n mod 2). (End)
If p(i) = Fibonacci(i-3) and if A is the Hessenberg matrix of order n defined by A(i,j) = p(j-i+1), (i<=j), A(i,j)=-1, (i=j+1), and A(i,j)=0 otherwise. Then, for n>=1, a(n-1) = (-1)^n det A. - Milan Janjic, May 08 2010
a(n) = A182751(n) for n >= 2. - Jaroslav Krizek, Nov 27 2010
a(n) = Sum_{i=0..2^(n+1), i==0 (mod 3)} (-1)^A000120(i). - Vladimir Shevelev, May 16 2012
a(0)=1, a(1)=2, for n>=3, a(n)=3*a(n-2). - Vladimir Shevelev, May 21 2012
Sum_(n>=0) 1/a(n) = 9/4. - Alexander R. Povolotsky, Aug 24 2012
a(n) = sqrt(3*a(n-1)^2 + (-3)^(n-1)). - Richard R. Forberg, Sep 04 2013
a(n) = 2^((1-(-1)^n)/2)*3^((2*n-1+(-1)^n)/4). - Luce ETIENNE, Aug 11 2014
From Reinhard Zumkeller, Oct 19 2015: (Start)
a(2*n) = A000244(n), a(2*n+1) = A008776(n).
For n > 0: a(n+1) = a(n) + if a(n) odd then min{a(n), a(n-1)} else max{a(n), a(n-1)}, see also A128588. (End)
E.g.f.: (7*cosh(sqrt(3)*x) + 4*sqrt(3)*sinh(sqrt(3)*x) - 4)/3. - Stefano Spezia, Feb 17 2022
Sum_{n>=0} (-1)^n/a(n) = 3/4. - Amiram Eldar, Dec 02 2022

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

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

Comments

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
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
a(n) is a divisor of A051138(k*(2*n-3)) for all integers n and k. - Helmut Ruhland, Jan 26 2024

References

  • 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).

Crossrefs

For primes see A129739, A129740, A129741.
Cf. A227199 (primes dividing some term).

Programs

  • Haskell
    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
    
  • 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
  • Maple
    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
            1;
        else
            (procname(n-1)*procname(n-3)+procname(n-2)^2)/procname(n-4) ;
        end if;
    end proc: # R. J. Mathar, Jul 12 2012
  • Mathematica
    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 *)
    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 *)
  • 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
    
  • Python
    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
    

Formula

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

A006721 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.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 5, 11, 37, 83, 274, 1217, 6161, 22833, 165713, 1249441, 9434290, 68570323, 1013908933, 11548470571, 142844426789, 2279343327171, 57760865728994, 979023970244321, 23510036246274433, 771025645214210753
Offset: 0

Views

Author

Keywords

Comments

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
log(a(n)) ~ 0.071626946 * n^2. (Hone)
The Brown link article gives interesting information about related sequences including recurrences and numerical approximations.
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
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

References

  • Paul C. Kainen, Fibonacci in Somos-5 ..., Fib. Q., 60:4 (2022), 362-364.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006721 n = a006721_list !! n
    a006721_list = [1,1,1,1,1] ++
      zipWith div (foldr1 (zipWith (+)) (map b [1..2])) a006721_list
      where b i = zipWith (*) (drop i a006721_list) (drop (5-i) a006721_list)
    -- Reinhard Zumkeller, Jan 22 2012
    
  • 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
  • Maple
    for n from 0 to 4 do a[n]:= 1 od:
    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:
    seq(a[i],i=0..50); # Robert Israel, May 19 2015
  • Mathematica
    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 *)
    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 *)
    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 *)
  • 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 */
    
  • 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 */
    
  • Python
    from gmpy2 import divexact
    A006721 = [1,1,1,1,1]
    for n in range(5,1001):
        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
    

Formula

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).
"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).
"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."
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.

Extensions

a(26)-a(27) from Robert G. Wilson v, Aug 15 2010
Definition corrected by Chai Wah Wu, Aug 15 2014

A048736 Dana Scott's sequence: a(n) = (a(n-2) + a(n-1) * a(n-3)) / a(n-4), a(0) = a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 13, 22, 41, 111, 191, 361, 982, 1693, 3205, 8723, 15042, 28481, 77521, 133681, 253121, 688962, 1188083, 2249605, 6123133, 10559062, 19993321, 54419231, 93843471, 177690281, 483649942, 834032173, 1579219205, 4298430243, 7412446082, 14035282561, 38202222241, 65877982561
Offset: 0

Views

Author

Keywords

Comments

The recursion has the Laurent property. If a(0), a(1), a(2), a(3) are variables, then a(n) is a Laurent polynomial (a rational function with a monic monomial denominator). - Michael Somos, Feb 05 2012
A generalization is if the recursion is modified to a(n) = (a(n-2) + a(n-1) * b*a(n-3)) / a(n-4) where b is a constant, and with arbitrary nonzero initial values, (a(0), a(1), a(2), a(3)), then a(n) = c*(a(n-3) - a(n-6)) + a(n-9) for all n in Z where c is another constant. - Michael Somos, Oct 28 2021

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 13*x^6 + 22*x^7 + 41*x^8 + 111*x^9 + ...
		

Crossrefs

Cf. A192241, A192242 (primes and where they occur).
Cf. A276531.

Programs

  • Haskell
    a048736 n = a048736_list !! n
    a048736_list = 1 : 1 : 1 : 1 :
       zipWith div
         (zipWith (+)
           (zipWith (*) (drop 3 a048736_list)
                        (drop 1 a048736_list))
           (drop 2 a048736_list))
         a048736_list
    -- Reinhard Zumkeller, Jun 26 2011
    
  • Magma
    I:=[1,1,1,1]; [n le 4 select I[n] else (Self(n-2) + Self(n-1)*Self(n-3)) / Self(n-4): n in [1..30]]; // G. C. Greubel, Feb 20 2018
  • Maple
    P:=proc(q) local n,v; v:=[1,1,1,1]; for n from 1 to q do
    v:=[op(v),(v[-2]+v[-1]*v[-3])/v[-4]] od: op(v); end: P(35); # Paolo P. Lava, Aug 24 2025
  • Mathematica
    RecurrenceTable[{a[0] == a[1] == a[2] == a[3] == 1, a[n] == (a[n - 2] + a[n - 1]a[n - 3])/a[n - 4]}, a[n], {n, 40}] (* or *) LinearRecurrence[{0, 0, 10, 0, 0, -10, 0, 0, 1}, {1, 1, 1, 1, 2, 3, 5, 13, 22}, 41] (* Harvey P. Dale, Oct 22 2011 *)
  • PARI
    Vec((1+x+x^2-9*x^3-8*x^4-7*x^5+5*x^6+3*x^7+2*x^8) / (1-10*x^3+10*x^6-x^9)+O(x^99)) \\ Charles R Greathouse IV, Jul 01 2011
    

Formula

a(n) = 9*a(n-3) - a(n-6) - 3 - ( ceiling(n/3) - floor(n/3) ), with a(0) = a(1) = a(2) = a(3) = 1, a(4) = 2, a(5) = 3. - Michael Somos
From Jaume Oliver Lafont, Sep 17 2009: (Start)
a(n) = 10*a(n-3) - 10*a(n-6) + a(n-9).
G.f.: (1 + x + x^2 - 9*x^3 - 8*x^4 - 7*x^5 + 5*x^6 + 3*x^7 + 2*x^8)/(1 - 10*x^3 + 10*x^6 - x^9). (End)
a(n) = a(3-n) for all n in Z. - Michael Somos, Feb 05 2012

Extensions

More terms from Michael Somos

A006722 Somos-6 sequence: a(n) = (a(n-1) * a(n-5) + a(n-2) * a(n-4) + a(n-3)^2) / a(n-6), a(0) = ... = a(5) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 5, 9, 23, 75, 421, 1103, 5047, 41783, 281527, 2534423, 14161887, 232663909, 3988834875, 45788778247, 805144998681, 14980361322965, 620933643034787, 16379818848380849, 369622905371172929, 20278641689337631649, 995586066665500470689
Offset: 0

Views

Author

Keywords

References

  • C. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 350.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006722 n = a006722_list !! n
    a006722_list = [1,1,1,1,1,1] ++
      zipWith div (foldr1 (zipWith (+)) (map b [1..3])) a006722_list
      where b i = zipWith (*) (drop i a006722_list) (drop (6-i) a006722_list)
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Magma
    [n le 6 select 1 else (Self(n-1)*Self(n-5)+Self(n-2)*Self(n-4)+ Self(n-3)^2)/Self(n-6): n in [1..30]]; // Vincenzo Librandi, Dec 02 2015
  • Mathematica
    a[n_ /; 0 <= n <= 5] = 1; a[n_] := a[n] = (a[n-1]*a[n-5] + a[n-2]*a[n-4] + a[n-3]^2) / a[n-6]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 22 2013 *)
    RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==1,a[n]==(a[n-1]a[n-5]+ a[n-2]a[n-4]+a[n-3]^2)/a[n-6]},a,{n,30}] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    {a(n) = if( n>-1 && n<6, 1, if( n<0, a(5 - n), (a(n - 1) * a(n - 5) + a(n - 2) * a(n - 4) + a(n-3) * a(n-3)) / a(n - 6)))}; /* Michael Somos, Jan 30 2012 */
    
  • Python
    from gmpy2 import divexact
    A006722 = [1,1,1,1,1,1]
    for n in range(6,101):
        A006722.append(divexact(A006722[n-1]*A006722[n-5]+A006722[n-2]*A006722[n-4]+A006722[n-3]**2,A006722[n-6]))
    # Chai Wah Wu, Sep 01 2014
    

Formula

a(n) = a(5-n).
Michael Somos found an explicit formula for a(n) in 1993, which is not as widely known as it should be. The following is a quotation from the "Somos 6 sequence" document mentioned in the Links section: (Start)
This sequence is one of a large class of sequences of numbers that satisfy a non-linear recurrence relation depending on previous terms. It is also one of the class of sequences which can be computed from a theta series, hence I call them theta sequences. Here are the details:
Fix the following seven constants:
c1 = 0.875782749065950194217251...,
c2 = 1.084125925473763343779968...,
c3 = 0.114986002186402203509006...,
c4 = 0.077115634258697284328024...,
c5 = 1.180397390176742642553759...,
c6 = 1.508030831265086447098989..., and
c7 = 2.551548771413081602906643... .
Consider the doubly indexed series: f(x,y) = c1*c2^(x*y)*sum(k2, (-1)^k2*sum(k1, g(k1,k2,x,y))) , where g(k1,k2,x,y) = c3^(k1*k1)*c4^(k2*k2)*c5^(k1*k2)*cos(c6*k1*x+c7*k2*y) . Here both sums range over all integers.
Then the sequence defined by a(n) = f(n-2.5,n-2.5) is the Somos 6 sequence. I announced this in 1993. (End) - N. J. A. Sloane, Dec 06 2015
From Andrew Hone and Yuri Fedorov, Nov 27 2015: (Start)
The following is an exact formula for a(n):
a(n+3) = A*B^n*C^(n^2 -1)*sigma(v_0 + n*v) / sigma(v)^(n^2),
where
A = C / sigma(v_0),
B = A^(-1)*sigma(v) / sigma(v_0+v),
C = i/sqrt(20) (with i the imaginary unit),
sigma is the two-variable Kleinian sigma-function associated with the genus two curve X: y^2 = 4*x^5 - 233*x^4 + 1624*x^3 - 422*x^2 + 36*x - 1, and
v and v_0 are two-component vectors in the Jacobian of X, being the images under the Abel map of the divisors P_1+P_2 - 2*infinity, Q_1 + Q_2 - 2*infinity, respectively, where points P_j and Q_j on X are given by
P_1 = ( -8 + sqrt(65), 20*i*(129 -16*sqrt(65)) ),
P_2 = ( -8 - sqrt(65), 20*i*(129 +16*sqrt(65)) ),
Q_1 = ( 5 + 2*sqrt(6), 4*i*(71 +sqrt(6)) ),
Q_2 = ( 5 - 2*sqrt{6}, 4*i*(71 -sqrt(6)) ).
The Abel map is based at infinity and calculated with respect to the basis of holomorphic differentials dx/y, x dx/y.
Approximate values from Maple are A = 0.0619-0.0317*i, B = -0.0000973-0.0000158*i, v = (-.341*i, .477*i), v_0 = (-.379-.150*i, -.259+.576*i).
(End)

Extensions

More terms from James A. Sellers, Aug 22 2000

A078495 a(n) = (a(n-1) * a(n-6) + a(n-3) * a(n-4)) / a(n-7) (a variant of Somos-7).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 6, 12, 24, 72, 144, 288, 864, 3456, 10368, 41472, 124416, 497664, 2985984, 17915904, 71663616, 429981696, 2579890176, 20639121408, 185752092672, 1486016741376, 8916100448256, 106993205379072
Offset: 0

Views

Author

Michael Somos, Nov 26 2002

Keywords

Comments

From Vladimir Shevelev, Apr 16 2016: (Start)
For k >= 0, an infinite sequence {b(k,n)} of Somos's sequences (n >= 0) is:
b(k,0) = b(k,1) = ... = b(k,2*k+2) = 1;
and then for n >= 2*k+3,
b(k,n) = (b(k,n-1)*b(k,n-2*k-2) + b(k,n-k-1)*b(k,n-k-2))/b(k,n-2*k-3).
In particular, {b(0,n)} is essentially A060656, {b(1,n)}=A006721, {a(2,n)}=A078495.
One can prove that the sequence {b(k,n)} has the first 4*(k+1) simple differences: 2k+2 zeros, after that k+1 1's and after that k+1 consecutive doubled triangular numbers (A000217), beginning with 2.
Further we have nontrivial differences. The first of them for k=0,1,2,... are 12, 26, 48, 80, 124, 182, 256, 348, 460, 594, ..., that is, {k^3/3 + 3*k^2 + 32*k/3 + 12}.
(End)

References

  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.

Crossrefs

Programs

  • Haskell
    a078495 n = a078495_list !! n
    a078495_list = [1, 1, 1, 1, 1, 1, 1] ++
      zipWith div (foldr1 (zipWith (+)) (map b [1,3])) a078495_list
      where b i = zipWith (*) (drop i a078495_list) (drop (7-i) a078495_list)
    -- Reinhard Zumkeller, May 05 2013
    
  • Magma
    I:=[1,1,1,1,1,1,1]; [n le 7 select I[n] else (Self(n-1)*Self(n-6) + Self(n-3)*Self(n-4))/Self(n-7): n in [1..30]]; // G. C. Greubel, Feb 21 2018
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==a[6]==1,a[n] == (a[n-1]*a[n-6]+a[n-3]*a[n-4])/a[n-7]},a,{n,40}] (* Harvey P. Dale, Apr 20 2012 *)
  • PARI
    {a(n) = if( n<0, a(6-n), if( n<7, 1, (a(n-1) * a(n-6) + a(n-3) * a(n-4)) / a(n-7)))};
    
  • PARI
    {a(n) = 2^(b(n-9) + b(n-7)) * 3^b(n-8)}; {b(n) = (n^2 + 10*n + 1 - n%2*13) \ 60 + 1}; /* b(n) = A025795(n) */
    

Formula

a(n) = 144 * a(n-6) * a(n-10) / a(n-16), a(n) = a(6-n) for all n in Z.

A368483 The degree of polynomials related to Somos-7 sequences. Also for n > 6 the degree of the (n-6)-th involution in a family of involutions in the Cremona group of rank 6 defined by a Somos-7 sequence.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 7, 9, 12, 14, 16, 19, 23, 26, 30, 33, 37, 42, 47, 51, 56, 61, 67, 73, 79, 84, 91, 98, 105, 112, 119, 126, 135, 143, 151, 159, 168, 177, 187, 196, 205, 215, 226, 236, 247, 257, 268, 280, 292, 303, 315, 327, 340, 353, 366
Offset: 0

Views

Author

Helmut Ruhland, Dec 26 2023

Keywords

Comments

Let s(0), s(1), ..., s(5), s(6) be the 7 initial values in a Somos-7 sequence. The following terms s(7), s(8), ... are rational expressions in the 7 initial values derived from the Somos-7 recurrence: s(n) = ( s(n-1)*s(n-6) + s(n-2)*s(n-5) + s(n-3)*s(n-4) ) / s(n-7). E.g., s(7) = (s(1)*s(6) + s(2)*s(5) + s(3)*s(4)) / s(0), s(8) = ... .
Because of the Laurent property of a Somos-7 sequence the denominator of these terms is a monomial in the initial values.
With the sequence e(n) = A369611(n), the tropical version of the Somos-7 sequence, the monomial D(n) is defined as Product_{k=0..6} s(k)^a(n-k). Define the polynomial G(n) to be s(n) * D(n). G(n) is 1 for n < 7, else G(n) is the numerator of s(n), so ..., G(5) = 1, G(6) = 1, G(7) = s(1)*s(6) + s(2)*s(5) + s(3)*s(4), ...
For n >= 0, a term a(n) of the actual sequence is the degree of G(n). The degree of the denominator of s(n) is a(n) - 1.
This Somos-7 sequence defines a family (proposed name: Somos family) S of (birational) involutions in Cr_6(R), the Cremona group of rank 6.
A Somos involution S(n) in this family is defined as S(n) : RP^6 -> RP^6, (s(0) : s(1) : ... : s(5) : s(6)) -> (s(n+6) : s(n+5) : ... : s(n+1) : s(n)). For n > 0 S(n) = (G(n+6) : G(n+5)*m1 : ... : G(n+1)*m5 : G(n)*m6 ), with m1, m2, ..., m5, m6 monomials. The involutions generate an infinite dihedral group. Already 2 consecutive involutions S(n), S(n+1) generate this group too. This group as a dihedral group has 2 conjugacy classes { ..., S(0), S(2), S(4), ... } and { ..., S(1), S(3), S(5), ... } of involutions. The degree of such an involution S(n) equals the degree of G(n+6) and the term a(n+6) in the actual sequence.

Crossrefs

Programs

  • Maxima
    N : 7$ Len : 11$     /* Somos-N, N >= 2, Len = length of the calculated lists */
    NofRT : floor (N / 2)$  /* number of terms in a Somos-N recurrence */
    S : makelist (0, Len)$
    G : makelist (0, Len)$ DegG : makelist (0, Len)$   /* G, the numerator of s() */
    for i: 1 thru N do ( S[i] : s[i - 1], G[i] : 1, DegG[i] : 0 )$
    for i: N + 1 thru Len do (
       SS : 0,
       for j : 1 thru NofRT do (
          SS : SS + S[i - j] * S[i - N + j]
       ),
       S[i] : factor (SS / S[i - N]), G[i] : num (S[i]),
       /* for N > 3 G is a homogenous polynomial, take the first monomial to determine the degree */
       Mon : G[i], if N > 3 then ( Mon : args (Mon)[1] ),
       DegG[i] : 0, for j : 0 thru N - 1 do ( DegG[i] : DegG[i] + hipow (Mon, s[j]) )
    )$ DegG;

Formula

a(n) = 1 + e(n-6) + e(n-5) + e(n-4) + e(n-3) + e(n-2) + e(n-1) + e(n), where e(n) = A369611(n), the tropical version of Somos-7, is the exponent of one of the initial values in the denominator of s(n).
The growth rate is quadratic, a(n) = (7/60) * n^2 + O(n).

A276535 a(n) = a(n-1) * a(n-6) * (a(n-2) * a(n-5) * (a(n-3) * a(n-4) + 1) + 1) / a(n-7), with a(0) = a(1) = a(2) = a(3) = a(4) = a(5) = a(6) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 9, 63, 2331, 4114215, 16341764835375, 266584861903285121344257375, 7896333852271846954822982651737848156847060737115875, 2309336603704915706429640788623787983392652603516450553629239932054220008270731649775618317371336467375
Offset: 0

Views

Author

Seiichi Manyama, Nov 16 2016

Keywords

Comments

Inspired by Somos-7 sequence.
a(n) is an integer for n >= 0.
a(n+1)/a(n) is an integer for n >= 0.

Examples

			a(7) = a(6) * b(6) = 1 * 3 = 3,
a(8) = a(7) * b(7) = 3 * 3 = 9,
a(9) = a(8) * b(8) = 9 * 7 = 63,
a(10) = a(9) * b(9) = 63 * 37 = 2331.
		

Crossrefs

Programs

  • Ruby
    def A(k, n)
      a = Array.new(2 * k + 1, 1)
      ary = [1]
      while ary.size < n + 1
        i = 0
        k.downto(1){|j|
          i += 1
          i *= a[j] * a[-j]
        }
        break if i % a[0] > 0
        a = *a[1..-1], i / a[0]
        ary << a[0]
      end
      ary
    end
    def A276535(n)
      A(3, n)
    end

Formula

a(n) * a(n-7) = a(n-1) * a(n-6) + a(n-1) * a(n-2) * a(n-5) * a(n-6) + a(n-1) * a(n-2) * a(n-3) * a(n-4) * a(n-5) * a(n-6).
a(6-n) = a(n).
Let b(n) = b(n-6) * (b(n-2) * b(n-3) * b(n-4) * (b(0) * b(1) * ... * b(n-5))^2 * (b(n-3) * (b(0) * b(1) * ... * b(n-4))^2 + 1)+ 1) with b(0) = b(1) = b(2) = b(3) = b(4) = b(5) = 1, then a(n) = a(n-1) * b(n-1) = b(0) * b(1) * ... * b(n-1) for n > 0.

A354486 Triangle read by rows: T(n,k) is the numerator of the n-th term of the Somos-k sequence, 4 <= k <= n.

Original entry on oeis.org

2, 3, 2, 7, 3, 3, 23, 5, 5, 3, 59, 11, 9, 5, 4, 314, 37, 23, 9, 7, 4, 1529, 83, 75, 17, 13, 7, 5, 8209, 274, 421, 41, 25, 13, 9, 5, 83313, 1217, 1103, 137, 61, 25, 17, 9, 6, 620297, 6161, 5047, 769, 187, 49, 33, 17, 11, 6
Offset: 4

Views

Author

Pontus von Brömssen, May 28 2022

Keywords

Examples

			Triangle begins:
  n\k|     4    5    6   7  8  9 10 11 12
  ---+-----------------------------------
   4 |     2
   5 |     3    2
   6 |     7    3    3
   7 |    23    5    5   3
   8 |    59   11    9   5  4
   9 |   314   37   23   9  7  4
  10 |  1529   83   75  17 13  7  5
  11 |  8209  274  421  41 25 13  9  5
  12 | 83313 1217 1103 137 61 25 17  9  6
		

Crossrefs

Cf. A354487 (denominators).
Columns 4-7 are A006720-A006723 (without the initial 1's).
Showing 1-10 of 13 results. Next