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 28 results. Next

A097070 Consider all compositions (ordered partitions) of n into n parts, allowing zeros. E.g., for n = 3 we get 300, 030, 003, 210, 120, 201, 102, 021, 012, 111. Then a(n) is the total number of 1's.

Original entry on oeis.org

1, 2, 9, 40, 175, 756, 3234, 13728, 57915, 243100, 1016158, 4232592, 17577014, 72804200, 300874500, 1240940160, 5109183315, 21002455980, 86213785350, 353452638000, 1447388552610, 5920836618840, 24197138082780, 98801168731200, 403095046038750, 1643337883690776, 6694900194799404
Offset: 1

Views

Author

Amy J. Kolan, Sep 15 2004

Keywords

Comments

Number of compositions of n into n parts, allowing zeros = binomial(2*n-1,n) = A088218 = essentially A001700.

Examples

			The compositions for n=2 are 20, 02, 11. There are two 1's in these so a(2) = 2.
From _Robert G. Wilson v_, Sep 16 2004: (Start)
The case n = 5:
A. There are 5 combinations associated with the numbers 50000: 50000, 05000, 00500, 00050, 00005.
B. There are 20 combinations associated with the numbers 41000.
C. There are 20 combinations associated with 32000.
D. There are 30 combinations associated with 31100.
E. There are 30 combinations associated with 22100.
F. There are 20 combinations associated with 21110.
G. There is one combinations associated with 11111.
The number of 1's associated with A is 0, with B 20, with C 0, with D 60, with E 30, with F 60 and with G 5. 0 + 20 + 0 + 60 + 30 + 60 + 5 = 175.
(End)
		

Crossrefs

Programs

  • GAP
    List([1..30], n-> n*Binomial(2*n-3, n-1)); # G. C. Greubel, Jul 27 2019
  • Magma
    [n*Binomial(2*n-3, n-1): n in [1..30]]; // Vincenzo Librandi, Jul 13 2019
    
  • Maple
    A097070 := n -> ifelse(n=1, 1, 2^(n-2)*JacobiP(n-1, -1/2, -n+2, 3)):
    seq(simplify(A097070(n)), n = 1..28);  # Peter Luschny, Jan 22 2025
  • Mathematica
    Table[n*Binomial[2n-3, n-1], {n, 30}] (* Robert G. Wilson v, Sep 17 2004 *)
  • PARI
    a(n) = n*binomial(2*n-3, n-1); \\ Joerg Arndt, Feb 17 2015
    
  • Sage
    [n*binomial(2*n-3, n-1) for n in (1..30)] # G. C. Greubel, Jul 27 2019
    

Formula

a(n) = n*binomial(2*n-3, n-1).
More generally, total number of k's (k>=0) in all ordered partitions of n into n parts, allowing zeros, is n*binomial(2*n-k-2, n-2) if n >= k, 0 otherwise.
Total number of 0's is given by A005430.
From Vladeta Jovovic, Sep 17 2004: (Start)
a(n) = Sum_{k=0..n} k*binomial(n, k)*binomial(n-2, k-2).
G.f.: x*(1 -2*x +(1-4*x)^(3/2))/(2*(1-4*x)^(3/2)).
E.g.f.: (x/2)*(exp(2*x)*BesselI(0, 2*x)+1). (End)
a(n) = A014107(n)*A000108(n-2). - Philippe Deléham, Apr 12 2007
a(n) = n*A088218(n-1) for n > 0. - Werner Schulte, Jan 22 2017
From Bruce J. Nicholson, Jul 11 2019: (Start)
a(n) = A002740(n) + A097613(n).
a(n) = A110609(n-1) - A002457(n-2) + A097613(n).
a(n) = A005430(n-1) - A000917(n-3) for n > 1.
a(n) = A002457(n-1) - A037965(n) - A000917(n-3) for n > 1.
a(n) = A037965(n)/2.
a(n) = A001700(n-2)*n.
a(n) = A001791(n-2)*n + A000984(n-2)*n for n > 1. (End)
From Amiram Eldar, May 16 2022: (Start)
Sum_{n>=1} 1/a(n) = 4*Pi/(3*sqrt(3)) - Pi^2/9.
Sum_{n>=1} (-1)^(n+1)/a(n) = 8*log(phi)/sqrt(5) - 4*log(phi)^2, where phi is the golden ratio (A001622). (End)
a(n) = 2^(n-2)*JacobiP(n-1, -1/2, -n+2, 3) for n > 1. - Peter Luschny, Jan 22 2025

