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

A302923 Raw half-moments of a Fibonacci-geometric probability distribution.

Original entry on oeis.org

3, 29, 411, 7757, 183003, 5180909, 171119931, 6459325517, 274300290843, 12942639522989, 671756887456251, 38035572830424077, 2333081451314129883, 154118411443366428269, 10907930704590567517371, 823491157770358707135437, 66054810199299268861908123
Offset: 1

Views

Author

Albert Gordon Smith, Apr 15 2018

Keywords

Comments

If F(k) is the k-th Fibonacci number, where F(0)=0, F(1)=1, and F(n)=F(n-1)+F(n-2), 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 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 appear to be integers and form A302922.
The e.g.f. for the raw moments is g(e^x) = 1 + 6x + 58x^2/2! + 822x^3/3! + ....
For n >= 1, the raw moments appear to be even. Dividing them by 2 gives this sequence of raw half-moments.
The central moments (i.e., the moments about the mean) also appear to be integers. They form sequence A302924.
The central moments also appear to be even for n >= 1. Dividing them by 2 gives sequence A302925.
The cumulants of this distribution, defined by the cumulant e.g.f. log(g(e^x)), also appear to be integers. They form sequence A302926.
The cumulants also appear to be even for n >= 0. Dividing them by 2 gives sequence A302927.
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, A091346.

Examples

			a(1)=3 is half the first raw moment of the distribution. It is half the arithmetic average of integers following the distribution.
a(2)=29 is half the second raw moment. It is half the arithmetic average of the squares of integers following the distribution.
		

Crossrefs

Raw moments: A302922.
Central moments: A302924.
Central half-moments: A302925.
Cumulants: A302926.
Half-cumulants: A302927.

Programs

  • Mathematica
    Module[{max, r, g, rawMoments},
      max = 17;
      r = Range[0, max];
      g[x_] := x^2/(4 - 2 x - x^2);
      rawMoments = r! CoefficientList[Normal[Series[g[Exp[x]], {x, 0, max}]], x];
      Rest[rawMoments]/2
    ]

Formula

In the following,
F(k) is the k-th Fibonacci number, as defined in the Comments.
phi=(1+sqrt(5))/2 is the golden ratio, and psi=(1-sqrt(5))/2.
Li(s,z) is the polylogarithm of order s and argument z.
When s is a negative integer as it is here, Li(s,z) is a rational function of z: Li(-n,z) = (z(d/dz))^n(z/(1-z)).
For n>=1:
a(n) = (1/2)A302922(n);
a(n) = (1/2)Sum_{k>=1} ((k^n)(F(k-1)/2^k));
a(n) = (1/2)Sum_{k>=1} ((k^n)(((phi^(k-1)-psi^(k-1))/sqrt(5))/2^k));
a(n) = (1/2)(Li(-n,phi/2)/phi-Li(-n,psi/2)/psi)/sqrt(5).
E.g.f.: (1/2)g(e^x) where g(x) = x^2/(4-2x-x^2) is the g.f. for the probability distribution.

A302924 Central moments of a Fibonacci-geometric probability distribution.

Original entry on oeis.org

1, 0, 22, 210, 4426, 102330, 2906362, 95952570, 3622138906, 153816150810, 7257695358202, 376693381614330, 21328770664314586, 1308295248437904090, 86423208789970618042, 6116714829331037666490, 461779664078480243085466, 37040796099362864616022170
Offset: 0

Views

Author

Albert Gordon Smith, Apr 15 2018

Keywords

Comments

If F(k) is the k-th Fibonacci number, where F(0)=0, F(1)=1, and F(n)=F(n-1)+F(n-2), 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 mean of this distribution is 6. (See A302922.)
The n-th moments about the mean, known as central moments, are defined by a(n) = Sum_{k>=1} ((k-6)^n)p(k). They appear to be integers and form this sequence.
For n >= 1, a(n) appears to be even. Dividing these terms by 2 gives sequence A302925.
The raw moments (i.e., the moments about zero) also appear to be integers. This is sequence A302922.
The raw moments also appear to be even for n >= 1. Dividing them by 2 gives sequence A302923.
The cumulants of this distribution, defined by the cumulant e.g.f. log(g(e^x)), also appear to be integers. They form sequence A302926.
The cumulants also appear to be even for n >= 0. Dividing them by 2 gives sequence A302927.
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)=1 is the 0th central moment of the distribution, which is the total probability.
a(1)=0 is the 1st central moment, or the "mean about the mean". It is zero by definition of central moments.
a(2)=22 is the 2nd central moment, known as the variance or the square of the standard deviation. It measures how far integers following the distribution are from the mean by averaging the squares of their differences from the mean.
		

