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-7 of 7 results.

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

A006769 Elliptic divisibility sequence associated with elliptic curve "37a1": y^2 + y = x^3 - x and multiples of the point (0,0).

Original entry on oeis.org

0, 1, 1, -1, 1, 2, -1, -3, -5, 7, -4, -23, 29, 59, 129, -314, -65, 1529, -3689, -8209, -16264, 83313, 113689, -620297, 2382785, 7869898, 7001471, -126742987, -398035821, 1687054711, -7911171596, -47301104551, 43244638645
Offset: 0

Views

Author

Michael Somos, Jul 16 1999

Keywords

Comments

This sequence has a recursion same as the Somos-4 sequence recursion.
a(n+1) is the Hankel transform of A178072. - Paul Barry, May 19 2010
The recurrence formulas in [Kimberling, p. 16] are missing square and cube exponents. - Michael Somos, Jul 07 2014
This is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = 1, y = -1, z = 1.
From Helmut Ruhland, Nov 28 2023: (Start)
This sequence and its two subsequences with even/odd indices satisfy the Somos-4 recursion.
The even subsequence is A051138, here called r[ ]. The odd subsequence is the classical Somos-4 A006720, here called s[ ].
These two subsequences interleaved as follows, recover the original sequence which is now: r[0], s[2], r[1], -s[3], r[2], s[4], r[3], -s[5], ..., all Somos-4 s[ ] with odd index with a minus sign. (End)

References

  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; pp. 11 and 164.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006769 n = a050512_list !! n
    a006769_list = 0 : 1 : 1 : (-1) : 1 : zipWith div (zipWith (+) (zipWith (*)
       (drop 4 a006769_list) (drop 2 a006769_list))
         (map (^ 2) (drop 3 a006769_list))) (tail a006769_list)
    -- Reinhard Zumkeller, Nov 02 2011
  • Mathematica
    a[n_] := If[n < 0, -a[-n], If[n == 0, 0, ClearAll[an]; an[] = 1; an[3] = -1; For[k = 5, k <= n, k++, an[k] = (an[k-1]*an[k-3] + an[k-2]^2)/an[k-4]]; an[n]]]; Table[a[n], {n, 0, 32}] (* _Jean-François Alcover, Dec 14 2011, after first Pari program *)
    Join[{0},RecurrenceTable[{a[1]==a[2]==1,a[3]==-1,a[4]==1,a[n]==(a[n-1] a[n-3]+ a[n-2]^2)/a[n-4]},a,{n,40}]] (* Harvey P. Dale, May 04 2018 *)
    a[ n_] := Which[n<0, -a[-n], n<5, {0, 1, 1, -1, 1}[[1+n]], True, (a[n-1]*a[n-3] + a[n-2]^2)/a[n-4]]; (* Michael Somos, Aug 20 2024 *)
  • PARI
    {a(n) = my(an); if( n<0, -a(-n), if( n==0, 0, an = vector( max(3, n), i, 1); an[3] = -1; for( k=5, n, an[k] = (an[k-1] * an[k-3] + an[k-2]^2) / an[k-4]); an[n]))};
    
  • PARI
    {a(n) = my(an); if( n<0, -a(-n), if( n==0, 0, an = Vec((-1 - 2*x + sqrt(1 + 4*x - 4*x^3 + O(x^n))) / (2 * x^2)); matdet( matrix((n-1)\2, (n-1)\2, i, j, if(i + j - 1 - n%2<0, 0, an[i + j -n%2])))))};
    
  • PARI
    {a(n) = my(E, z); E = ellinit([0, 0, -1, -1, 0]); z = ellpointtoz(E, [0, 0]); round( ellsigma(E, n*z) / ellsigma(E, z)^(n^2))}; /* Michael Somos, Oct 22 2004 */
    
  • PARI
    {a(n) = sign(n) * subst( elldivpol( ellinit([0, 0, -1, -1, 0]), abs(n)), x, 0)}; /* Michael Somos, Dec 16 2014 */
    

Formula