Extensions

Formula, more terms and comments from Vladeta Jovovic, Sep 15 2004

A002011 a(n) = 4*(2n+1)!/n!^2.

Original entry on oeis.org

4, 24, 120, 560, 2520, 11088, 48048, 205920, 875160, 3695120, 15519504, 64899744, 270415600, 1123264800, 4653525600, 19234572480, 79342611480, 326704870800, 1343120024400, 5513861152800, 22606830726480, 92580354403680, 378737813469600
Offset: 0

Views

Author

Keywords

References

  • R. C. Mullin, E. Nemeth and P. J. Schellenberg, The enumeration of almost cubic maps, pp. 281-295 in Proceedings of the Louisiana Conference on Combinatorics, Graph Theory and Computer Science. Vol. 1, edited R. C. Mullin et al., 1970.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)=4 A002457(n).
a(n) = 2 * A005430(n+1) = 4 * A002457(n).
Cf. A001803.

Programs

  • Maple
    seq(2*n*binomial(2*n,n), n=1..23); # Zerinvary Lajos, Dec 14 2007
  • Mathematica
    Table[4*(2*n + 1)!/n!^2, {n, 0, 20}] (* T. D. Noe, Aug 30 2012 *)
  • PARI
    a(n)=if(n<0,0,4*(2*n+1)!/n!^2)

Formula

G.f.: 4*(1-4x)^(-3/2).
a(n) = 1/J(n) where J(n) = Integral_{t=0..Pi/4} (cos(t)^2 - 1/2)^(2n+1). - Benoit Cloitre, Oct 17 2006

Extensions

Simpler description from Travis Kowalski (tkowalski(AT)coloradocollege.edu), Mar 20 2003

A061928 Array T(n,m) = 1/beta(n+1,m+1) read by antidiagonals.

Original entry on oeis.org

6, 12, 12, 20, 30, 20, 30, 60, 60, 30, 42, 105, 140, 105, 42, 56, 168, 280, 280, 168, 56, 72, 252, 504, 630, 504, 252, 72, 90, 360, 840, 1260, 1260, 840, 360, 90, 110, 495, 1320, 2310, 2772, 2310, 1320, 495, 110, 132, 660, 1980, 3960, 5544, 5544, 3960
Offset: 1

Views

Author

Frank Ellermann, May 22 2001

Keywords

Comments

beta(n+1,m+1) = Integral_{x=0..1} x^n * (1-x)^m dx for real n, m.

Examples

			Antidiagonals:
   6,
  12, 12,
  20, 30, 20,
  30, 60, 60, 30,
  ...
Array:
   6  12  20   30   42
  12  30  60  105  168
  20  60 140  280  504
  30 105 280  630 1260
  42 168 504 1260 2772
		

References

  • G. Boole, A Treatise On The Calculus of Finite Differences, Dover, 1960, p. 26.

Crossrefs

Rows: 1/b(n, 2): A002378, 1/b(n, 3): A027480, 1/b(n, 4): A033488. Diagonals: 1/b(n, n): A002457, 1/b(n, n+1) A005430, 1/b(n, n+2): A000917.
T(i, j)=A003506(i+1, j+1).

