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

A201805 Number of arrays of n integers in -2..2 with sum zero and equal numbers of elements greater than zero and less than zero.

Original entry on oeis.org

1, 1, 5, 13, 61, 221, 1001, 4145, 18733, 82381, 375745, 1703945, 7858225, 36279985, 168992045, 789433013, 3707816333, 17467638925, 82599195809, 391645961993, 1862242702201, 8875355178521, 42394598106965, 202903189757053
Offset: 0

Views

Author

R. H. Hardin, Dec 05 2011

Keywords

Comments

Column 2 of A201811.
Also the number of walks of length n from a vertex to itself on the infinite square lattice with a self loop on each vertex. - Pierre-Louis Giscard, Jun 25 2014
Also the number of 3D walks of length n in a half-space returning to axis of origin. - Nachum Dershowitz, Aug 04 2020
The central column of a number pyramid P(j,k,m), where P(j,k,m) = P(j,k,m-1) + P(j-1,k,m-1) + P(j+1,k,m-1) + P(j,k-1,m-1) + P(j,k+1,m-1). P(1,1,1) = 1. j, k = 1..2*m+1. m >=1. - Yuriy Sibirmovsky, Sep 17 2016
Row sums of A282252. - Peter Bala, Feb 12 2017

Examples

			Some solutions for n=9
.-1...-1....1....1....0...-2....2...-1...-2...-2....1....1....1....2....0....1
..1...-2...-2...-2...-1...-2....1....0....2....1....0...-2...-1...-2....0...-1
..0....0....2....1...-1....2...-1....1....0...-2...-1....1...-2....1...-1....1
.-1...-2....2....0...-2....1....0....2....0....0...-1...-1....2...-1....0....1
..2....1....0....2...-1....0....1...-2...-1...-1....1....0...-2....1....0...-1
..0....2...-2...-1....2....0...-2...-2....0....2....1...-1...-2....2....2....1
..1....1...-2....1....1...-1....0....2....1...-2....0....2....2...-2...-2...-1
..0...-1....2...-1....1....2...-1...-2....1....2...-1...-2....0....0....0....0
.-2....2...-1...-1....1....0....0....2...-1....2....0....2....2...-1....1...-1
		

Crossrefs

Sum_{k=0..n} C(n,2k)*C(2k,k)^m: A002426 (m=1), this sequence (m=2).

Programs

  • Mathematica
    a[n_]=HypergeometricPFQ[{1/2, 1/2 - n/2, -(n/2)}, {1, 1}, 16]; (* or *)
    a[n_]=Sum[Binomial[n, 2 k] Binomial[2 k, k]^2, {k, 0, n}]; (* or *)
    Hypergeometric2F1[1/2, 1/2, 1, 16*x^2/(1 - x)^2]/(1 - x); (* O.g.f. *)
    Exp[x] BesselI[0, 2 x] BesselI[0, 2 x]; (* E.g.f. *)(* Pierre-Louis Giscard, Jun 25 2014 *)
    Nm=100;
    C1=Table[0,{j,1,Nm},{k,1,Nm}];
    C1[[Nm/2,Nm/2]]=1;
    C2=C1;
    Do[Do[C2[[j,k]]=C1[[j-1,k]]+C1[[j+1,k]]+C1[[j,k-1]]+C1[[j,k+1]]+C1[[j,k]],{j,2,Nm-1},{k,2,Nm-1}];Print[n," ",C2[[Nm/2,Nm/2]]];
    C1=C2,{n,1,20}] (* Yuriy Sibirmovsky, Sep 17 2016 *)
  • PARI
    a(n) = sum(k=0, n, binomial(n, 2*k)*binomial(2*k,k)^2); \\ Michel Marcus, Jun 25 2014
    
  • PARI
    {a(n)=polcoeff(1/agm(1+3*x, 1-5*x +x*O(x^n)), n)}
    for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Aug 31 2014
    
  • PARI
    {a(n) = polcoef(polcoef((1+x+y+1/x+1/y)^n, 0), 0)} \\ Seiichi Manyama, Oct 26 2019

Formula