a(n) = (a(n-1) * a(n-3) + a(n-2)^2) / a(n-4) for all n != 4.
a(n) = (-a(n-1) * a(n-4) - a(n-2) * a(n-3)) / a(n-5) for all n != 5.
a(-n) = -a(n) for all n.
a(2*n + 1) = a(n+2) * a(n)^3 - a(n-1) * a(n+1)^3, a(2*n) = a(n+2) * a(n) * a(n-1)^2 - a(n) * a(n-2) * a(n+1)^2 for all n.
A006720(n) = (-1)^n * a(2*n - 3), A028941(n) = a(n)^2 for all n.
a(2*n) = A051138(n). - Michael Somos, Feb 10 2015
a(2*n+1) = a(n-1)*a(n)^2*a(n+3) - a(n-2)*a(n+1)^2*a(n+2) for all n. - Michael Somos, Aug 20 2024

A028937 Denominator of x-coordinate of (2n)*P where P = (0,0) is the generator for rational points on the curve y^2 + y = x^3 - x.

Original entry on oeis.org

1, 1, 1, 25, 16, 841, 16641, 4225, 13608721, 264517696, 12925188721, 5677664356225, 49020596163841, 158432514799144041, 62586636021357187216, 1870098771536627436025, 41998153797159031581158401, 15402543997324146892198790401
Offset: 1

Views

Author

Keywords

Examples

			a(4) = 25 where 8P = (21/25, -69/125).
		

Crossrefs

Programs

Formula