Programs

  • Mathematica
    t[n_, m_] := 1/Beta[n+1, m+1]; Take[ Flatten[ Table[ t[n+1-m, m], {n, 1, 10}, {m, 1, n}]], 52] (* Jean-François Alcover, Oct 11 2011 *)
  • PARI
    A(i,j)=if(i<1||j<1,0,1/subst(intformal(x^i*(1-x)^j),x,1)) /* Michael Somos, Feb 05 2004 */
    
  • PARI
    A(i,j)=if(i<1||j<1,0,1/sum(k=0,i,(-1)^k*binomial(i,k)/(j+1+k))) /* Michael Somos, Feb 05 2004 */
    
  • Python
    from sympy import factorial as f
    def T(n, m): return f(n + m + 1)/(f(n)*f(m))
    for n in range(1, 11): print([T(m, n - m + 1) for m in range(1, n + 1)]) # Indranil Ghosh, Apr 29 2017

Formula

beta(n+1, m+1) = gamma(n+1)*gamma(m+1)/gamma(n+m+2) = n!*m!/(n+m+1)!.

A212303 a(n) = n!/([(n-1)/2]!*[(n+1)/2]!) for n>0, a(0)=0, and where [ ] = floor.

Original entry on oeis.org

0, 1, 2, 3, 12, 10, 60, 35, 280, 126, 1260, 462, 5544, 1716, 24024, 6435, 102960, 24310, 437580, 92378, 1847560, 352716, 7759752, 1352078, 32449872, 5200300, 135207800, 20058300, 561632400, 77558760, 2326762800, 300540195, 9617286240, 1166803110, 39671305740
Offset: 0

Views

Author

Peter Luschny, Oct 24 2013

Keywords

Comments

a(n) + A056040(n) = A189911(n), the row sums of the extended Catalan triangle A189231.

Crossrefs

Programs

  • Maple
    A212303 := proc(n) if n mod 2 = 0 then n*binomial(n, iquo(n,2))/2 else binomial(n+1, iquo(n,2)+1)/2 fi end: seq(A212303(i), i=0..36);
  • Mathematica
    a[n_?EvenQ] := n*Binomial[n, n/2]/2; a[n_?OddQ] := Binomial[n+1, Quotient[n, 2]+1]/2; Table[a[n], {n, 0, 36}]  (* Jean-François Alcover, Feb 05 2014 *)
    nxt[{n_,a_}]:={n+1,If[OddQ[n],a(n+1),(4a(n+1))/(n(n+2))]}; Join[{0}, Transpose[ NestList[ nxt,{1,1},40]][[2]]] (* Harvey P. Dale, Dec 20 2014 *)
  • Sage
    def A212303():
        yield 0
        r, n = 1, 1
        while True:
            yield r
            n += 1
            r *= n if is_even(n) else 4*n/((n-1)*(n+1))
    a = A212303(); [next(a) for i in range(36)]

Formula

E.g.f.: (1+x)*BesselI(1, 2*x).
O.g.f.: -((4*x^2-1)^(3/2)+I-(4*I)*x^2+(4*I)*x^3)/(2*x*(4*x^2-1)^(3/2)).
Recurrence: a(n) = n if n < 2 else a(n) = a(n-1)*n if n is even else a(n-1)*n*4/((n-1)*(n+1)).
a(2*n) = n*C(2*n, n) (A005430); a(2*n+1) = C(2*n+1, n+1) (A001700).
a(n) = n$*floor((n+1)/2)^((-1)^n), where n$ is the swinging factorial A056040.
a(n) = Sum_{k=0..n} A189231(n, 2*k+1).
Sum_{n>=1} 1/a(n) = 2/3 + (7/27)*sqrt(3)*Pi.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2/3 + Pi/(9*sqrt(3)). - Amiram Eldar, Aug 20 2022

A173384 a(n) = 2^(2*n - HammingWeight(n)) * [x^n] ((x-1)^(-1) + (1-x)^(-3/2)).

Original entry on oeis.org

0, 1, 7, 19, 187, 437, 1979, 4387, 76627, 165409, 707825, 1503829, 12706671, 26713417, 111868243, 233431331, 7770342787, 16124087129, 66765132341, 137948422657, 1138049013461, 2343380261227, 9636533415373, 19787656251221
Offset: 0

Views

Author

