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.

User: Nachum Dershowitz

Nachum Dershowitz's wiki page.

Nachum Dershowitz has authored 5 sequences.

A337500 a(n) is the number of ballot sequences of length n tied or won by at most 3 votes.

Original entry on oeis.org

1, 2, 4, 8, 14, 30, 50, 112, 182, 420, 672, 1584, 2508, 6006, 9438, 22880, 35750, 87516, 136136, 335920, 520676, 1293292, 1998724, 4992288, 7696444, 19315400, 29716000, 74884320, 115000920, 290845350, 445962870
Offset: 0

Author

Nachum Dershowitz, Aug 30 2020

Keywords

Comments

Also the number of n-step walks on a path graph ending within 3 steps of the origin.
Also the number of monotonic paths of length n ending within 3 steps of the diagonal.

Crossrefs

Bisections give A162551 (odd part, starting from second element), A051924 (even part).

Formula

a(n) = A337499(n) + (n mod 2)*A024483(floor((n+3)/2)).
Conjecture: D-finite with recurrence -(n+3)*(n-4)*a(n) +2*(n^2-2*n-11)*a(n-1) +4*(n-1)^2*a(n-2) -8*(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Sep 27 2020

A337499 a(n) is the number of ballot sequences of length n tied or won by at most 2 votes.

Original entry on oeis.org

1, 2, 4, 6, 14, 20, 50, 70, 182, 252, 672, 924, 2508, 3432, 9438, 12870, 35750, 48620, 136136, 184756, 520676, 705432, 1998724, 2704156, 7696444, 10400600, 29716000, 40116600, 115000920, 155117520, 445962870
Offset: 0

Author

Nachum Dershowitz, Aug 29 2020

Keywords

Comments

Also the number of n-step walks on a path graph ending within 2 steps of the origin. Also the number of monotonic paths of length n ending within 2 steps of the diagonal.

Crossrefs

Bisections give A000984 (odd part, starting from second element), A051924 (even part).

Programs

  • Maple
    f:= gfun:-rectoproc({(4 + 4*n)*a(n) + (-12 - 4*n)*a(1 + n) + (-22 - 5*n)*a(2 + n) + (n + 4)*a(n + 3) + (6 + n)*a(n + 4), a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 6},a(n),remember):
    map(f, [$0..100]); # Robert Israel, Oct 08 2020

Formula

a(n) = A128014(n+1) + ((n+1) mod 2)*2*A001791(ceiling(n/2)).
D-finite with recurrence +(n+2)*a(n) +n*a(n-1) +(-5*n-2)*a(n-2) +4*(-n+1)*a(n-3) +4*(n-3)*a(n-4)=0. - Conjectured by R. J. Mathar, Sep 27 2020, verified by Robert Israel, Oct 08 2020
G.f.: ((4*x + 2)*sqrt(-4*x^2 + 1) + 4*x^2 + 4*x + 2)/(sqrt(-4*x^2 + 1)*(1 + sqrt(-4*x^2 + 1))^2). - Robert Israel, Oct 08 2020
a(n) ~ 2^(n - 1/2) * (5 + (-1)^n) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 08 2023

A336675 Number of paths of length n starting at initial node of the path graph P_10.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 251, 460, 911, 1690, 3327, 6225, 12190, 22950, 44744, 84626, 164407, 312019, 604487, 1150208, 2223504, 4239225, 8181175, 15621426, 30108147, 57556155, 110820165, 212037241, 407946421, 781074572, 1501844193, 2877011660, 5529362694
Offset: 0

Author

Nachum Dershowitz, Jul 30 2020

Keywords

Comments

Also the number of paths along a corridor width 10, starting from one side.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=10. - Herbert Kociemba, Sep 14 2020

Crossrefs

This is row 10 of A094718. Bisections give A224514 (even part), A216710 (odd part).
Cf. A000004 (row 0), A000007 (row 1), A000012 (row 2), A016116 (row 3), A000045 (row 4), A038754 (row 5), A028495 (row 6), A030436 (row 7), A061551 (row 8), A178381 (row 9), this sequence (row 10), A336678 (row 11), A001405 (limit).

Programs

  • Maple
    X := j -> (-1)^(j/11) - (-1)^(1-j/11):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7, 9])/11:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,10],{n,0,40}]//Round (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    my(x='x+O('x^44)); Vec((1 - 3*x^2 + x^4)/(1 - x - 4*x^2 + 3*x^3 + 3*x^4 - x^5)) \\ Joerg Arndt, Jul 31 2020

Formula

From Stefano Spezia, Jul 30 2020: (Start)
G.f.: (1 - 3*x^2 + x^4)/(1 - x - 4*x^2 + 3*x^3 + 3*x^4 - x^5).
a(n) = a(n-1) + 4*a(n-2) - 3*a(n-3) - 3*a(n-4) + a(n-5) for n > 4. (End)
a(n) = (2^n/11)*Sum_{r=1..10} (1-(-1)^r)*cos(Pi*r/11)^n*(1+cos(Pi*r/11)). - Herbert Kociemba, Sep 14 2020

A336678 Number of paths of length n starting at initial node of the path graph P_11.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 461, 922, 1702, 3404, 6315, 12630, 23494, 46988, 87533, 175066, 326382, 652764, 1217483, 2434966, 4542526, 9085052, 16950573, 33901146, 63255670, 126511340, 236063915, 472127830, 880983606, 1761967212, 3287837741
Offset: 0

Author

Nachum Dershowitz, Jul 30 2020

Keywords

Comments

