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 31-40 of 52 results. Next

A302927 Half-cumulants of a Fibonacci-geometric probability distribution.

Original entry on oeis.org

0, 3, 11, 105, 1487, 28065, 662111, 18744705, 619117727, 23370059265, 992427775391, 46826909698305, 2430439250993567, 137613995282046465, 8441167989376455071, 557605650894240475905, 39465264036137261935007, 2979418998248159878129665
Offset: 0

Views

Author

Albert Gordon Smith, Apr 15 2018

Keywords

Comments

If F(k) is the k-th Fibonacci number A000045(k), then p(k)=F(k-1)/2^k is a normalized probability distribution on the positive integers.
For example, it is the probability that k coin tosses are required to get two heads in a row, or the probability that a random series of k bits has its first two consecutive 1's at the end.
The g.f. for this distribution is g(x) = x^2/(4-2x-x^2) = (1/4)x^2 + (1/8)x^3 + (1/8)x^4 + (3/32)x^5 + ....
The cumulants of this distribution, defined by the cumulant e.g.f. log(g(e^x)), appear to be integers. They form sequence A302926.
The cumulants appear to be even for n >= 0. Dividing them by 2 gives this sequence.
The n-th moments about zero of this distribution, known as raw moments, are defined by a(n) = Sum_{k>=1} (k^n)p(k). They also appear to be integers and form sequence A302922.
For n >= 1, the raw moments also appear to be even. Dividing them by 2 gives sequence A302923.
The central moments (i.e., the moments about the mean) also appear to be integers. They form sequence A302924.
For n >= 1, the central moments appear to be even. Dividing them by 2 gives sequence A302925.
Note: Another probability distribution on the positive integers that has integral moments and cumulants is the geometric distribution p(k)=1/2^k. The sequences related to these moments are A000629, A000670, A052841, and A091346.

Examples

			a(0)=0 is half the 0th cumulant of the distribution. The 0th cumulant is always zero.
a(1)=3 is half the 1st cumulant, which is half the mean.
a(2)=11 is half the 2nd cumulant, which is half the variance.
		

Crossrefs

Cumulants: A302926.
Raw moments: A302922.
Raw half-moments: A302923.
Central moments: A302924.
Central half-moments: A302925.

Programs

  • Mathematica
    Module[{max, r, g},
      max = 17;
      r = Range[0, max];
      g[x_] := x^2/(4 - 2 x - x^2);
      (1/2) r! CoefficientList[Normal[Series[Log[g[Exp[x]]], {x, 0, max}]], x]
    ]
  • PARI
    concat(0, Vec(serlaplace(log(exp(2*x)/(4-2*exp(x)-exp(2*x))))/2)) \\ Michel Marcus, Apr 17 2018

Formula

E.g.f.: (1/2)*log(g(e^x)) where g(x) = x^2/(4-2*x-x^2) is the g.f. for the probability distribution.

A337505 Number of sequences of length 2*n covering an initial interval of positive integers and splitting into n maximal anti-runs.

Original entry on oeis.org

1, 2, 24, 440, 10780, 329112, 12006456, 508903824, 24559486380, 1328964785720, 79670488601704, 5240336913228144, 375167786246499064, 29038998659140223600, 2416268289647552828400, 215068032231876851531040, 20389611819955706893052460, 2051184695261785540782403320
Offset: 0

Views

Author

Gus Wiseman, Sep 05 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts.

Examples

			The a(2) = 24 sequences:
  (2,1,2,2)  (1,2,3,3)  (1,2,2,3)  (1,1,2,3)
  (2,2,1,2)  (1,3,3,2)  (1,3,2,2)  (1,1,3,2)
  (1,2,2,1)  (2,1,3,3)  (2,2,1,3)  (2,1,1,3)
  (2,1,1,2)  (2,3,3,1)  (2,2,3,1)  (2,3,1,1)
  (1,1,2,1)  (3,3,1,2)  (3,1,2,2)  (3,1,1,2)
  (1,2,1,1)  (3,3,2,1)  (3,2,2,1)  (3,2,1,1)
		

Crossrefs