Paul Curtz, Feb 17 2010

Keywords

Comments

If n >= 1 it appears a(n-1) is equal to the difference between the denominator and the numerator of the ratio (2n-1)!!/(2n-2)!!. In particular a(n-1) is the difference between the denominator and the numerator of the ratio A001147(2n-2)/A000165(2n-1). See examples. - Anthony Hernandez, Feb 05 2020
It can be seen that this is true, e.g., using A001803(n) = (2n+1)!/(n!^2*2^A000120(n)) and A046161(n) = 4^n/2^A000120(n). - M. F. Hasler, Feb 07 2020
Numerators in the expansion of (1-(1-x)^(1/2))/(1-x)^(3/2). Denominators are A046161. Compare to A001790. - Thomas Curtright, Feb 09 2024

Examples

			From _Anthony Hernandez_, Feb 05 2020: (Start)
Consider n = 4. The 4th odd number is 7, and 7!!/(7-1)!! = 35/16, and a(4-1) = a(3) = 35 - 16 = 19.
Consider n = 7. The 7th odd number is 13, and 13!!/(13-1)!! = 3003/1024, and a(7-1) = a(6) = 3003 - 1024 = 1979. (End)
		

Crossrefs

Programs

  • GAP
    List([0..30], n-> (NumeratorRat((2*n+1)*Binomial(2*n, n)/(4^n)) - DenominatorRat(Binomial(2*n, n)/(4^n)))); # G. C. Greubel, Dec 09 2018
  • Magma
    [Numerator((2*n+1)*Binomial(2*n, n)/(4^n)) - Denominator(Binomial(2*n, n)/(4^n)): n in [0..30]]; // G. C. Greubel, Dec 09 2018
    
  • Maple
    A046161 := proc(n) binomial(2*n,n)/4^n ; denom(%) ; end proc:
    A173384 := proc(n) A001803(n)-A046161(n) ; end proc: # R. J. Mathar, Jul 06 2011
  • Mathematica
    Table[Numerator[(2*n+1)*Binomial[2*n, n]/(4^n)] - Denominator[Binomial[2*n, n]/(4^n)], {n,0,30}] (* G. C. Greubel, Dec 09 2018 *)
    A173384[n_] := 2^(2*n - DigitCount[n, 2, 1]) Coefficient[Series[(x - 1)^(-1) + (1 - x)^(-3/2), {x, 0, n}], x, n]
    Table[A173384[n], {n, 0, 23}]  (* Peter Luschny, Feb 17 2024 *)
  • PARI
    for(n=0,30, print1(numerator((2*n+1)*binomial(2*n, n)/(4^n)) - denominator(binomial(2*n, n)/4^n), ", ")) \\ G. C. Greubel, Dec 09 2018
    
  • Sage
    [(numerator((2*n+1)*binomial(2*n, n)/(4^n)) - denominator(binomial(2*n, n)/(4^n))) for n in range(30)] # G. C. Greubel, Dec 09 2018
    

Formula

a(n) = A001803(n) - A046161(n). (Previous name.)
Let r(n) = (-2)^n*Sum_{j=0..n-1} binomial(n,j)*Bernoulli(j+n+1, 1/2)/(j+n+1) then a(n) = numerator(r(n)). - Peter Luschny, Jun 20 2017

Extensions

New name using an expansion of Thomas Curtright by Peter Luschny, Feb 17 2024

A241519 Denominators of b(n) = b(n-1)/2 + 1/(2*n), b(0)=0.

Original entry on oeis.org

1, 2, 2, 12, 3, 15, 60, 840, 105, 630, 630, 13860, 6930, 180180, 360360, 144144, 9009, 306306, 306306, 11639628, 14549535, 14549535, 58198140, 2677114440, 334639305, 3346393050
Offset: 0

Views

Author

Paul Curtz, Apr 24 2014

Keywords

Comments

