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

A018224 a(n) = binomial(n, floor(n/2))^2 = A001405(n)^2.

Original entry on oeis.org

1, 1, 4, 9, 36, 100, 400, 1225, 4900, 15876, 63504, 213444, 853776, 2944656, 11778624, 41409225, 165636900, 590976100, 2363904400, 8533694884, 34134779536, 124408576656, 497634306624, 1828114918084, 7312459672336, 27043120090000, 108172480360000, 402335398890000
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the number of rooted two-vertex (or, dually, two-face) regular planar maps of valency n+1. - Valery A. Liskovets, Oct 19 2005
If A is a random matrix in USp(4) (4 X 4 complex matrices that are unitary and symplectic), then a(n)=(-1)^n*E[(tr(A^4))^n]. - Andrew V. Sutherland, Apr 01 2008
Number of square lattice walks with unit steps in all four directions (NSWE), starting at the origin, ending on the y-axis, and never going below the x-axis. Row sums of A378061. - Peter Luschny, Dec 08 2024

Examples

			The 9 lattice walks defined in the comments: 'NNN', 'NNS', 'NSN', 'NWE', 'NEW', 'WNE', 'WEN', 'ENW', 'EWN'.
		

Crossrefs

Programs

  • Maple
    s := x -> (1+x)*EllipticK(x)/(x*Pi/2)-1/x:
    seq(4^n*coeff(series(s(x),x,n+2),x,n),n=0..23); # Peter Luschny, Oct 14 2015
  • Mathematica
    (* Note that Mathematica uses a different definition of the EllipticK function. *)
    CoefficientList[Series[(-Pi + (2 + 8 x) EllipticK[16 x^2])/(4 Pi x), {x,0,23}], x] (* Peter Luschny, Oct 14 2015 *)
    Table[Binomial[n,Floor[n/2]]^2,{n,0,30}] (* Harvey P. Dale, Dec 02 2022 *)
  • PARI
    vector(50, n, n--; binomial(n, n\2)^2) \\ Altug Alkan, Oct 14 2015

Formula

E.g.f.: BesselI(0, 2*x)*(BesselI(0, 2*x)+BesselI(1, 2*x)). - Vladeta Jovovic, Jun 12 2005
G.f. (1+1/(4*x))*hypergeom([1/2, 1/2],[1],16*x^2)-1/(4*x). - Mark van Hoeij, Oct 13 2009
a(n) = (n!/(floor(n/2)!*floor((n+1)/2)!))^2. - Peter Luschny, Apr 29 2014
a(n) = A056040(n) * A056040(n+1) / (n+1). - Peter Luschny, Apr 29 2014
a(n) = 4^n*[x^n]((1+x)*EllipticK(x)/(x*Pi/2)-1/x). - Peter Luschny, Oct 14 2015
a(n) ~ 4^n*((2*n+3)/(2*n+1))^((-1)^n/2)/((n+1)*Pi/2). - Peter Luschny, Oct 14 2015
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*C(k)*binomial(2*n-2*k,n-k) where C(k) are Catalan numbers (A000108), see Prodinger. - Michel Marcus, Nov 19 2019
From Peter Bala, Jul 03 2023: (Start)
Right hand side of the binomial sum identity (1/2)*Sum_{k = 0..n+1} (-1)^k*4^(n+1-k)*binomial(n+1,k)*binomial(n+k,k)*binomial(2*k,k) = a(n).
a(n) = (1/2)*4^(n+1) * hypergeom([n+1, -n-1, 1/2], [1, 1], 1).
P-recursive:
(2*n - 1)*(n + 1)^2*a(n) = 4*(2*n^2 - 1)*a(n-1) + 16*(2*n + 1)*(n - 1)^2*a(n-2) with a(0) = a(1) = 1. (End)

A378060 a(n) = binomial(n, floor((n-1)/2))^2.

Original entry on oeis.org

0, 1, 1, 9, 16, 100, 225, 1225, 3136, 15876, 44100, 213444, 627264, 2944656, 9018009, 41409225, 130873600, 590976100, 1914762564, 8533694884, 28210561600, 124408576656, 418151049316, 1828114918084, 6230734868736, 27043120090000, 93271169290000, 402335398890000
Offset: 0

Views

Author

Peter Luschny, Dec 03 2024

Keywords

Comments

Number of walks of length n with unit steps in all four directions (NSWE), starting at the origin and ending on the y-axis, never going below the x-axis and the end point having a positive height.

Examples

			The 16 walks of length 4: NNNN, NNNS, NNSN, NNEW, NNWE, NSNN, NENW, NEWN, NWNE, NWEN, ENNW, ENWN, EWNN, WNNE, WNEN, WENN.
		

Crossrefs

Cf. A060150 (odd bisection), A337900 (even bisection), A037952, A378061.