A336108 is the version for compositions and runs.
A337504 is the version for compositions.
A337506 has this as main diagonal n = 2*k.
A337564 is the version for runs.
A000670 counts sequences covering an initial interval.
A003242 counts anti-run compositions.
A005649 counts anti-runs covering an initial interval.
A124767 counts maximal runs in standard compositions.
A333381 counts maximal anti-runs in standard compositions.
A333769 gives run-lengths in standard compositions.
A337565 gives anti-run lengths in standard compositions.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[2*n],Length[Split[#,UnsameQ]]==n&]],{n,0,3}]
  • PARI
    \\ here b(n) is A005649.
    b(n) = {sum(k=0, n, stirling(n,k,2)*(k + 1)!)}
    a(n) = {b(n)*binomial(2*n-1,n)} \\ Andrew Howroyd, Dec 31 2020

Formula

a(n) = A005649(n)*binomial(2*n-1,n). - Andrew Howroyd, Dec 31 2020

Extensions

Terms a(5) and beyond from Andrew Howroyd, Dec 31 2020

A353775 Expansion of e.g.f. 1/(1 - (exp(x) - 1)^4).

Original entry on oeis.org

1, 0, 0, 0, 24, 240, 1560, 8400, 81144, 1638000, 31058520, 482499600, 6905646264, 114015261360, 2456232531480, 59734751403600, 1427946773067384, 33377481440110320, 818549745973204440, 22338800420915168400, 667566534457962216504, 20735588176755396824880
Offset: 0

Views

Author

Seiichi Manyama, May 07 2022

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=30},CoefficientList[Series[1/(1-(Exp[x]-1)^4),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Apr 05 2023 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(1/(1-(exp(x)-1)^4)))
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, (4*k)!*x^(4*k)/prod(j=1, 4*k, 1-j*x)))
    
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=24*sum(j=1, i, binomial(i, j)*stirling(j, 4, 2)*v[i-j+1])); v;
    
  • PARI
    a(n) = sum(k=0, n\4, (4*k)!*stirling(n, 4*k, 2));

Formula

G.f.: Sum_{k>=0} (4*k)! * x^(4*k)/Product_{j=1..4*k} (1 - j * x).
a(0) = 1; a(n) = 24 * Sum_{k=1..n} binomial(n,k) * Stirling2(k,4) * a(n-k).
a(n) = Sum_{k=0..floor(n/4)} (4*k)! * Stirling2(n,4*k).
a(n) ~ n! / (8 * log(2)^(n+1)). - Vaclav Kotesovec, May 08 2022

A367979 Expansion of e.g.f. exp(-x) / (2 - exp(3*x)).

Original entry on oeis.org