Generally, 2*b(n) = b(n-1) + f(n). See, for f(n)=n, A000337(n)/2^n.
a(0)=1. b(n) is mentioned in A241269.
Difference table of b(n):
0, 1/2, 1/2, 5/12, 1/3, 4/15, ...
1/2, 0, -1/12, -1/12, -1/15, -1/20, ...
-1/2, -1/12, 0, 1/60, 1/60, 11/840, ...
5/12, 1/12, 1/60, 0, -1/280, -1/280, ...
etc.
b(n) is mentioned in A241269 as an autosequence of the first kind.
The denominators of the first two upper diagonals are the positive Apéry numbers, A005430(n+1). Compare to the array in A003506.
Numerators: 0, 1, 1, 5, 1, 4, 13, 151, 16, 83, 73, 1433, 647, 15341, ... .

Examples

			0, 1/2, 1/2, 5/12, 1/3, 4/15, 13/60, 151/840, 16/105, 83/630, 73/630, ...
b(1) = (0+1)/2, hence a(1)=2.
b(2) = (1/2+1/2)/2 = 1/2, hence a(2)=2.
b(3) = (1/2+1/3)/2 = 5/12, hence a(3)=12.
		

Crossrefs

Cf. A086466.
Cf. A242376 (numerators).

Programs

  • Mathematica
    b[0] = 0; b[n_] := b[n] = 1/2*(b[n-1] + 1/n); Table[b[n] // Denominator, {n, 0, 25}] (* Jean-François Alcover, Apr 25 2014 *)
    Table[-Re[LerchPhi[2, 1, n + 1]], {n, 0, 20}] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)
    -Re[LerchPhi[2, 1, Range[20]]] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)
    RecurrenceTable[{b[n] == b[n - 1]/2 + 1/(2 n), b[0] == 0}, b[n], {n, 20}] // Denominator (* Eric W. Weisstein, Dec 11 2017 *)

Formula

b(n) = -Re(Phi(2, 1, n + 1)) where Phi denotes the Lerch transcendent. - Eric W. Weisstein, Dec 11 2017

Extensions

Extension, after a(13), from Jean-François Alcover, Apr 24 2014

A344108 Expansion of Product_{k>=1} 1 / (1 - x^k)^binomial(2*k,k).

Original entry on oeis.org

1, 2, 9, 36, 154, 644, 2744, 11608, 49267, 208610, 882963, 3731640, 15754327, 66426946, 279766063, 1176920484, 4945739292, 20761707824, 87069433162, 364802647912, 1527072152856, 6386873581244, 26690795165394, 111453873957936, 465055114353616, 1939114409985956
Offset: 0

Views

Author

Ilya Gutkovskiy, May 09 2021

Keywords

Comments

