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.

Previous Showing 11-20 of 21 results. Next

A254686 Number of ways to put n red and n blue balls into n indistinguishable boxes.

Original entry on oeis.org

1, 1, 5, 19, 74, 248, 814, 2457, 7168, 19928, 53688, 139820, 354987, 878434, 2128102, 5052010, 11781881, 27019758, 61035671, 135928105, 298784144, 648726349, 1392474574, 2956730910, 6214668074, 12937060340, 26686392239, 54572423946, 110680119454, 222710856175, 444776676764
Offset: 0

Views

Author

Brian Chen, Feb 08 2015

Keywords

Comments

See a comment on A254811 about multiset partitions and the Knuth reference. - Wolfdieter Lang, Mar 26 2015

Examples

			For n = 2 the a(2) = 5 ways to put 2 red balls and 2 blue balls into 2 indistinguishable boxes are (RRBB)(), (RRB)(B), (RBB)(R), (RR)(BB), (RB)(RB).
		

Crossrefs

Column k=2 of A256384.
Main diagonal of A277239.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, k, i) option remember;
          `if`(n>k, 0, 1) +`if`(isprime(n) or i<2, 0, add(
          `if`(d>k, 0, b(n/d, d, i-1)), d=divisors(n) minus {1, n}))
        end:
    a:= n-> b(6^n$2,n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 26 2015
  • Mathematica
    b[n_, k_, i_] := b[n, k, i] = If[n > k, 0, 1] + If[PrimeQ[n] || i < 2, 0, Sum[If[d > k, 0, b[n/d, d, i - 1]], {d, Divisors[n] [[2 ;; -2]]}]]; a[n_] := b[6^n, 6^n, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

A337902 The number of walks of length 2n+1 on the square lattice that start from the origin (0,0) and end at the vertex (2,1).

Original entry on oeis.org

3, 50, 735, 10584, 152460, 2208492, 32207175, 472780880, 6982113996, 103673813880, 1546866469148, 23179817220000, 348690679038000, 5263441096145400, 79698007774092375, 1210159553338375200, 18422202264818467500, 281089726445607849000
Offset: 1

Views

Author

R. J. Mathar, Sep 29 2020

Keywords

Examples

			a(1)=3 represents 3 walks of length 3: RRU, URR and RUR.
		

Crossrefs

Cf. A002894 (at (0,0)), A060150 (at (1,0)), A135389 (at (1,1)), A337900 (at (2,0)), A337901 (at (3,0))

Formula

a(n) = binomial(2*n+1,n-1)*binomial(2*n+1,n) = A002054(n)*A001700(n).
G.f.: 3*x*3F2(2,5/2,5/2; 3,4; 16*x).
D-finite with recurrence (n-1)*(n+2)*(n+1)*a(n) -4*n*(2*n+1)^2*a(n-1)=0.
A135389(n) = 2*A060150(n+1) +2*a(n).

A337869 The number of random walks on the simple square lattice that return to the origin (0,0) after 2n steps and do not pass through (0,0) or (1,0) at intermediate steps.

Original entry on oeis.org

3, 13, 106, 1073, 12142, 147090, 1865772, 24463905, 328887346, 4508608610, 62781858592, 885513974674, 12624162072740, 181611275997040, 2633023723495116, 38431604042148681, 564258290166041298, 8327627696761062714, 123471550301117915892
Offset: 1

Views

Author

R. J. Mathar, Sep 27 2020

Keywords

Comments

The number of walks on the simple square lattice that take one of the four directions U, D, R, L at each step and return to zero is zero if the number of steps is odd. If the number of steps is even, the sequence counts walks that start at (0,0), return to (0,0) and never pass through (0,0) or (1,0) in between.
The ordinary generating function is a mix of inverses of sums and differences of the hypergeometric generating functions in A002894 and A060150. See Maple.

Examples

			Example: a(1)=3 counts the walks UD, DU, LR (but not RL which would pass (1,0)) of 2 steps that return to the origin.
		

Crossrefs

Programs

  • Maple
    g002894 := hypergeom([1/2,1/2],[1],16*x^2) ;
    g060150 := x*hypergeom([1,3/2,3/2],[2,2],16*x^2) ;
    1-1/2/(g002894+g060150)-1/2/(g002894-g060150) ;
    taylor(%,x=0,40);
    gfun[seriestolist](%) ; # includes zeros of odd steps

A337901 The number of walks of length 2n+1 on the square lattice that start from the origin (0,0) and end at the vertex (3,0).

Original entry on oeis.org

1, 25, 441, 7056, 108900, 1656369, 25050025, 378224704, 5712638724, 86394844900, 1308887012356, 19868414760000, 302198588499600, 4605510959127225, 70321771565375625, 1075697380745222400, 16483023079048102500, 252980753801047064100, 3888662839165553120100
Offset: 1

Views

Author

R. J. Mathar, Sep 29 2020

Keywords

Crossrefs

Cf. A002894 (end at (0,0)), A060150 (end at (1,0)), A135389 (end at (1,1)), A337900 (at (2,0)), A337902 (at(2,1))

Formula

a(n) = [A002054(n)]^2.
G.f.: x*4F3(2,2,5/2,5/2; 1,4,4; 16*x).
D-finite with recurrence (n+2)^2*(n-1)^2*a(n) -4*n^2*(2*n+1)^2*a(n-1)=0.

A380241 Array read by antidiagonals: T(n,k) is the number of rooted (2k)-regular planar maps with n vertices, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 9, 1, 1, 1, 14, 100, 54, 1, 1, 1, 42, 1225, 3000, 378, 1, 1, 1, 132, 15876, 171500, 110000, 2916, 1, 1, 1, 429, 213444, 10001880, 30012500, 4550000, 24057, 1, 1, 1, 1430, 2944656, 591666768, 7981500240, 5987493750, 204000000, 208494, 1, 1
Offset: 0

Views

Author

Andrew Howroyd, Jan 22 2025

Keywords

Comments

The zeroth column is included by convention only for consistency with the first row sequences.
The case for regular planar maps of odd valency is more complicated and without simple closed form formulas, so not presented in this sequence. See the references for additional information.

Examples

			Array begins:
====================================================================
n\k | 0  1      2          3               4                   5 ...
----+---------------------------------------------------------------
  0 | 1  1      1          1               1                   1 ...
  1 | 1  1      2          5              14                  42 ...
  2 | 1  1      9        100            1225               15876 ...
  3 | 1  1     54       3000          171500            10001880 ...
  4 | 1  1    378     110000        30012500          7981500240 ...
  5 | 1  1   2916    4550000      5987493750       7304332956480 ...
  6 | 1  1  24057  204000000   1302227368750    7310748066293952 ...
  7 | 1  1 208494 9690000000 301107909375000 7794097754539041792 ...
  ...
		

Crossrefs

Columns 0..3 are A000012 twice, A000168, A380242.
Rows 0..3 are A000012, A000108, A060150, A380243.
Cf. A269920.

Programs

  • PARI
    T(n,k)=if(k==0, 1, 2*binomial(2*k-1,k)^n*(n*k)!/(n!*(n*k - n + 2)!))

Formula

T(n,k) = 2*binomial(2*k-1, k)^n*(n*k)!/(n!*(n*k - n + 2)!) for k > 0.

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).

A378070 a(n) = binomial(n - 1, ceiling(n/2)) * binomial(n - 1, ceiling(n/2) - 1).

Original entry on oeis.org

1, 0, 1, 2, 9, 24, 100, 300, 1225, 3920, 15876, 52920, 213444, 731808, 2944656, 10306296, 41409225, 147232800, 590976100, 2127513960, 8533694884, 31031617760, 124408576656, 456164781072, 1828114918084, 6749962774464, 27043120090000, 100445874620000, 402335398890000
Offset: 0

Views

Author

Peter Luschny, Dec 13 2024

Keywords

Crossrefs

Cf. A007318, A060150 (even bisection), A135389 (odd bisection), A378060.

Programs

  • Maple
    a :=  n -> binomial(n-1, floor((n+1)/2))*binomial(n-1, floor((n+1)/2)-1);
    seq(a(n), n = 0..27);
  • Mathematica
    A378070[n_] := Binomial[n - 1, #]*Binomial[n - 1, # - 1] & [Ceiling[n/2]];
    Array[A378070, 30, 0] (* Paolo Xausa, Dec 14 2024 *)

Formula

a(n) = binomial(n - 1, floor(n/2) - 1) * binomial(n - 1, ceiling(n/2) - 1).

A116421 a(n) = 2^(n-1)*binomial(2n-1,n-1)^2.

Original entry on oeis.org

0, 1, 18, 400, 9800, 254016, 6830208, 188457984, 5300380800, 151289881600, 4369251780608, 127394382495744, 3743979352236032, 110768619888640000, 3295931587706880000, 98555678764852838400, 2959750227906986803200
Offset: 0

Views

Author

Paul Barry, Feb 14 2006

Keywords

Crossrefs

Cf. A060150.

Programs

Formula

G.f.: 1+(K(32x)-1)/4 where K(k)=Elliptic_F(pi/2,k) is the complete Elliptic integral of the first kind;
e.g.f.: BesselI(0, 2*sqrt(2)x)*BesselI(1, 2*sqrt(2)x)/sqrt(2);
a(n) = 2^(n+1)*(binomial(2n,n)/4)^2 - 0^n/8.
Conjecture: n^2*a(n) - (2*n-1)^2*a(n-1) = 0. - R. J. Mathar, Nov 16 2011

A277584 a(n) = binomial(3n-1, n-1)^2.

Original entry on oeis.org

0, 1, 25, 784, 27225, 1002001, 38291344, 1502337600, 60101954649, 2440703175625, 100300325150025, 4161829109817600, 174077451630810000, 7330421677037621904, 310467090932230849600, 13214837914326197526784, 564927069263895118093401
Offset: 0

Views

Author

Seiichi Manyama, Oct 22 2016

Keywords

Crossrefs

Programs

  • Magma
    [Binomial(3*n-1, n-1)^2: n in [0..20]]; // Vincenzo Librandi, Oct 23 2016
  • Mathematica
    Table[Boole[n > 0] Binomial[3 n - 1, n - 1]^2, {n, 0, 16}] (* Michael De Vlieger, Oct 26 2016 *)
  • PARI
    a(n) = binomial(3*n-1, n-1)^2; \\ Michel Marcus, Oct 22 2016
    

Formula

a(n) = A025174(n)^2.
a(n) = A188662(n)/9 for n > 0.
Let the number of multisets of length k on n symbols be denoted by ((n, k)) = binomial(n+k-1, k).
a(n) = (Sum_{k=0..n} binomial(n, k)^2 * ((2*n, 2*n - k)))/5 for n > 0.

A337870 The number of random walks on the simple square lattice that start at the origin (0,0) and pass through (1,0) after 2n+1 steps before having returned to the origin.

Original entry on oeis.org

1, 2, 16, 166, 1934, 24076, 312906, 4191822, 57433950, 800740450, 11319707546, 161841539812, 2335765140994, 33979681977530, 497696233487200, 7332776490675630, 108595186409772174, 1615573668169487898, 24132221328987714066
Offset: 0

Views

Author

R. J. Mathar, Sep 27 2020

Keywords

Comments

The number of walks that take one of the four directions U, D, R, L which arrive at (1,0) is zero if the number of steps is even. For odd number of steps we count the walks that start at (0,0) pass through any set of points that are not {(0,0),(1,0)} and arrive at (1,0).
The ordinary generating function is a mix of inverses of sums and differences of the hypergeometric generating functions in A002894 and A060150. See Maple.

Crossrefs

Programs

  • Maple
    g002894 := hypergeom([1/2,1/2],[1],16*x^2) ;
    g060150 := x*hypergeom([1,3/2,3/2],[2,2],16*x^2) ;
    1/2/(g002894-g060150)-1/2/(g002894+g060150) ;
    taylor(%,x=0,40);
    L := gfun[seriestolist](%) ; # includes zeros of even steps
Previous Showing 11-20 of 21 results. Next