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.

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

This page as a plain text file.
%I A378060 #29 Dec 09 2024 05:47:22
%S A378060 0,1,1,9,16,100,225,1225,3136,15876,44100,213444,627264,2944656,
%T A378060 9018009,41409225,130873600,590976100,1914762564,8533694884,
%U A378060 28210561600,124408576656,418151049316,1828114918084,6230734868736,27043120090000,93271169290000,402335398890000
%N A378060 a(n) = binomial(n, floor((n-1)/2))^2.
%C A378060 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.
%F A378060 a(n) = n!*[x^n] (BesselI(0, 2*x)^2 + BesselI(1, 2*x)*BesselI(0, 2*x)*(1 - 1/x)).
%F A378060 a(n) = [x^n] (((8*x^2 + 2*x)*EllipticK(4*x) - Pi*(1 + x) + 2*EllipticE(4*x))/(4*x^2*Pi)).
%F A378060 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)).
%F A378060 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.
%F A378060 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).
%F A378060 a(n) = Sum_{k=1..n} A378061(n, k).
%e A378060 The 16 walks of length 4: NNNN, NNNS, NNSN, NNEW, NNWE, NSNN, NENW, NEWN, NWNE, NWEN, ENNW, ENWN, EWNN, WNNE, WNEN, WENN.
%p A378060 a := n -> binomial(n, iquo(n+1, 2) - 1)^2: seq(a(n), n = 0..27);
%p A378060 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:
%p A378060 # Alternative:
%p A378060 egf := BesselI(0, 2*x)^2 + BesselI(1, 2*x)*BesselI(0, 2*x)*(1 - 1/x):
%p A378060 ser := series(egf, x, 29): seq(n!*coeff(ser, x, n), n = 0..27);
%t A378060 Array[Binomial[#, Floor[(# + 1)/2] - 1]^2 &, 28, 0] (* _Michael De Vlieger_, Dec 04 2024 *)
%o A378060 (Julia)
%o A378060 # Generates the walks (for illustration only).
%o A378060 function aCount(n::Int)
%o A378060     a = [""]
%o A378060     c = 0
%o A378060     for w in a
%o A378060         if length(w) == n
%o A378060             if (count('N', w) != count('S', w) && count('W', w) == count('E', w))
%o A378060                 c += 1
%o A378060                 # println(w)
%o A378060             end
%o A378060         else
%o A378060             for j in "NSEW"
%o A378060                 u = string(w, j)
%o A378060                 if count('N', u) >= count('S', u)
%o A378060                    push!(a, u)
%o A378060     end end end end
%o A378060     return c
%o A378060 end
%o A378060 println([aCount(n) for n in 0:11])
%Y A378060 Cf. A060150 (odd bisection), A337900 (even bisection), A037952, A378061.
%K A378060 nonn,easy,walk
%O A378060 0,4
%A A378060 _Peter Luschny_, Dec 03 2024