P=(0, 0), 2P=(1, 0); if kP=(a, b) then (k+1)P = (a' = (b^2 - a^3)/a^2, b' = -1 - b*a'/a).
a(n) = A028941(2n). - Seiichi Manyama, Nov 19 2016
a(n) = a(-n) = b(n)*b(n+3) - b(n+1)*b(n+2) for all n in Z where b(n) = A006720(n). - Michael Somos, Mar 23 2022

A157101 A Somos-4 variant.

Original entry on oeis.org

1, -1, -5, -4, 29, 129, -65, -3689, -16264, 113689, 2382785, 7001471, -398035821, -7911171596, 43244638645, 6480598259201, 124106986093951, -5987117709349201, -541051130050800400, -4830209396684261199
Offset: 0

Views

Author

Paul Barry, Feb 22 2009

Keywords

Comments

Hankel transform of A157100.

Crossrefs

Programs

  • GAP
    a:=[1,-1,-5,-4];; for n in [5..20] do a[n]:=(a[n-1]*a[n-3] + a[n-2]^2)/a[n-4]; od; a; # G. C. Greubel, Feb 23 2019
  • Magma
    I:=[1,-1,-5,-4]; [n le 4 select I[n] else (Self(n-1)*Self(n-3) + Self(n-2)^2)/Self(n-4): n in [1..20]]; // G. C. Greubel, Feb 23 2019
    
  • Mathematica
    RecurrenceTable[{a[n]==(a[n-1]*a[n-3]+a[n-2]^2)/a[n-4], a[0]==1, a[1]==-1, a[2]==-5, a[3]==-4}, a, {n,20}] (* G. C. Greubel, Feb 23 2019 *)
  • PARI
    m=20; v=concat([1,-1,-5,-4], vector(m-4)); for(n=5, m, v[n] = (v[n-1]*v[n-3] +v[n-2]^2)/v[n-4]); v \\ G. C. Greubel, Feb 23 2019
    
  • Sage
    def a(n):
        if (n==0): return 1
        elif (n==1): return -1
        elif (n==2): return -5
        elif (n==3): return -4
        else: return (a(n-1)*a(n-3) + a(n-2)^2)/a(n-4)
    [a(n) for n in (0..20)] # G. C. Greubel, Feb 23 2019
    

Formula

a(n) = (a(n-1)*a(n-3) + a(n-2)^2)/a(n-4), with a(0)=1, a(1)=-1, a(2)=-5, a(3)=-4.
a(n) = A051138(n+1) for all n in Z. - Michael Somos, Jul 17 2016

A157002 Transform of Catalan numbers whose Hankel transform gives the Somos-4 sequence.

Original entry on oeis.org

1, 0, 1, 2, 6, 17, 51, 156, 488, 1552, 5006, 16337, 53849, 179015, 599535, 2020924, 6851150, 23344138, 79902364, 274606264, 947240592, 3278404274, 11381240074, 39621423949, 138288477617, 483805404673, 1696318159457, 5959737806635
Offset: 0

Views

Author

Paul Barry, Feb 20 2009

Keywords

Comments

Image of the Catalan numbers A000108 by the Riordan array (1-x,x(1-x^2)). Hankel transform is A006720(n+1).
The sequence a(n)+a(n+1) begins 1,1,3,8,23,68,... which is A056010. The sequence a(n)+a(n-1) begins 1,1,1,3,8,23,68,... which is A025262. This is obtained by applying (1-x^2,x(1-x^2)) to the Catalan numbers.
Hankel transform of a(n+1) is -A051138(n). - Michael Somos, Feb 10 2015

Examples

			G.f. = 1 + x^2 + 2*x^3 + 6*x^4 + 17*x^5 + 51*x^6 + 156*x^7 + 488*x^8 + ...
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( (1 -Sqrt(1-4*x*(1-x^2)))/(2*x*(1+x)) )); // G. C. Greubel, Feb 26 2019
    
  • Mathematica
    CoefficientList[Series[(1-Sqrt[1-4x(1-x^2)])/(2x(1+x)), {x,0,30}], x] (* G. C. Greubel, Feb 26 2019 *)
  • PARI
    {a(n) = if( n<0, -(-1)^n / 2 * (n<-1), polcoeff( (1 - sqrt(1 - 4*x * (1 - x^2) + x^2 * O(x^n))) / (2 * x * (1 + x)), n))}; /* Michael Somos, Feb 10 2015 */
    
  • Sage
    ((1-sqrt(1-4*x*(1-x^2)))/(2*x*(1+x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 26 2019

Formula

G.f.: (1 - sqrt(1-4*x*(1-x^2)))/(2*x*(1+x)).
a(n) = Sum_{k=0..n} (-1)^floor((n-k+1)/2)*C(k,floor((n-k)/2))*A000108(k).
Conjecture: (n+1)*a(n) +3*(-n+1)*a(n-1) +2*(-2*n+1)*a(n-2) +2*(2*n-7)*a(n-3) +2*(2*n-7)*a(n-4)=0. - R. J. Mathar, Nov 19 2014
0 = a(n)*(+16*a(n+1) + 16*a(n+2) - 64*a(n+3) - 42*a(n+4) + 22*a(n+5)) + a(n+1)*(+16*a(n+1) + 48*a(n+2) - 46*a(n+3) - 56*a(n+4) + 22*a(n+5)) + a(n+2)*(+32*a(n+2) + 34*a(n+3) - 8*a(n+4) - 10*a(n+5)) + a(n+3)*(+18*a(n+3) + 11*a(n+4) - 9*a(n+5)) + a(n+4)*(+3*a(n+4) + a(n+5)) for all n in Z. - Michael Somos, Feb 10 2015

A171416 A sequence with Somos-4 Hankel transform.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 31, 65, 156, 351, 849, 1993, 4866, 11733, 28921, 70997, 176560, 438979, 1100302, 2761797, 6969909, 17625015, 44742636, 113822415, 290416803, 742486655, 1902767481, 4885201701, 12567065582, 32382099109, 83580301371
Offset: 0

Views

Author

Paul Barry, Dec 08 2009

Keywords

Comments

Hankel transform is the Somos-4 sequence A006720(n+2).
The generating function A(x) satisfies A(x) = 1 + x + x^2*A(x) + (x*A(x))^2.
BINOMIAL transform is A087626. HANKEL transform with a(0) omitted is A051138(n+2). - Michael Somos, Jan 11 2013

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 7*x^4 + 13*x^5 + 31*x^6 + 65*x^7 + 156*x^8 + ...
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!((1-x^2-Sqrt(1-6*x^2-4*x^3+x^4))/(2*x^2))); // G. C. Greubel, Sep 22 2018
    
  • Maple
    m:=30; S:=series((1 -x^2 -sqrt(1-6*x^2-4*x^3+x^4))/(2*x^2), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 18 2020
  • Mathematica
    CoefficientList[Series[(1-x^2 -Sqrt[1 -6x^2 -4x^3 +x^4])/(2x^2), {x, 0, 30}], x] (* Or *)
    a[n_]:= a[n]= a[n-2] + Sum[a[k-1]a[n-k-1], {k, n-1}]; a[0]=a[1]=1; Array[a, 31, 0] (* Robert G. Wilson v, Mar 28 2011 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 2*(1 + x) / (1 - x^2 + sqrt(1 - 6*x^2 - 4*x^3 + x^4 + x*O(x^n))), n))}; /* Michael Somos, Jan 11 2013 */
    
  • Sage
    def A171416_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1 -x^2 -sqrt(1-6*x^2-4*x^3+x^4))/(2*x^2) ).list()
    A171416_list(30) # G. C. Greubel, Feb 18 2020