Also the number of paths along a corridor width 11, starting from one side.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=11. - Herbert Kociemba, Sep 14 2020

Crossrefs

This is row 11 of A094718. Bisections give A087944 (even part), A087946 (odd part).
Cf. A000004 (row 0), A000007 (row 1), A000012 (row 2), A016116 (row 3), A000045 (row 4), A038754 (row 5), A028495 (row 6), A030436 (row 7), A061551 (row 8),
A178381 (row 9), A336675 (row 10), this sequence (row 11), A001405 (limit).

Programs

  • Maple
    X := j -> (-1)^(j/12) - (-1)^(1-j/12):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7, 9, 11])/12:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    LinearRecurrence[{0, 6, 0, -9, 0, 2}, {1, 1, 2, 3, 6, 10}, 40] (* Harvey P. Dale, Sep 08 2020 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,11], {n,0,40}]//Round (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    my(x='x+O('x^44)); Vec(-(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1))) \\ Joerg Arndt, Jul 31 2020

Formula

G.f.: -(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1)).
a(n) = (2^n/12)*Sum_{r=1..11} (1-(-1)^r)*cos(Pi*r/12)^n*(1+cos(Pi*r/12)). - Herbert Kociemba, Sep 14 2020

A114997 Number of ordered trees with n edges and no unary or binary nodes.

Original entry on oeis.org

0, 0, 1, 1, 1, 4, 8, 13, 31, 71, 144, 318, 729, 1611, 3604, 8249, 18803, 42907, 98858, 228474, 528735, 1228800, 2865180, 6693712, 15676941, 36807239, 86584783, 204060509, 481823778, 1139565120, 2699329341, 6403500057, 15211830451, 36183117255, 86171536894, 205459894230, 490417795075
Offset: 1

Author

Nachum Dershowitz, Feb 23 2006

Keywords

Comments

Also counts sequences of n natural numbers, excluding 1 and 2, such that the sum of every prefix is no more than its length.
a(n) is the number of Dyck paths of semilength n with all ascents of length >= 3. For example, a(6) = 4 counts U^6.D^6, U^3.D.U^3.D^5, U^3.D^2.U^3.D^4, U^3.D^3.U^3.D^3 where ^ denotes repetition and a dot denotes concatenation. - David Callan, Dec 08 2021

Crossrefs

Cf. A000108 (rev. of x/(1+1*Sum_{k>=1} x^k) ), A005043 (rev. of x/(1+x*Sum_{k>=1} x^k) ), A215341 (rev. of x/(1+x^3*Sum_{k>=1} x^k) ).

Programs

  • Maple
    eq := x^3*A^3+x*A^2-(1+x)*A+1 = 0: A := RootOf(eq, A): Aser := series(A, x = 0, 40): seq(coeff(Aser, x, n), n = 1 .. 38); # Emeric Deutsch, Jan 13 2015
  • Mathematica
    Table[Sum[1/(n+1)*Binomial[n+1,k]*Binomial[2*k-n-3,n-k],{k,Ceiling[(n+3)/2],n}],{n,1,20}] (* Vaclav Kotesovec, Mar 22 2014 *)
  • PARI
    a(n)=sum(k=ceil((n+3)/2), n, (1/(n+1) * binomial(n+1, k) * binomial(2*k-n-3, n-k)) ); \\ Joerg Arndt, Aug 19 2012
    
  • PARI
    N=66; gf=serreverse(x/(1+x^2*sum(k=1,N,x^k))+O(x^N)) / x;
    /* = 1 + x^3 + x^4 + x^5 + 4*x^6 + 8*x^7 + 13*x^8 + 31*x^9 + ... */
    v114997=Vec(gf) /* = [1, 0, 0, 1, 1, 1, 4, 8, 13, 31, ...] */  \\ Joerg Arndt, Aug 19 2012

Formula

a(n) = Sum_{(n+3)/2 <= k <= n} (1/(n+1) * binomial(n+1, k) * binomial(2*k-n-3, n-k)).
If A(x) is the g.f. for the sequence with a(0)=1, then x^3*A^3+x*A^2-(1 + x)*A+1 = 0. - Emeric Deutsch, Jan 13 2015
Let A(x) be the g.f. for the sequence with a(0)=1, then x*A(x) is the reversion of x/(1+x^2*sum(k>=1,x^k)). - Joerg Arndt, Aug 19 2012 (proved by Emeric Deutsch, Jan 13 2015)
Recurrence: (n+1)*(n+2)*(28*n^2 - 38*n - 15)*a(n) = -4*(n+1)*(14*n^3 - 12*n^2 + 7*n - 15)*a(n-1) + (n-2)*(140*n^3 + 90*n^2 - 221*n + 45)*a(n-2) + 6*(n-2)*(28*n^3 - 24*n^2 - 75*n + 95)*a(n-3) + 23*(n-3)*(n-2)*(28*n^2 + 18*n - 25)*a(n-4). - Vaclav Kotesovec, Mar 22 2014
a(n) ~ c / (n^(3/2) * r^n), where r = (4*sqrt(2) - 3 + 23*sqrt((344*sqrt(2))/529 - 235/529))/46 = 0.402505948621022106992... is the root of the equation 23*r^4+6*r^3+5*r^2-2*r-1 = 0 and c = sqrt((280 + 133*sqrt(2) - 25*sqrt(14*(11 + 8*sqrt(2)))) / (7*Pi))/4 = 0.273007516... - Vaclav Kotesovec, Mar 22 2014, updated Jan 14 2015

Extensions

Offset set to 1 by Joerg Arndt, Aug 19 2012