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.

User: Wouter van Doorn

Wouter van Doorn's wiki page.

Wouter van Doorn has authored 2 sequences.

A380791 For a positive rational x, let k(x) be the smallest positive integer such that all k >= k(x) have a partition into distinct parts with reciprocal sum equal to x. The n-th term in this sequence is equal to the number of x with k(x) equal to n.

Original entry on oeis.org

2, 2, 2, 1, 2, 4, 5, 5, 7, 7, 5, 12, 18, 22, 32, 38, 41, 48, 57, 76, 82, 74, 97, 117, 155, 170, 194, 228, 277, 306, 332, 430, 473, 483, 510
Offset: 66

Author

Wouter van Doorn, Feb 05 2025

Keywords

Comments

R. L. Graham proved that every positive integer k >= 78 can be written as a sum a_1 + a_2 + ... + a_r of distinct positive integers, such that 1/a_1 + 1/a_2 + ... + 1/a_r is equal to 1. More generally, he showed that for every positive rational x there exists a k(x) such that all k >= k(x) can be written as a sum a_1 + a_2 + ... + a_r of distinct positive integers, such that 1/a_1 + 1/a_2 + ... + 1/a_r is equal to x.

Examples

			a(66) = 2, as there are 2 positive rationals x (namely 4/5 and 11/12) such that 65 cannot be written as a sum of distinct positive integers whose reciprocal sum is equal to x, but every positive integer larger than or equal to 66 can be written in such a way.
As it turns out, for every positive rational x, there exists a positive integer k >= 65 such that k cannot be written as a sum of distinct positive integers with reciprocal sum equal to x. This is why a(n) = 0 for all n <= 65.
		

Crossrefs

Cf. A051882.

Formula

a(n) = exp[n^(1/2 + o(1))].

A376258 Decimal expansion of the probability where a change occurs in the optimal strategy for a coin game where you have to set aside at least one coin every round.

Original entry on oeis.org

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

Author

Wouter van Doorn, Sep 17 2024

Keywords

Comments

You play the following game: you start out with n coins that all have probability p to land heads. You toss all of them and you then need to set aside at least one of them, which will not be tossed again. Now you repeat the process with the remaining coins. This continues (for at most n rounds) until all coins have been set aside. Your goal is to maximize the total number of heads you end up with. As it turns out, there exists a constant p_0 ~ 0.5495021777642 such that for p_0 < p < 1 it is (for large enough n) optimal to set aside exactly one coin every round, unless all coins landed heads. On the other hand, in the case that all but one of the coins show heads, then for p smaller than or equal to p_0 it is optimal (regardless of the value of n) to set aside all n-1 heads and toss the remaining coin again.

Examples

			0.54950217776420154314445654687638494652137186502900172367251682613752030651977...
		

Programs

  • PARI
    \p 125
    q = 0.5; r = 0.5; m = 2;
    {for(a = 1, 120,
    for(k = 0, 10,
    p = q + k/10^m;
    L = 10*m;
    v = vector(L);
    v[1] = p;
    v[2] = -p^3 + 3*p;
    n = 2;
    while(v[n] < v[1] + (n-1) && n < L, n=n+1;
    v[n] = v[n-1] + 1 + p^n*(n-1-v[n-1]) + n*p^(n-1)*(1-p)*max(0, n-2+p-v[n-1]) - (1-p)^n);
    if(n==L, r = p));
    q = r;
    m = m + 1)}
    print(p);