Empirical: n^2*a(n) = (3*n^2-3*n+1)*a(n-1) + 13*(n-1)^2*a(n-2) - 15*(n-2)*(n-1)*a(n-3). - Vaclav Kotesovec, Oct 19 2012
a(n) appears to be the constant term of (1 + X + 1/X + Y + 1/Y)^n, which has o.g.f. hypergeom([1/2, 1/2],[1],16*x^2/(1-x)^2)/(1-x). - Mark van Hoeij, May 07 2013
From Pierre-Louis Giscard, Jun 25 2014 : (Start)
a(n) is exactly the constant term of (1 + X + 1/X + Y + 1/Y)^n since this generates closed walks on the square lattice with self-loops. Non-constant terms generate walks to the neighbors of a vertex. Removing the 1 is equivalent to removing the self-loops.
a(n) = 3F2([1/2, 1/2 - n/2, -n/2], [1, 1], 16).
a(n) = Sum_{k=0..n} C(n,2k)*C(2k,k)^2.
O.g.f.: 2F1([1/2, 1/2], [1], 16*x^2/(1-x)^2)/(1-x) with 2F1 the Hypergeometric function.
E.g.f.: e^x I_{0}(2x)^2 with I_a(x) the modified Bessel function I of the first kind. (End)
O.g.f.: 1 / AGM(1+3*x, 1-5*x), given a(0)=1, where AGM(x,y) = AGM((x+y)/2,sqrt(x*y)) is the arithmetic-geometric mean. - Paul D. Hanna, Aug 31 2014
a(n) ~ 5^(n+1)/(4*Pi*n). - Vaclav Kotesovec, Oct 03 2016

Extensions

a(0)=1 prepended by Seiichi Manyama, Dec 02 2016

A202856 Moments of the quadratic coefficient of the characteristic polynomial of a random matrix in SU(2) X SU(2) (inside USp(4)).

Original entry on oeis.org

1, 2, 5, 14, 44, 152, 569, 2270, 9524, 41576, 187348, 866296, 4092400, 19684576, 96156649, 476038222, 2384463044, 12067926920, 61641751124, 317469893176, 1647261806128, 8605033903456, 45228349510660, 239061269168056, 1270130468349904, 6780349241182112, 36355025167014224, 195725149445320160, 1057729059593103808
Offset: 0

Views

Author

N. J. A. Sloane, Dec 25 2011

Keywords

Crossrefs

Programs

  • Maple
    b:=n->coeff((x^2+1)^n, x, n); # A126869
    c:=n->b(n)/((n/2)+1); # A126120
    ch:=n->add(binomial(n, k)*2^(n-k)*c(k)^2, k=0..n); # A202856
    [seq(ch(n), n=0..30)];
  • Mathematica
    b[n_] := Coefficient[(x^2+1)^n, x, n]; (* A126869 *)
    c[n_] := b[n]/(n/2+1); (* A126120 *)
    ch[n_] := Sum[Binomial[n, k] 2^(n-k) c[k]^2, {k, 0, n}]; (* A202856 *)
    Table[ch[n], {n, 0, 30}] (* Jean-François Alcover, Aug 10 2018, translated from Maple *)

Formula

