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

A143013 Number of Motzkin n-paths with two kinds of level steps one of which is a final step.

Original entry on oeis.org

1, 2, 3, 7, 17, 43, 114, 310, 861, 2433, 6970, 20198, 59101, 174373, 518179, 1549545, 4659399, 14079553, 42732230, 130208246, 398174723, 1221573603, 3758835953, 11597578995, 35872937745, 111216324015, 345539568900, 1075693015920
Offset: 0

Views

Author

Michael Somos, Jul 15 2008

Keywords

Comments

Hankel transform is the (4,-5) Somos-4 variant A171422. - Paul Barry, Dec 08 2009

Examples

			A = 1 + (L + F) + (LL + LF + UD) + (LLL + LLF + LUD + UDL + UDF + ULD + UFD) + ...
G.f. = 1 + 2*x + 3*x^2 + 7*x^3 + 17*x^4 + 43*x^5 + 114*x^6 + 310*x^7 + 861*x^8 + ...
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( (1-x -Sqrt(1-2*x-3*x^2-4*x^3))/(2*x^2) )); // G. C. Greubel, Feb 26 2019
    
  • Mathematica
    CoefficientList[Series[(1-x -Sqrt[1-2*x-3*x^2-4*x^3])/(2*x^2), {x, 0, 30}], x] (* G. C. Greubel, Feb 26 2019 *)
  • Maxima
    a(n):=sum(sum((binomial(i-1,k-1)*binomial(k,n-k-i+2)*binomial(k+i-2,i-1))/k,k,1,n-i+2),i,0,n+2); /* Vladimir Kruchinin, May 06 2018 */
    
  • PARI
    {a(n) = if(n<0, 0, polcoeff( (1 - x - sqrt(1 - 2*x - 3*x^2 - 4*x^3 + x^3*O(x^n))) / (2*x^2), n))}
    
  • PARI
    x='x+O('x^30); Vec((1-x-(1-2*x-3*x^2-4*x^3)^(1/2))/(2*x^2)) \\ Altug Alkan, May 06 2018
    
  • Sage
    ((1-x -sqrt(1-2*x-3*x^2-4*x^3))/(2*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 26 2019

Formula

Words on alphabet {U,D,L,F} of length n where U is upstep, D is downstep, L and F are level steps and F can only be immediately followed by D or end of word with defining equation A = 1 + F + LA + UADA.
When convolved with itself yields first difference shifted left one place.
G.f. A(x) satisfies: A(x) = 1 + x + A(x)*x + (A(x)*x)^2.
G.f.: (1+x) / (1-x -(x^2 + x^3) / (1-x -(x^2 + x^3) / (1-x -...))).
G.f.: (1 - x - sqrt(1 - 2*x - 3*x^2 - 4*x^3)) / (2*x^2).
Given an integer t >= 1 and initial values u = [a_0, a_1, ..., a_{t-1}], we may define an infinite sequence Phi(u) by setting a_n = a_{n-1} + a_0*a_{n-1} + a_1*a_{n-2} + ... + a_{n-2}*a_1 for n >= t. For example Phi([1]) is the Catalan numbers A000108. The present sequence is Phi([0,1,2]). - Gary W. Adamson, Oct 27 2008
Conjecture: (n+2)*a(n) -(2*n+1)*a(n-1) +3*(1-n)*a(n-2) +2*(5-2*n)*a(n-3)=0. - R. J. Mathar, Oct 25 2012
a(n) = Sum_{i=0..n+2} Sum_{k=1..n-i+2} C(i-1,k-1)*C(k,n-k-i+2)*C(k+i-2,i-1)/k. - Vladimir Kruchinin, May 06 2018

A178628 A (1,1) Somos-4 sequence associated to the elliptic curve E: y^2 - x*y - y = x^3 + x^2 + x.

Original entry on oeis.org

1, 1, -1, -4, -3, 19, 67, -40, -1243, -4299, 25627, 334324, 627929, -29742841, -372632409, 1946165680, 128948361769, 1488182579081, -52394610324649, -2333568937567764, -5642424912729707, 3857844273728205019
Offset: 1

Views

Author

Paul Barry, May 31 2010

Keywords

Comments

a(n) is (-1)^C(n,2) times the Hankel transform of the sequence with g.f.
1/(1-x^2/(1-x^2/(1-4x^2/(1+(3/16)x^2/(1-(76/9)x^2/(1-(201/361)x^2/(1-... where
1,4,-3/16,76/9,201/361,... are the x-coordinates of the multiples of z=(0,0)
on E:y^2-xy-y=x^3+x^2+x.

Crossrefs

Programs

  • Magma
    I:=[1,1,-1,-4]; [n le 4 select I[n] else (Self(n-1)*Self(n-3) + Self(n-2)^2)/Self(n-4): n in [1..30]]; // G. C. Greubel, Sep 18 2018
    
  • Mathematica
    RecurrenceTable[{a[n] == (a[n-1]*a[n-3] +a[n-2]^2)/a[n-4], a[1] == 1, a[2] == 1, a[3] == -1, a[4] == -4}, a, {n,1,30}] (* G. C. Greubel, Sep 18 2018 *)
  • PARI
    a(n)=local(E,z);E=ellinit([ -1,1,-1,1,0]);z=ellpointtoz(E,[0,0]); round(ellsigma(E,n*z)/ellsigma(E,z)^(n^2))
    
  • PARI
    m=30; v=concat([1,1,-1,-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, Sep 18 2018
    
  • PARI
    {a(n) = subst(elldivpol(ellinit([-1, 1, -1, 1, 0]), n), x ,0)}; /* Michael Somos, Jul 05 2024 */
    
  • SageMath
    @CachedFunction
    def a(n): # a = A178628
        if n<5: return (0,1,1,-1,-4)[n]
        else: return (a(n-1)*a(n-3) + a(n-2)^2)/a(n-4)
    [a(n) for n in range(1,41)] # G. C. Greubel, Jul 05 2024

Formula

a(n) = (a(n-1)*a(n-3) + a(n-2)^2)/a(n-4), n>4.
a(n) = -a(-n). a(n) = (-a(n-1)*a(n-4) +4*a(n-2)*a(n-3))/a(n-5) for all n in Z except n=5. - Michael Somos, Jul 05 2024

Extensions

Offset changed to 0. - Michael Somos, Jul 05 2024
Showing 1-2 of 2 results.