Euler transform of A000984.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(d*
          binomial(2*d, d), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 13 2023
  • Mathematica
    nmax = 25; CoefficientList[Series[Product[1/(1 - x^k)^Binomial[2 k, k], {k, 1, nmax}], {x, 0, nmax}], x]
    a[n_] := a[n] = If[n == 0, 1, (1/n) Sum[Sum[d Binomial[2 d, d], {d, Divisors[k]}] a[n - k], {k, 1, n}]]; Table[a[n], {n, 0, 25}]
    nmax = 25; CoefficientList[Series[Exp[Sum[(1/Sqrt[1 - 4*x^j] - 1)/j, {j, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, May 10 2021 *)

Formula

a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} A005430(d) ) * a(n-k).
a(n) ~ 2^(2*n - 1/3) * exp(3*n^(1/3)/2^(2/3) - 1 + c) / (sqrt(3*Pi) * n^(5/6)), where c = Sum_{k>=2} (1/sqrt(1 - 4^(1-k)) - 1)/k = 0.0907540019413286886324751305813463657179452545... - Vaclav Kotesovec, May 10 2021

A152659 Triangle read by rows: T(n,k) is the number of lattice paths from (0,0) to (n,n) with steps E=(1,0) and N=(0,1) and having k turns (NE or EN) (1<=k<=2n-1).

Original entry on oeis.org

2, 2, 2, 2, 2, 4, 8, 4, 2, 2, 6, 18, 18, 18, 6, 2, 2, 8, 32, 48, 72, 48, 32, 8, 2, 2, 10, 50, 100, 200, 200, 200, 100, 50, 10, 2, 2, 12, 72, 180, 450, 600, 800, 600, 450, 180, 72, 12, 2, 2, 14, 98, 294, 882, 1470, 2450, 2450, 2450, 1470, 882, 294, 98, 14, 2, 2, 16, 128, 448
Offset: 1

Views

Author

Emeric Deutsch, Dec 10 2008

Keywords

Comments

Row n has 2n-1 entries.
Sum of entries of row n = binomial(2n,n) = A000984(n) (the central binomial coefficients).
Sum(k*T(n,k),k=0..2n-1) = n*binomial(2n,n) = A005430(n).

Examples

			T(3,2)=4 because we have ENNNEE, EENNNE, NEEENN and NNEEEN.
Triangle starts:
  2;
  2,2,2;
  2,4,8,4,2;
  2,6,18,18,18,6,2;
  2,8,32,48,72,48,32,8,2;
  ...
		

Crossrefs

Programs

  • Maple
    T := proc (n, k) if `mod`(k, 2) = 0 then 2*binomial(n-1, (1/2)*k-1)*binomial(n-1, (1/2)*k) else 2*binomial(n-1, (1/2)*k-1/2)^2 end if end proc: for n to 9 do seq(T(n, k), k = 1 .. 2*n-1) end do; # yields sequence in triangular form

Formula

T(n,2k) = 2*binomial(n-1,k-1)*binomial(n-1,k);
T(n,2k-1) = 2*binomial(n-1,k-1)^2.
G.f.: [1+t*r(t^2,z)]/[1-t*r(t^2,z)], where r(t,z) is the Narayana function, defined by r = z(1+r)(1+tr).

A373865 Sum over all compositions of 2n into n parts of the least common multiple of the parts.

Original entry on oeis.org

1, 2, 8, 50, 160, 892, 3794, 19560, 80112, 371948, 1614598, 7180494, 30794746, 134269410, 574754496, 2471353090, 10542096528, 45057428356, 191653403306, 814082549052, 3444043955350, 14537736838038, 61174002263338, 256838845740468, 1075631257186986
Offset: 0

Views

Author

Alois P. Heinz, Jun 19 2024

Keywords

Examples

			a(3) = 50 = 2 + 6*6 + 3*4: 222, 123, 132, 213, 231, 312, 321, 114, 141, 411.
		

Crossrefs

Cf. A005430 (the same for sum), A165817 (the same for product), A181851, A260878 (the same for gcd).

Formula

a(n) = A181851(2n,n).

A068554 a(n) = n*binomial(2n, n) - 4^n.

Original entry on oeis.org

-1, -2, -4, -4, 24, 236, 1448, 7640, 37424, 175436, 798984, 3565448, 15672656, 68098936, 293196944, 1253020976, 5322318944, 22491436556, 94632958664, 396682105256, 1657418948624, 6905368852136, 28697991157424, 119000162557136
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2002

Keywords

Comments

Known to be >= 0 for n>3.

References

  • Hojoo Lee, Posting to Number Theory List, Feb 18 2002.

Crossrefs

Programs

  • Maple
    seq(n*binomial(2*n,n)-4^n,n=0..40); # Robert Israel, Nov 13 2016
  • Mathematica
    Table[n*Binomial[2n,n]-4^n,{n,0,30}] (* Harvey P. Dale, Nov 17 2012 *)

Formula

From Robert Israel, Nov 13 2016: (Start)
a(n) = A005430(n) - A000302(n).
G.f.: (2*x-sqrt(1-4*x))/(1-4*x)^(3/2).
a(n) = ((16*(n-2))*(2*n-5)*a(n-3)-(4*(8*n^2-23*n+18))*a(n-2)+(2*(5*n-4))*(n-1)*a(n-1))/(n*(n-1)). (End)
Previous Showing 11-20 of 28 results. Next