Crossrefs

Central half-moments: A302925.
Raw moments: A302922.
Raw half-moments: A302923.
Cumulants: A302926.
Half-cumulants: A302927.

Programs

  • Mathematica
    Module[{max, r, g, moments},
      max = 17;
      r = Range[0, max];
      g[x_] := x^2/(4 - 2 x - x^2);
      moments = r! CoefficientList[Normal[Series[g[Exp[x]], {x, 0, max}]], x];
      Table[Sum[Binomial[n, k] moments[[k + 1]] (-6)^(n - k), {k, 0, n}], {n, 0, max}]
    ]

Formula

In the following,
F(k) is the k-th Fibonacci number, as defined in the Comments.
phi=(1+sqrt(5))/2 is the golden ratio, and psi=(1-sqrt(5))/2.
LerchPhi(z,s,a) = Sum_{k>=0} z^k/(a+k)^s is the Lerch transcendant.
For n >= 0:
a(n) = Sum_{k>=1} (((k-6)^n)(F(k-1)/2^k));
a(n) = Sum_{k>=1} (((k-6)^n)(((phi^(k-1)-psi^(k-1))/sqrt(5))/2^k));
a(n) = (LerchPhi(phi/2,-n,-5)-LerchPhi(psi/2,-n,-5))/(2 sqrt(5));
a(n) = Sum_{k=0..n} (binomial(n,k)*A302922(k)*(-6)^(n-k)).

A302925 Central half-moments of a Fibonacci-geometric probability distribution.

Original entry on oeis.org

0, 11, 105, 2213, 51165, 1453181, 47976285, 1811069453, 76908075405, 3628847679101, 188346690807165, 10664385332157293, 654147624218952045, 43211604394985309021, 3058357414665518833245, 230889832039240121542733, 18520398049681432308011085
Offset: 1

Views

Author

Albert Gordon Smith, Apr 15 2018

Keywords

Comments

If F(k) is the k-th Fibonacci number, where F(0)=0, F(1)=1, and F(n)=F(n-1)+F(n-2), 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 mean of this distribution is 6. (See A302922.)
The n-th moments about the mean, known as central moments, are defined by a(n) = Sum_{k>=1} ((k-6)^n)p(k). They appear to be integers and form A302924.
For n >= 1, that sequence appears to be even. Dividing those terms by 2 gives this sequence.
The raw moments (i.e., the moments about zero) also appear to be integers. This is sequence A302922.
The raw moments also appear to be even for n >= 1. Dividing them by 2 gives sequence A302923.
The cumulants of this distribution, defined by the cumulant e.g.f. log(g(e^x)), also appear to be integers. They form sequence A302926.
The cumulants also appear to be even for n >= 0. Dividing them by 2 gives sequence A302927.
Note: Another probability distribution on the positive integers that has integral moments is the geometric distribution p(k)=1/2^k. The sequences related to these moments are A000629, A000670, A052841, and A091346.

Examples

			a(1)=0 is half the 1st central moment of the distribution, or half the "mean about the mean". It is zero by definition of central moments.
a(2)=11 is half the 2nd central moment, or half the variance, or half the square of the standard deviation.
		

Crossrefs

Central moments: A302924.
Raw moments: A302922.
Raw half-moments: A302923.
Cumulants: A302926.
Half-cumulants: A302927.

Programs

  • Mathematica
    Module[{max, r, g, moments, centralMoments},
      max = 17;
      r = Range[0, max];
      g[x_] := x^2/(4 - 2 x - x^2);
      moments = r! CoefficientList[Normal[Series[g[Exp[x]], {x, 0, max}]], x];
      centralMoments = Table[Sum[Binomial[n, k] moments[[k + 1]] (-6)^(n - k), {k, 0, n}], {n, 0, max}];
      Rest[centralMoments]/2
    ]

Formula

