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

A385686 Decimal expansion of exp((Sum_{k>=2} log(k)/k!)/(e-1)).

Original entry on oeis.org

1, 4, 2, 1, 0, 3, 7, 9, 5, 9, 7, 3, 1, 9, 6, 0, 7, 1, 5, 3, 3, 7, 8, 1, 4, 4, 8, 9, 0, 5, 9, 2, 8, 5, 6, 9, 5, 3, 9, 8, 2, 5, 7, 1, 7, 4, 2, 9, 3, 2, 0, 0, 7, 8, 6, 8, 1, 0, 2, 8, 0, 5, 1, 8, 1, 5, 8, 2, 2, 1, 6, 1, 7, 5, 8, 0, 8, 3, 0, 7, 1, 7, 9, 7, 5
Offset: 1

Views

Author

Jwalin Bhatt, Jul 06 2025

Keywords

Comments

The geometric mean of the Poisson distribution with parameter value 1 (A385685) approaches this constant.

Examples

			1.4210379597319607153378144890592856953982...
		

Crossrefs

Programs

  • Mathematica
    N[Exp [Sum[Log[i]/Factorial[i], {i, 2, Infinity}] / (E-1) ], 120]
  • PARI
    prodinf(k=2, k^(1/k!))^(1/(exp(1)-1))

Formula

Equals exp((Sum_{k>=2} log(k)/k!)/(e-1)).
Equals (Product_{k>=2} k^(1/k!)) ^ (1/(e-1)).
From Vaclav Kotesovec, Jul 08 2025: (Start)
Equals exp(A306243/(exp(1) - 1)).
Equals A296301^(1/(exp(1) - 1)). (End)

A385873 A sequence constructed by greedily sampling the Poisson distribution for parameter value 1 so as to minimize discrepancy.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 4, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 5, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 4
Offset: 1

Views

Author

Jwalin Bhatt, Jul 11 2025

Keywords

Comments

The geometric mean approaches A385686 = exp((Sum_{k>=2} log(k)/k!)/(e-1)) in the limit.
The Poisson distribution used here is p(i) = 1/((e-1)*i!).

Examples

			Let p(k) denote the probability of k and c(k) denote the number of occurrences of k among the first n-1 terms; then the expected number of occurrences of k among n random terms is given by n*p(k).
We subtract the actual occurrences c(k) from the expected occurrences and pick the one with the highest value.
| n | n*p(1) - c(1) | n*p(2) - c(2) | n*p(3) - c(3) | choice |
|---|---------------|---------------|---------------|--------|
| 1 |     0.581     |     0.290     |     0.096     |   1    |
| 2 |     0.163     |     0.581     |     0.193     |   2    |
| 3 |     0.745     |    -0.127     |     0.290     |   1    |
| 4 |     0.327     |     0.163     |     0.387     |   3    |
| 5 |     0.909     |     0.454     |    -0.515     |   1    |
		

Crossrefs

Programs

  • Mathematica
    probCountDiff[j_, k_, count_]:=N[k/((E-1)*Factorial[j])]-Lookup[count, j, 0]
    samplePDF[n_]:=Module[{coeffs, unreachedVal, counts, k, probCountDiffs, mostProbable},
      coeffs=ConstantArray[0, n]; unreachedVal=1; counts=<||>;
      Do[probCountDiffs=Table[probCountDiff[i, k, counts], {i, 1, unreachedVal}];
        mostProbable=First@FirstPosition[probCountDiffs, Max[probCountDiffs]];
        If[mostProbable==unreachedVal, unreachedVal++]; coeffs[[k]]=mostProbable;
        counts[mostProbable]=Lookup[counts, mostProbable, 0]+1; , {k, 1, n}]; coeffs]
    A385873=samplePDF[120]
Showing 1-2 of 2 results.