1, 2, 22, 278, 4822, 104342, 2709622, 82092278, 2842418902, 110720079062, 4792059271222, 228144844817078, 11849163703935382, 666694458859845782, 40397145162583154422, 2622634244645856386678, 181615748103175019442262, 13362823095925278064444502, 1041037845089466806646007222
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 07 2023

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    Coefficients(R!(Laplace( Exp(-x)/(2-Exp(3*x)) ))); // G. C. Greubel, Jun 11 2024
    
  • Mathematica
    nmax = 18; CoefficientList[Series[Exp[-x]/(2 - Exp[3 x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[n_] := a[n] = (-1)^n + Sum[Binomial[n, k] 3^k a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 18}]
  • SageMath
    def A367979_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-x)/(2-exp(3*x)) ).egf_to_ogf().list()
    A367979_list(40) # G. C. Greubel, Jun 11 2024

Formula

a(n) = Sum_{k>=0} (3*k-1)^n / 2^(k+1).
a(n) = (-1)^n + Sum_{k=1..n} binomial(n,k) * 3^k * a(n-k).
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * 3^k * A000670(k).

A367981 Expansion of e.g.f. exp(-x) / (2 - exp(4*x)).

Original entry on oeis.org

1, 3, 41, 699, 16145, 465843, 16129721, 651567339, 30080413985, 1562287110243, 90156154697801, 5722984840599579, 396313048731199025, 29731461242293159443, 2402032174787943537881, 207923994397338180409419, 19198138598327305954291265, 1883400035807194281432757443
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 07 2023

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    Coefficients(R!(Laplace( Exp(-x)/(2-Exp(4*x)) ))); // G. C. Greubel, Jun 11 2024
    
  • Mathematica
    nmax = 17; CoefficientList[Series[Exp[-x]/(2 - Exp[4 x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[n_] := a[n] = (-1)^n + Sum[Binomial[n, k] 4^k a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 17}]
  • SageMath
    def A367981_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-x)/(2-exp(4*x)) ).egf_to_ogf().list()
    A367981_list(40) # G. C. Greubel, Jun 11 2024

Formula

a(n) = Sum_{k>=0} (4*k-1)^n / 2^(k+1).
a(n) = (-1)^n + Sum_{k=1..n} binomial(n,k) * 4^k * a(n-k).
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * 4^k * A000670(k).

A346208 Expansion of e.g.f.: exp(-3*x) / (2 - exp(x)).

Original entry on oeis.org

1, -2, 6, -14, 54, -62, 966, 4786, 71574, 875938, 12810726, 202739986, 3511712694, 65856494338, 1330170266886, 28785391689586, 664456856787414, 16296345814039138, 423191833100881446, 11600198414334789586, 334710974532291679734, 10140603124807778534338
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 01 2021

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    Coefficients(R!(Laplace( Exp(-3*x)/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024
    
  • Mathematica
    nmax = 21; CoefficientList[Series[Exp[-3 x]/(2 - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    Table[HurwitzLerchPhi[1/2, -n, -3]/2, {n, 0, 21}]
    a[n_] := a[n] = (-3)^n + Sum[Binomial[n, k] a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 21}]
  • SageMath
    def A346208_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-3*x)/(2-exp(x)) ).egf_to_ogf().list()
    A346208_list(40) # G. C. Greubel, Jun 11 2024

Formula

a(n) = Sum_{k=0..n} binomial(n,k) * (-3)^(n-k) * A000670(k).
a(n) = Sum_{k=0..n} (-1)^k * Stirling2(n,k) * k! * A002620(k+2).
a(n) = Sum_{k>=0} (k - 3)^n / 2^(k+1).
a(n) = (-3)^n + Sum_{k=0..n-1} binomial(n,k) * a(k).
a(n) ~ n! / (16 * log(2)^(n+1)). - Vaclav Kotesovec, Aug 15 2021

A052591 Expansion of e.g.f. x/((1-x)(1-x^2)).

Original entry on oeis.org

0, 1, 2, 12, 48, 360, 2160, 20160, 161280, 1814400, 18144000, 239500800, 2874009600, 43589145600, 610248038400, 10461394944000, 167382319104000, 3201186852864000, 57621363351552000, 1216451004088320000, 24329020081766400000, 562000363888803840000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Stirling transform of 2*a(n) = [2,4,24,96,...] is A052841(n+1) = [2,6,38,270,...]. - Michael Somos, Mar 04 2004
a(n) is the number of even fixed points in all permutations of {1,2,...,n+1}. Example: a(2)=2 because we have 12'3, 132, 312, 213, 231, and 32'1, the even fixed points being marked. - Emeric Deutsch, Jul 18 2009

Crossrefs

Cf. A052558. - Emeric Deutsch, Jul 18 2009

Programs

  • Maple
    spec := [S,{S=Prod(Z,Sequence(Z),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    G(x):=x/(1-x)/(1-x^2): f[0]:=G(x): for n from 1 to 19 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..19); # Zerinvary Lajos, Apr 03 2009
  • PARI
    a(n)=if(n<0,0,n!*polcoeff(x/(1-x)/(1-x^2)+x*O(x^n),n))

Formula

Recurrence: {a(1)=1, a(0)=0, (-n^3 - 5*n^2 - 8*n - 4)*a(n) + (-2-n)*a(n+1) + (n+1)*a(n+2) = 0}.
a(n) = ((1/4)*(-1)^(1-n) + (1/2)*n + 1/4)*n!.
E.g.f.: x/((1-x)*(1-x^2)).
From Emeric Deutsch, Jul 18 2009: (Start)
a(n) = (n+1)!/2 if n is odd; a(n) = n!*n/2 if n is even.
a(n) = (n+1)! - A052558(n). (End)
a(n) = n!*A008619(n-1), n > 1. - R. J. Mathar, Nov 27 2011
Sum_{n>=1} 1/a(n) = 2*(CoshIntegral(1) + cosh(1) - gamma - 1) = 2*(A099284 + A073743 - A001620 - 1). - Amiram Eldar, Jan 22 2023

A091804 a(n) = 2^(n*(n+1)/2)*A055209(n).

Original entry on oeis.org

1, 2, 32, 9216, 84934656, 39137889484800, 1298501242170900480000, 4221953171600428240994304000000, 1757091687362157576297527910177177600000000
Offset: 0

Views

Author

Philippe Deléham, Mar 07 2004

Keywords

Comments

This sequence is the Hankel transform (see A001906 for definition) of A000629, A000670 (Fubini numbers) and A052841.

Crossrefs

Programs

  • Magma
    [(&*[(2*(k+1)*Floor((2*k+3)/2))^(n-k): k in [0..n]]): n in [0..10]]; // G. C. Greubel, Oct 14 2018
    
  • Mathematica
    Table[Product[(2(k+1)Floor[(2k+3)/2])^(n-k),{k,0,n}],{n,0,10}] (* Harvey P. Dale, Aug 10 2011 *)
  • PARI
    for(n=0,10, print1(prod(k=0,n, (2*(k+1)*floor((2*k+3)/2))^(n-k)), ", ")) \\ G. C. Greubel, Oct 14 2018

Formula

a(n) = Product{k=0..n} (2(k+1)*floor((2k+3)/2))^(n-k). - Paul Barry, Mar 30 2010

A122101 T(n,k) = Sum_{i=0..k} (-1)^(k-i)*binomial(k,i)*A000670(n-k+i).

Original entry on oeis.org

1, 1, 0, 3, 2, 2, 13, 10, 8, 6, 75, 62, 52, 44, 38, 541, 466, 404, 352, 308, 270, 4683, 4142, 3676, 3272, 2920, 2612, 2342, 47293, 42610, 38468, 34792, 31520, 28600, 25988, 23646, 545835, 498542, 455932, 417464, 382672, 351152, 322552, 296564, 272918
Offset: 0

Views

Author

Vladeta Jovovic, Oct 18 2006

Keywords

Examples

			Triangle begins as:
     1;
     1,    0;
     3,    2,    2;
    13,   10,    8,    6;
    75,   62,   52,   44,   38;
   541,  466,  404,  352,  308,  270;
  4683, 4142, 3676, 3272, 2920, 2612, 2342;
  ...
		

Crossrefs

Columns k=0-1 give: A000670, A232472.
Row sums give A089677(n+1).
Main diagonal gives A052841.
T(2n,n) gives A340837.

Programs

  • GAP
    A000670:= function(n)
         return Sum([0..n], i-> Factorial(i)*Stirling2(n,i) ); end;
    T:= function(n,k)
        return Sum([0..k], j-> (-1)^(k-j)*Binomial(k, j)*A000670(n-k+j) ); end;
    Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Oct 02 2019
  • Magma
    A000670:= func< n | &+[Factorial(k)*StirlingSecond(n,k): k in [0..n]] >;
    [(&+[(-1)^(k-j)*Binomial(k,j)*A000670(n-k+j): j in [0..k]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 02 2019
    
  • Maple
    T:= (n, k)-> k!*(n-k)!*coeff(series(coeff(series(exp(-y)/
            (2-exp(x+y)), y, k+1), y, k), x, n-k+1), x, n-k):
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 02 2019
    # second Maple program:
    b:= proc(n) option remember; `if`(n<2, 1,
          add(b(n-j)*binomial(n, j), j=1..n))
        end:
    T:= (n, k)-> add(binomial(k, j)*(-1)^j*b(n-j), j=0..k):
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 02 2019
  • Mathematica
    A000670[n_]:= If[n==0,1,Sum[k! StirlingS2[n, k], {k, n}]]; T[n_, k_]:= Sum[(-1)^(k-j)*Binomial[k, j]*A000670[n-k+j], {j,0,k}]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 02 2019 *)
  • PARI
    A000670(n) = sum(k=0,n, k!*stirling(n,k,2));
    T(n,k) = sum(j=0,k, (-1)^(k-j)*binomial(k, j)*A000670(n-k+j));
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 02 2019
    
  • Sage
    def A000670(n): return sum(factorial(k)*stirling_number2(n,k) for k in (0..n))
    def T(n,k): return sum((-1)^(k-j)*binomial(k, j)*A000670(n-k+j) for j in (0..k))
    [[T(n,k) for k in (0..n)] for n in (0..10)]
    

Formula

Doubly-exponential generating function: Sum_{n, k} a(n-k,k) x^n/n! y^k/k! = exp(-y)/(2-exp(x+y)).

A330603 a(n) = Sum_{k>=0} (k - n)^n / 2^(k + 1).

Original entry on oeis.org

1, 0, 3, -14, 155, -1834, 27867, -492246, 10068459, -232990178, 6025718963, -172182404734, 5387697769467, -183214963001082, 6728091949444491, -265348057242998822, 11185888456798395563, -501937946696294628946, 23886968118494957119011, -1201674025637823778926414
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 19 2019

Keywords

Comments

The n-th term of the n-th inverse binomial transform of A000670.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 50);
    A330603:= func< n | Coefficient(R!(Laplace( Exp(-n*x)/(2-Exp(x)) )), n) >;
    [A330603(n): n in [0..30]]; // G. C. Greubel, Jun 12 2024
    
  • Mathematica
    Table[Sum[(k - n)^n/2^(k + 1), {k, 0, Infinity}], {n, 0, 19}]
    Table[HurwitzLerchPhi[1/2, -n, -n]/2, {n, 0, 19}]
    Table[n! SeriesCoefficient[Exp[-n x]/(2 - Exp[x]), {x, 0, n}], {n, 0, 19}]
  • SageMath
    [factorial(n)*( exp(-n*x)/(2-exp(x)) ).series(x,n+1).list()[n] for n in (0..30)] # G. C. Greubel, Jun 12 2024

Formula

a(n) = n! * [x^n] exp(-n*x) / (2 - exp(x)).
a(n) = Sum_{k=0..n} binomial(n,k) * (-n)^(n - k) * A000670(k).
a(n) ~ (-1)^n * n^n / (2 - exp(-1)). - Vaclav Kotesovec, Dec 19 2019
Previous Showing 31-40 of 52 results. Next