Formula

G.f.: (1 - x^2 - sqrt(1-6*x^2-4*x^3+x^4))/(2*x^2).
G.f.: (1/(1-x))*c(x^2/((1-x)*(1-x^2))) where c(x) is the g.f. of A000108.
G.f.: 1/(1-x-x^2/(1-x^2-x^2/(1-x-x^2/(1-x^2-x^2/(1-x-x^2/(1-x^2-x^2/(1-...))))))) (continued fraction).
a(n) = a(n-2) + Sum_{k=1..n-1} a(k-1)*a(n-k-1) with a(0)=a(1)=1.
Conjecture: (n+2)*a(n) +(n+1)*a(n-1) +6*(1-n)*a(n-2) +2*(11-5*n)*a(n-3) +(10-3*n)*a(n-4) +(n-5)*a(n-5)=0. - R. J. Mathar, Jul 24 2012
G.f.: 2*(1 + x) / (1 - x^2 + sqrt(1 - 6*x^2 - 4*x^3 + x^4)).
(n+2) * a(n) - (6*n-6) * a(n-2) - (4*n-10) * a(n-3) + (n-4) * a(n-4) = 0 if n>3. - Michael Somos, Jan 11 2013
If we write the generating function as 1/(1-b_{0}*x/(1-c_{0}x/(1-b_{1}*x/(1-c_{1}*x/(1-...))))), then b_{n}*c_{n} = A006720(n+1)*A006720(n+3)/A006720(n+2)^2 = A377264(n)/A006720(n+2)^2. - Thomas Scheuerle, Oct 22 2024

A087626 Expansion of 2/(1-2x+sqrt(1-4x+4x^3)).

Original entry on oeis.org

1, 2, 5, 13, 36, 104, 311, 955, 2995, 9553, 30896, 101082, 333946, 1112496, 3732955, 12605029, 42800317, 146046819, 500555447, 1722402303, 5948047169, 20607691517, 71610355540, 249520257106, 871614139396, 3051737703526
Offset: 0

Views

Author

Michael Somos, Sep 16 2003

Keywords

Examples

			G.f. = 1 + 2*x + 5*x^2 + 13*x^3 + 36*x^4 + 104*x^5 + 311*x^6 + 955*x^7 + ... - _Michael Somos_, Mar 28 2020
		

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({(6+4*n)*a(n)+(-6-4*n)*a(n+1)+(-18-4*n)*a(2+n)+(24+5*n)*a(n+3)+(-6-n)*a(n+4), a(0) = 1, a(1) = 2, a(2) = 5, a(3) = 13},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Oct 26 2018
  • Mathematica
    CoefficientList[Series[2/(1-2x+Sqrt[1-4x+4x^3]),{x,0,30}],x] (* Harvey P. Dale, Jun 12 2017 *)
  • PARI
    {a(n) = polcoeff(2 / (1 - 2*x + sqrt(1 - 4*x + 4*x^3 + x*O(x^n))), n)};

Formula

G.f.: 2/(1-2x+sqrt(1-4x+4x^3)).
G.f. A(x) satisfies 0 = x^2*(1-x)*A(x)^2 - (1-2*x)*A(x) + 1.
First backwards difference is A056010.
(6+4*n)*a(n)+(-6-4*n)*a(n+1)+(-18-4*n)*a(2+n)+(24+5*n)*a(n+3)+(-6-n)*a(n+4)=0. - Robert Israel, Oct 26 2018
HANKEL transform is A006720(n+2). HANKEL transform with 0 prepended is -A051138.
INVERT transform of A157003. - Michael Somos, Mar 28 2020
Showing 1-7 of 7 results.