In the following,
F(k) is the k-th Fibonacci number, as defined in the Comments.
phi=(1+sqrt(5))/2 is the golden ratio, and psi=(1-sqrt(5))/2.
LerchPhi(z,s,a) = Sum_{k>=0} z^k/(a+k)^s is the Lerch transcendant.
For n>=1:
a(n) = (1/2)A302924(n);
a(n) = (1/2)Sum_{k>=1} (((k-6)^n)(F(k-1)/2^k));
a(n) = (1/2)Sum_{k>=1} (((k-6)^n)(((phi^(k-1)-psi^(k-1))/sqrt(5))/2^k));
a(n) = (1/2)(LerchPhi(phi/2,-n,-5)-LerchPhi(psi/2,-n,-5))/(2 sqrt(5));
a(n) = (1/2)Sum_{k=0..n} (binomial(n,k)A302922(k)(-6)^(n-k)).

A302926 Cumulants of a Fibonacci-geometric probability distribution.

Original entry on oeis.org

0, 6, 22, 210, 2974, 56130, 1324222, 37489410, 1238235454, 46740118530, 1984855550782, 93653819396610, 4860878501987134, 275227990564092930, 16882335978752910142, 1115211301788480951810, 78930528072274523870014, 5958837996496319756259330
Offset: 0

Views

Author

Albert Gordon Smith, Apr 15 2018

Keywords

Comments

If F(k) is the k-th Fibonacci number, where F(0)=0, F(1)=1, and F(n)=F(n-1)+F(n-2), 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 and form this sequence.
The cumulants appear to be even for n >= 0. Dividing them by 2 gives sequence A302927.
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 also 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.
Variant of A103437. - R. J. Mathar, Jun 09 2018

Examples

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

Crossrefs

Half-cumulants: A302927.
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);
      r! CoefficientList[Normal[Series[Log[g[Exp[x]]], {x, 0, max}]], x]
    ]

Formula

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

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.

A352971 Moments of the distribution of position of the first occurrence of pattern aa in a random ternary word.

Original entry on oeis.org

1, 12, 258, 8274, 353742, 18904602, 1212354798, 90706565514, 7756033173342, 746093257148442, 79745110236049038, 9375786203927344554, 1202540991574287431742, 167091435183140588426682, 25003060551369349424359278, 4008624526767825553573112394
Offset: 0

Views

Author

Geoffrey Critzer, Apr 12 2022

Keywords

Comments

Let X be the random variable that assigns to each word on alphabet {a,b,c} the number of letters required for the first occurrence of the pattern aa. Then a(n) = E(X^n).
Let X(m,k) be the random variable that assigns to each m-ary word the number of letters required for the first occurrence of the pattern aa...a (k copies of a). The moment generating function for X(m,k) is G(exp(t)) where G(t) = T(t/m), T(z) = z^k/(z^k + c(z)(1- m*z)), c(z) = (1-z^k)/(1-z).

Crossrefs

Cf. A302922.

Programs

  • Maple
    g := exp(2*x)/(9-6*exp(x)-2*exp(2*x)) ;
    taylor(g,x=0,40) ;
    L := gfun[seriestolist](%) ;
    seq( op(i,L)*(i-1)!,i=1..nops(L)) ; # R. J. Mathar, Mar 02 2023
  • Mathematica
    nn = 15; c[z_] := (1 - z^k)/(1 - z);
    T[z_] := z^k/(z^k + (1 - m z) c[z]); G[t_] := T[t/m];
    Range[0, nn]! CoefficientList[Series[G[Exp[t]] /. {k -> 2, m -> 3}, {t, 0, nn}],t]
  • PARI
    seq(n)=my(p=exp(x + O(x*x^n))); Vec(serlaplace(p^2/(9 - 6*p - 2*p^2))) \\ Andrew Howroyd, May 06 2023
    
  • SageMath
    # uses[egfExpand from A362718]
    def egf(x): return exp(2*x)/(9 - 6*exp(x) - 2*exp(2*x))
    print(egfExpand(egf, 1, 15))  # Peter Luschny, May 06 2023

Formula

E.g.f.: exp(2*t)/(9 - 6*exp(t) - 2*exp(2*t)).
a(n) ~ n! * (3 - sqrt(3)) / (12 * (log(3*(sqrt(3) - 1)/2))^(n+1)). - Vaclav Kotesovec, Apr 13 2022

Extensions

Typo in a(7) corrected by Georg Fischer, May 06 2023
Showing 1-6 of 6 results.