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.

A055113 Number of bracketings of 0^0^0^...^0, with n 0's, giving the result 0, with conventions that 0^0 = 1^0 = 1^1 = 1, 0^1 = 0.

Original entry on oeis.org

0, 1, 0, 1, 1, 5, 11, 41, 120, 421, 1381, 4840, 16721, 59357, 210861, 759071, 2744393, 10000437, 36609977, 134750450, 498016753, 1848174708, 6882643032, 25715836734, 96365606679, 362102430069, 1364028272451, 5150156201026, 19486989838057, 73880877535315
Offset: 0

Views

Author

Jeppe Stig Nielsen, Jun 15 2000

Keywords

Comments

Total number of bracketings of 0^0^...^0 is A000108(n-1) (this is Catalan's problem). So the number of bracketings giving 1 is A000108(n-1) - a(n).
Also bracketings of f => f => ... => f where f is "false" and "=>" is implication.
Self-convolution yields A187430. - Paul D. Hanna, May 31 2015
Also, number of nonnegative walks of n steps with step sizes 1 and 2, starting at 0 and ending at 1. - Andrew Howroyd, Dec 23 2017
Series reversion is related to A001006. - F. Chapoton, Jul 14 2021

Examples

			Number of bracketings of 0^0^0^0^0^0 giving 0 is 11, so a(6) = 11.
From _Jon E. Schoenfield_, Dec 24 2017: (Start)
The 11 ways of parenthesizing 0^0^0^0^0^0 to obtain 0 are
0^(0^(0^((0^0)^0))) = 0^(0^(0^(1^0))) = 0^(0^(0^1)) = 0^(0^0) = 0^1 = 0;
0^((0^0)^(0^(0^0))) = 0^(1^(0^1)) = 0^(1^0) = 0^1 = 0;
0^((0^0)^((0^0)^0)) = 0^(1^(1^0)) = 0^(1^1) = 0^1 = 0;
0^(((0^0)^0)^(0^0)) = 0^((1^0)^1) = 0^(1^1) = 0^1 = 0;
0^((0^(0^(0^0)))^0) = 0^((0^(0^1))^0) = 0^((0^0)^0) = 0^(1^0) = 0^1 = 0;
0^((0^((0^0)^0))^0) = 0^((0^(1^0))^0) = 0^((0^1)^0) = 0^(0^0) = 0^1 = 0;
0^(((0^0)^(0^0))^0) = 0^((1^1)^0) = 0^(1^0) = 0^1 = 0;
0^(((0^(0^0))^0)^0) = 0^(((0^1)^0)^0) = 0^((0^0)^0) = 0^(1^0) = 0^1 = 0;
0^((((0^0)^0)^0)^0) = 0^(((1^0)^0)^0) = 0^((1^0)^0) = 0^(1^0) = 0^1 = 0;
(0^(0^0))^((0^0)^0) = (0^1)^(1^0) = 0^1 = 0;
(0^((0^0)^0))^(0^0) = (0^(1^0))^1. (End)
		

References

  • Thanks to Soren Galatius Smith, Jesper Torp Kristensen et al.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n*(2-n),
          ((n-1)*(115*n^3-689*n^2+1332*n-840) *a(n-1)
           +(8*n-20)*(5*n^3+12*n^2-113*n+126) *a(n-2)
           -36*(n-3)*(5*n-8)*(2*n-5)*(2*n-7)  *a(n-3))
          /((2*(2*n-1))*(5*n-13)*n*(n-1)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 04 2019
  • Mathematica
    Rest[ CoefficientList[ Series[(-1 - Sqrt[1 - 4x] + Sqrt[2]Sqrt[1 + Sqrt[1 - 4x] + 6x])/4, {x, 0, 28}], x]] (* Robert G. Wilson v, Oct 28 2005 *)
    a[n_] := (-1)^(n+1)*Binomial[2n-1, n]*HypergeometricPFQ[{1-n, (n+1)/2, n/2}, {n, n+1}, 4]/(2n-1);
    Array[a, 27] (* Jean-François Alcover, Dec 26 2017, after Vladimir Kruchinin *)
  • Maxima
    a(n):= sum(binomial(2*j+n-1,j+n-1)*(-1)^(n-j-1)*binomial(2*n-1,j+n), j,0,n-1)/(2*n-1); /* Vladimir Kruchinin, May 10 2011 */
    
  • PARI
    a(n)={sum(j=0, n-1, binomial(2*j+n-1, j+n-1)*(-1)^(n-j-1)*binomial(2*n-1, j+n))/(2*n-1)} \\ Andrew Howroyd, Dec 23 2017
    
  • PARI
    first(n) = x='x+O('x^(n+1)); Vec(-((1 - 4*x)^(1/2) + 1)/4 + (2 + 2*(1 - 4*x)^(1/2) + 12*x)^(1/2)/4) \\ Iain Fox, Dec 23 2017

Formula

G.f.: - 1/4 - (1/4)*(1 - 4*x)^(1/2) + (1/4)*(2 + 2*(1 - 4*x)^(1/2) + 12*x)^(1/2).
The ratio a(n)/A000108(n-1) converges to (5-sqrt(5))/10 as n->oo.
a(n) = (Sum_{j=0..n-1} binomial(2*j+n-1, j+n-1)*(-1)^(n-j-1)*binomial(2*n-1, j+n))/(2*n-1). - Vladimir Kruchinin, May 10 2011
a(n) ~ (1-1/sqrt(5))*2^(2*n-3)/(sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Aug 09 2013
D-finite with recurrence: 2*n*(2*n-1)*(n-1)*a(n) -(n-1)*(19*n^2-60*n+48)*a(n-1) +(-31*n^3+173*n^2-346*n+264)*a(n-2) +4*(2*n-7)*(17*n^2-83*n+102)*a(n-3) +36*(2*n-7)*(2*n-9)*(n-4)*a(n-4)=0. - R. J. Mathar, Feb 20 2020
a(n) + A111160(n) = A000108(n). - F. Chapoton, Jul 14 2021

Extensions

a(0)=0 prepended by Alois P. Heinz, Mar 04 2019

A185286 Triangle T(n,k) is the number of nonnegative walks of n steps with step sizes 1 and 2, starting at 0 and ending at k.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 1, 2, 1, 2, 5, 6, 3, 3, 3, 1, 11, 11, 13, 17, 13, 7, 6, 4, 1, 24, 41, 52, 44, 43, 40, 25, 14, 10, 5, 1, 93, 120, 152, 176, 161, 126, 107, 80, 45, 25, 15, 6, 1, 272, 421, 550, 559, 561, 524, 412, 303, 227, 146, 77, 41, 21, 7, 1, 971, 1381, 1813, 2056, 2045, 1835, 1615, 1309, 938, 648, 435, 251, 126, 63, 28, 8, 1
Offset: 0

Views

Author

Keywords

Comments

Equivalently, the number of paths from (0,0) to (n,k) using steps of the form (1,2),(1,1),(1,-1) or (1,-2) and staying on or above the x-axis.
It appears that A047002 gives the row sums of this triangle.

Examples

			The table starts:
1
0,1,1
2,1,1,2,1
2,5,6,3,3,3,1
		

Crossrefs

Columns k=0..2 are A187430, A055113, A296619.
Cf. A005408(row lengths), A047002(apparently row sums).

Programs

  • Maple
    T:= proc(n,k) option remember;
      if k < 0 or k > 2*n then return 0 fi;
      procname(n-1,k-2)+procname(n-1,k-1)+procname(n-1,k+1)+procname(n-1,k+2)
    end proc:
    T(0,0):= 1:
    for nn from 0 to 10 do
      seq(T(nn,k),k=0..2*nn)
    od; # Robert Israel, Dec 19 2017
  • Mathematica
    T[n_, k_] := T[n, k] = If[k < 0 || k > 2n, 0, T[n-1, k-2] + T[n-1, k-1] + T[n-1, k+1] + T[n-1, k+2]];
    T[0, 0] = 1;
    Table[T[n, k], {n, 0, 10}, {k, 0, 2n}] // Flatten (* Jean-François Alcover, Aug 19 2022, after Robert Israel *)
  • PARI
    flip(v)=vector(#v,i,v[#v+1-i])
    ar(n)={local(p);p=1;
    for(k=1,n,p*=1+x+x^3+x^4;p=(p-polcoeff(p,0)-polcoeff(p,1)*x)/x^2);
    flip(Vec(p))}
Showing 1-2 of 2 results.