a(n) = Sum_{k=0..n} binomial(n, k)*2^(n-k)*c(k)^2, where c() = A126120().
Conjecture: (n+2)^2*a(n) +2*(-3*n^2-5*n-1)*a(n-1) -4*(n-1)*(n-5)*a(n-2) +24*(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Dec 04 2013 [ Maple's sumrecursion command applied to the above formula for a(n) produces this recurrence. - Peter Bala, Jul 06 2015 ]
a(n) ~ 2^(n-1) * 3^(n+3) / (Pi * n^3). - Vaclav Kotesovec, Jul 20 2019

A302181 Number of 3D walks of type abb.

Original entry on oeis.org

1, 5, 62, 1065, 21714, 492366, 12004740, 308559537, 8255788970, 227976044010, 6457854821340, 186814834574550, 5500292590186380, 164387681345290500, 4976887208815547640, 152378485941172462785, 4711642301137121933850, 146964278352052950118770, 4619875954522866283392300
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Maple
    C := n-> binomial(2*n, n)/(n+1): # Catalan numbers
    A302181 := n-> add(binomial(2*n, k)*C(iquo(k+1, 2))*C(iquo(k, 2))*(2*iquo(k, 2)+1)*add((-1)^(k+j)*binomial(2*n-k, iquo(j,2)), j=0..2*n-k), k=0..2*n): seq(A302181(n), n = 0 .. 18); # Mélika Tebni, Nov 06 2024

Formula

a(n) = Sum_{k=0..2*n} binomial(2*n, k) * A005558(k) * A126869(2*n-k). - Mélika Tebni, Nov 06 2024

Extensions

a(8)-a(18) from Nachum Dershowitz, Aug 03 2020

A302180 Number of 3D walks of type aad.

Original entry on oeis.org

1, 1, 3, 7, 23, 71, 251, 883, 3305, 12505, 48895, 193755, 783355, 3205931, 13302329, 55764413, 236174933, 1008773269, 4343533967, 18834033443, 82201462251, 360883031291, 1592993944723, 7066748314147, 31493800133173, 140953938878821, 633354801073571, 2856369029213263
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.
Number of 3D walks of length n in the first octant using steps (1, 1, 0), (1, -1, 0), (1, 0, 1), (1, 0, -1) and (1, 0, 0) that start at the origin and end at (n, 0, 0). The analogous problem in 2D is given by the Motzkin numbers A001006. - Farzan Byramji, Mar 06 2021
Inverse binomial transform of A145867 (Number of 3D walks of type aae). - Mélika Tebni, Nov 05 2024

Crossrefs

Programs

  • Maple
    M := n-> add(binomial(n, 2*k)*binomial(2*k, k)/(k+1), k = 0 .. iquo(n,2)): # Motzkin numbers
    A302180 := n-> add((-1)^(n-k)*binomial(n, k)*add(binomial(k, j)*M(j)*M(k-j), j=0..k), k=0..n):  seq(A302180(n), n = 0 .. 26); # Mélika Tebni, Nov 05 2024

Extensions

a(14)-a(26) from Farzan Byramji, Mar 06 2021

A302182 Number of 3D walks of type abc.

Original entry on oeis.org

1, 1, 5, 12, 62, 200, 1065, 3990, 21714, 89082, 492366, 2147376, 12004740, 54718092, 308559537, 1454116950, 8255788970, 39935276810, 227976044010, 1126178350440, 6457854821340, 32456552441040, 186814834574550, 952569927106980, 5500292590186380, 28391993275117500
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Python
    from math import comb as binomial
    def row(n: int) -> list[int]:
        return sum(binomial(n, k)*binomial(k, k//2)//(k//2+1)*((k+1) %2)*binomial(n-k, (n-k)//2)**2 for k in range(n+1))
    for n in range(26): print(row(n)) # Mélika Tebni, Nov 27 2024

Formula

From Mélika Tebni, Nov 27 2024: (Start)
a(n) = Sum_{k=0..n} binomial(n, k)*A126120(k)*A018224(n-k).
a(2*n+1) = A135394(n) / (2*n+2).
a(2*n) = A302181(n). (End)

Extensions

a(13)-a(25) from Mélika Tebni, Nov 27 2024

A302184 Number of 3D walks of type abe.

Original entry on oeis.org

1, 2, 7, 26, 108, 472, 2159, 10194, 49396, 244328, 1229308, 6273896, 32410096, 169181664, 891181607, 4731912082, 25302648644, 136150941064, 736747902236, 4007011320808, 21893702201648, 120125750018656, 661630546993116, 3656966382542984, 20278320788680912, 112782556853239712
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Maple
    a := n -> 2*add(binomial(n, k)*binomial(k, k/2)*binomial(2*(n-k), n-k)/(k+2), k = 0..n, 2): seq(a(n), n = 0..25);  # Peter Luschny, Nov 30 2024
  • Python
    from math import comb as binomial
    def a(n: int):
        return sum(binomial(n, k)*binomial(k, k//2)//(k//2+1)*((k+1) %2)*binomial(2*(n-k), n-k) for k in range(n+1))
    print([a(n) for n in range(26)]) # Mélika Tebni, Nov 30 2024

Formula

a(n) = Sum_{k=0..n} binomial(n, k)*A126120(k)*A000984(n-k). - Mélika Tebni, Nov 30 2024

Extensions

a(12)-a(25) from Mélika Tebni, Nov 30 2024

A302178 The number of 3D walks of semilength n in a quadrant returning to the origin.

Original entry on oeis.org

1, 4, 40, 570, 9898, 195216, 4209084, 96941130, 2349133930, 59272544760, 1545550116240, 41416083787260, 1135679731004700, 31760915181412800, 903492759037272480, 26086451983000501410, 763124703525758894490, 22585374873810849150600, 675419388009799152812400
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Crossrefs

Formula

a(n) = Sum_{i=0..n,j=0..n-i} A000108(i) * A000108(j) * A000984_(n-i-j) * (2n)!/((2i)!*(2j)!*(2n-2i-2j)!). - Nachum Dershowitz, Aug 13 2020

Extensions

a(8)-a(18) from Nachum Dershowitz, Aug 03 2020
Name edited by Nachum Dershowitz, Aug 13 2020

A302179 The number of 3D walks of length n in an octant returning to axis of origin.

Original entry on oeis.org

1, 1, 4, 9, 40, 120, 570, 1995, 9898, 38178, 195216, 805266, 4209084, 18239364, 96941130, 436235085, 2349133930, 10891439130, 59272544760, 281544587610, 1545550116240, 7489973640240, 41416083787260, 204122127237210, 1135679731004700, 5678398655023500, 31760915181412800, 160789633105902300
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Crossrefs

Programs

  • PARI
    C(n) = binomial(2*n, n)/(n+1); \\ A000108
    f(n) = binomial(n, floor(n/2)); \\ A001405
    a(n) = sum(i=0, n, if (!(i%2), sum(j=0, n-i, if (!(j%2), C(i/2)*C(j/2)*f(n-i-j)*n!/(i! * j! * (n-i-j)!))))); \\ Michel Marcus, Aug 07 2020

Formula

a(n) = Sum_{i=0..n, j=0..n-i, i,j even} A126120(i) * A126120(j) * A001405(n-i-j) * n!/(i! * j! * (n-i-j)!). - Nachum Dershowitz, Aug 06 2020
E.g.f.: (BesselI(1, 2*x)/x)^2*(BesselI(0, 2*x) + BesselI(1, 2*x)). - Mélika Tebni, Jan 06 2025

Extensions

a(13)-a(27) from Nachum Dershowitz, Aug 04 2020

A302183 Number of 3D n-step walks of type abd.

Original entry on oeis.org

1, 1, 4, 10, 39, 131, 521, 1989, 8149, 33205, 139870, 592120, 2552155, 11079303, 48639722, 214997228, 957817013, 4292316197, 19349957108, 87663905954, 399038606291, 1823961268751, 8369603968599, 38540835938335, 178056111047329, 825079806039121, 3833960405339446
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Python
    from math import comb as binomial
    def M(n): return sum(binomial(n, 2*k)*binomial(2*k, k)//(k+1) for k in range(n//2+1)) # Motzkin numbers
    def a(n):
        return sum(binomial(n, k)*binomial(k, k//2)*((k+1) %2)*M(n-k) for k in range(n+1))
    print([a(n) for n in range(27)]) # Mélika Tebni, Dec 03 2024

Formula

From Mélika Tebni, Dec 03 2024: (Start)
a(n) = Sum_{k=0..n} binomial(n, k)*A126869(k)*A001006(n-k).
Inverse binomial transform of A302184. (End)

Extensions

a(13)-a(26) from Mélika Tebni, Dec 03 2024

A302185 Number of 3D n-step walks of type acc.

Original entry on oeis.org

1, 2, 7, 24, 98, 400, 1785, 7980, 37674, 178164, 874146, 4294752, 21667932, 109436184, 563910633, 2908233900, 15235550330, 79870553620, 424021948350, 2252356700880, 12088746573540, 64913104882080, 351594254659830, 1905139854213960, 10399223643879420, 56783986550235000
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2018

Keywords

Comments

See Dershowitz (2017) for precise definition.

Crossrefs

Programs

  • Maple
    b:= n-> binomial(n, floor(n/2))*binomial(n+1, floor((n+1)/2)):
    C:= n-> binomial(2*n, n)/(n+1):
    a:= n-> add(binomial(n, 2*k)*C(k)*b(n-2*k), k=0..n/2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Dec 06 2024
    # second Maple program:
    a:= proc(n) option remember; `if`(n<4, [1, 2, 7, 24][n+1],
          (8*(14*n^4+85*n^3+190*n^2+188*n+63)*a(n-1)+4*(n-1)*
          (80*n^4+418*n^3+676*n^2+269*n-108)*a(n-2)-96*(n-1)*(n-2)*
          (10*n^2+31*n+27)*a(n-3)-144*(n-1)*(n-2)*(n-3)*(8*n^2+33*n+36)*
           a(n-4))/((n+4)*(n+3)*(n+2)*(8*n^2+17*n+11)))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Dec 06 2024
  • Mathematica
    b[n_] := Binomial[n, Floor[n/2]]*Binomial[n+1, Floor[(n+1)/2]];
    c[n_] := Binomial[2*n, n]/(n+1);
    a[n_] := Sum[Binomial[n, 2*k]*c[k]*b[n - 2*k], {k, 0, n/2}];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 28 2025, after Alois P. Heinz *)
  • Python
    from math import comb as binomial
    def C(n): return (binomial(2*n, n)//(n+1)) # Catalan numbers
    def a(n):
        return sum(binomial(n, k)*C((k+1)//2)*C(k//2)*(2*(k//2)+1)*binomial(n-k, (n-k)//2) for k in range(n+1))
    print([a(n) for n in range(26)]) # Mélika Tebni, Dec 06 2024

Formula

From Mélika Tebni, Dec 06 2024: (Start)
E.g.f.: (BesselI(0, 2*x) + BesselI(1, 2*x))^2*BesselI(1, 2*x) / x.
a(n) = Sum_{k=0..n} binomial(n, k)*A005558(k)*A001405(n-k).
a(2*n+1) = 2*A302182(2*n+1) = A135394(n) / (n+1).
For n > 0, a(A000918(n)) is odd. (End)

Extensions

a(13)-a(25) from Mélika Tebni, Dec 06 2024
Showing 1-10 of 13 results. Next