Programs

  • Julia
    # Generates the walks (for illustration only).
    function aCount(n::Int)
        a = [""]
        c = 0
        for w in a
            if length(w) == n
                if (count('N', w) != count('S', w) && count('W', w) == count('E', w))
                    c += 1
                    # println(w)
                end
            else
                for j in "NSEW"
                    u = string(w, j)
                    if count('N', u) >= count('S', u)
                       push!(a, u)
        end end end end
        return c
    end
    println([aCount(n) for n in 0:11])
  • Maple
    a := n -> binomial(n, iquo(n+1, 2) - 1)^2: seq(a(n), n = 0..27);
    a := proc(n) option remember; if n < 2 then n else ((32*n^5 - 48*n^4 + 16*n^2)*a(n - 2) + (8*n^4 - 20*n^2)*a(n - 1))/(2*(n - 1)^2*(n - 1/2)*(n + 2)^2) fi end:
    # Alternative:
    egf := BesselI(0, 2*x)^2 + BesselI(1, 2*x)*BesselI(0, 2*x)*(1 - 1/x):
    ser := series(egf, x, 29): seq(n!*coeff(ser, x, n), n = 0..27);
  • Mathematica
    Array[Binomial[#, Floor[(# + 1)/2] - 1]^2 &, 28, 0] (* Michael De Vlieger, Dec 04 2024 *)

Formula

a(n) = n!*[x^n] (BesselI(0, 2*x)^2 + BesselI(1, 2*x)*BesselI(0, 2*x)*(1 - 1/x)).
a(n) = [x^n] (((8*x^2 + 2*x)*EllipticK(4*x) - Pi*(1 + x) + 2*EllipticE(4*x))/(4*x^2*Pi)).
a(n) = [x^n] (x*hypergeom([1,3/2,3/2], [2,2], 16*x^2) + x^2*hypergeom([3/2,3/2,2,2], [1,3,3], 16*x^2)).
a(n) = Sum_{k=0..n} (-1)^(n-k+N)*C(n-k, N)*C(n, k)*C(n+k, k), where N = floor((n-1)/2) and C = binomial.
Recurrence: a(n) = ((32*n^5 - 48*n^4 + 16*n^2)*a(n - 2) + (8*n^4 - 20*n^2)*a(n - 1))/(2*(n - 1)^2*(n - 1/2)*(n + 2)^2).
a(n) = Sum_{k=1..n} A378061(n, k).

A378062 Array read by ascending antidiagonals: A(n, k) = (n + 1)*binomial(2*k + n - 1, k - 1)^2 / (2*k + n - 1) for k > 0, and A(n, 0) = 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 8, 20, 0, 1, 15, 75, 175, 0, 1, 24, 189, 784, 1764, 0, 1, 35, 392, 2352, 8820, 19404, 0, 1, 48, 720, 5760, 29700, 104544, 226512, 0, 1, 63, 1215, 12375, 81675, 382239, 1288287, 2760615, 0, 1, 80, 1925, 24200, 196625, 1145144, 5010005, 16359200, 34763300
Offset: 0

Views

Author

Peter Luschny, Dec 07 2024

Keywords

Examples

			Array A(n, k) starts:
  [0] 0, 1,  3,   20,   175,    1764,    19404, ... A000891
  [1] 0, 1,  8,   75,   784,    8820,   104544, ... A145600
  [2] 0, 1, 15,  189,  2352,   29700,   382239, ... A145601
  [3] 0, 1, 24,  392,  5760,   81675,  1145144, ... A145602
  [4] 0, 1, 35,  720, 12375,  196625,  3006003, ... A145603
  [5] 0, 1, 48, 1215, 24200,  429429,  7154784, ...
  [6] 0, 1, 63, 1925, 44044,  869505, 15767024, ...
  [7] 0, 1, 80, 2904, 75712, 1656200, 32626944, ...
.
Seen as a triangle, T(n, k) = A(n-k, k). Compare the descending antidiagonals of A378061.
  [0] 0;
  [1] 0, 1;
  [2] 0, 1,  3;
  [3] 0, 1,  8,  20;
  [4] 0, 1, 15,  75,  175;
  [5] 0, 1, 24, 189,  784,  1764;
  [6] 0, 1, 35, 392, 2352,  8820,  19404;
  [7] 0, 1, 48, 720, 5760, 29700, 104544, 226512;
		

Crossrefs

Programs

  • Maple
    A := (n, k) -> ifelse(k = 0, 0, (n + 1)*binomial(2*k + n - 1, k - 1)^2/(2*k + n - 1)):
    for n from 0 to 7 do seq(A(n, k), k = 0..7);
  • Mathematica
    A[n_, k_] := If[k==0, 0, (n + 1)*Binomial[2*k + n - 1, k - 1]^2 / (2*k + n - 1)]; Table[A[n-k,k],{n,0,9},{k,0,n}]//Flatten (* Stefano Spezia, Dec 08 2024 *)
Showing 1-3 of 3 results.