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-10 of 15 results. Next

A053289 First differences of consecutive perfect powers (A001597).

Original entry on oeis.org

3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, 35, 19, 18, 39, 41, 43, 28, 17, 47, 49, 51, 53, 55, 57, 59, 61, 39, 24, 65, 67, 69, 71, 35, 38, 75, 77, 79, 81, 47, 36, 85, 87, 89, 23, 68, 71, 10, 12, 95, 97, 99, 101, 103, 40, 65, 107, 109, 100
Offset: 1

Views

Author

Labos Elemer, Mar 03 2000

Keywords

Comments

Michel Waldschmidt writes: Conjecture 1.3 (Pillai). Let k be a positive integer. The equation x^p - y^q = k where the unknowns x, y, p and q take integer values, all >= 2, has only finitely many solutions (x,y,p,q). This means that in the increasing sequence of perfect powers [A001597] the difference between two consecutive terms [the present sequence] tends to infinity. It is not even known whether for, say, k=2, Pillai's equation has only finitely many solutions. A related open question is whether the number 6 occurs as a difference between two perfect powers. See Sierpiński [1970], problem 238a, p. 116. - Jonathan Vos Post, Feb 18 2008
Are there are any adjacent equal terms? - Gus Wiseman, Oct 08 2024

Examples

			Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
		

References

  • Wacław Sierpiński, 250 problems in elementary number theory, Modern Analytic and Computational Methods in Science and Mathematics, No. 26, American Elsevier, Warsaw, 1970, pp. 21, 115-116.
  • S. S. Pillai, On the equation 2^x - 3^y = 2^X - 3^Y, Bull, Calcutta Math. Soc. 37 (1945) 15-20.

Crossrefs

For non-perfect-powers (A007916) we have A375706.
The union is A023055.
For prime-powers (A000961 or A246655) we have A057820.
Sorted positions of first appearances are A376268, complement A376519.
For second differences we have A376559.
Ascending and descending points are A376560 and A376561.
A001597 lists perfect-powers.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.

Programs

  • Mathematica
    Differences@ Select[Range@ 3200, # == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Jun 30 2016, after Ant King at A001597 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A053289(n):
        if n==1: return 3
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax)+1 >= kmax:
            kmax <<= 1
        rmin, rmax = 1, kmax
        while True:
            kmid = kmax+kmin>>1
            if f(kmid)+1 < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        while True:
            rmid = rmax+rmin>>1
            if f(rmid) < rmid:
                rmax = rmid
            else:
                rmin = rmid
            if rmax-rmin <= 1:
                break
        return kmax-rmax # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A001597(n+1) - A001597(n). - Jonathan Vos Post, Feb 18 2008
From Amiram Eldar, Jun 30 2023: (Start)
Formulas from Jakimczuk (2016):
Lim sup_{n->oo} a(n)/(2*n) = 1.
Lim inf_{n->oo} a(n)/(2*n)^(2/3 + eps) = 0. (End)
Can be obtained by inserting 0 between 3 and 6 in A375702 and then adding 1 to all terms. In particular, for n > 2, a(n+1) - 1 = A375702(n). - Gus Wiseman, Sep 14 2024

A375706 First differences of non-perfect-powers.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 31 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.

Examples

			The 5th non-perfect-power is 7, and the 6th is 10, so a(5) = 3.
		

Crossrefs

For prime-powers (A000961) we have A057820.
For perfect powers (A001597) we have A053289.
For nonprime numbers (A002808) we have A073783.
For squarefree numbers (A005117) we have A076259.
First differences of A007916.
For nonsquarefree numbers (A013929) we have A078147.
For non-prime-powers (A024619) we have A375708.
Positions of 1s are A375740, complement A375714.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ]]
  • PARI
    up_to = 112;
    A375706list(up_to) = { my(v=vector(up_to), pk=2, k=2, i=0); while(i<#v, k++; if(!ispower(k), i++; v[i] = k-pk; pk = k)); (v); };
    v375706 = A375706list(up_to);
    A375706(n) = v375706[n]; \\ Antti Karttunen, Jan 19 2025
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A375706(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return next(i for i in count(m+1) if not perfect_power(i))-m # Chai Wah Wu, Sep 09 2024
    

Formula

a(n) = A007916(n+1) - A007916(n).

Extensions

More terms from Antti Karttunen, Jan 19 2025

A376562 Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.

Original entry on oeis.org

1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.

Examples

			The non-perfect powers (A007916) are:
  2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
  1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, ...
with first differences (A376562):
  1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A375706, ones A375740, complement A375714.
Positions of zeros are A376588, complement A376589.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers, complement A001597.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ],2]
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A376562(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
        return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024

A377434 Numbers k such that there is a unique perfect-power x in the range prime(k) < x < prime(k+1).

Original entry on oeis.org

2, 6, 15, 18, 22, 25, 31, 34, 39, 44, 47, 48, 53, 54, 61, 66, 68, 72, 78, 85, 92, 97, 99, 105, 114, 122, 129, 137, 146, 154, 162, 168, 172, 181, 191, 200, 210, 217, 219, 228, 240, 251, 263, 269, 274, 283, 295, 306, 309, 319, 329, 342, 357, 367, 378, 393, 400
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.

Examples

			Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains two perfect-powers (8,9), so 4 is not in the sequence.
Primes 5 and 6 are 11 and 13, and the interval (12) contains no perfect-powers, so 5 is not in the sequence.
Primes 6 and 7 are 13 and 17, and the interval (14,15,16) contains just one perfect-power (16), so 6 is in the sequence.
		

Crossrefs

For powers of 2 instead of primes see A013597, A014210, A014234, A244508, A377467.
For prime-powers we have A377287.
For squarefree numbers see A377430, A061398, A377431, A068360.
These are the positions of 1 in A377432.
For no perfect-powers we have A377436.
For more than one perfect-power we have A377466.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A031218 gives the greatest prime-power <= n.
A046933 counts the interval from A008864(n) to A006093(n+1).
A065514 gives the greatest prime-power < prime(n), difference A377289.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A345531 gives the least prime-power > prime(n), difference A377281.
A366833 counts prime-powers between primes, see A053607, A304521.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[100],Length[Select[Range[Prime[#]+1,Prime[#+1]-1],perpowQ]]==1&]

A377466 Numbers k such that there is more than one perfect power x in the range prime(k) < x < prime(k+1).

Original entry on oeis.org

4, 9, 11, 30, 327, 445, 3512, 7789, 9361, 26519413
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2024

Keywords

Comments

Perfect powers (A001597) are numbers with a proper integer root, the complement of A007916.
Is this sequence finite?
The Redmond-Sun conjecture (see A308658) implies that this sequence is finite. - Pontus von Brömssen, Nov 05 2024

Examples

			Primes 9 and 10 are 23 and 29, and the interval (24,25,26,27,28) contains two perfect powers (25,27), so 9 is in the sequence.
		

Crossrefs

For powers of 2 see A013597, A014210, A014234, A188951, A244508, A377467.
For no prime-powers we have A377286, ones in A080101.
For a unique prime-power we have A377287.
For squarefree numbers see A377430, A061398, A377431, A068360, A224363.
These are the positions of terms > 1 in A377432.
For a unique perfect power we have A377434.
For no perfect powers we have A377436.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A046933 counts the interval from A008864(n) to A006093(n+1).
A081676 gives the greatest perfect power <= n.
A131605 lists perfect powers that are not prime-powers.
A246655 lists the prime-powers not including 1, complement A361102.
A366833 counts prime-powers between primes, see A053607, A304521.
A377468 gives the least perfect power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[100],Count[Range[Prime[#]+1, Prime[#+1]-1],_?perpowQ]>1&]
  • Python
    from itertools import islice
    from sympy import prime
    from gmpy2 import is_power, next_prime
    def A377466_gen(startvalue=1): # generator of terms >= startvalue
        k = max(startvalue,1)
        p = prime(k)
        while (q:=next_prime(p)):
            c = 0
            for i in range(p+1,q):
                if is_power(i):
                    c += 1
                    if c>1:
                        yield k
                        break
            k += 1
            p = q
    A377466_list = list(islice(A377466_gen(),9)) # Chai Wah Wu, Nov 04 2024

Formula

a(n) = A000720(A116086(n)) = A000720(A116455(n)) for n <= 10. This would hold for all n if there do not exist more than two perfect powers between any two consecutive primes, which is implied by the Redmond-Sun conjecture. - Pontus von Brömssen, Nov 05 2024

Extensions

a(10) from Pontus von Brömssen, Nov 04 2024

A375714 Positions of non-successions of consecutive non-perfect-powers. Numbers k such that the k-th non-perfect-power is at least two fewer than the next.

Original entry on oeis.org

2, 5, 11, 19, 20, 24, 27, 39, 53, 69, 87, 107, 110, 112, 127, 151, 177, 196, 204, 221, 233, 265, 299, 317, 334, 372, 412, 454, 481, 497, 543, 591, 641, 693, 747, 803, 861, 921, 959, 982, 1046, 1112, 1180, 1250, 1284, 1321, 1395, 1471, 1549, 1629, 1675, 1710
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.

Examples

			The initial non-perfect-powers are 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, which increase by more than one after term 2, term 5, term 11, etc.
		

Crossrefs

First differences are A375702.
Positions of terms > 1 in A375706 (differences of A007916).
The complement for non-prime-powers is A375713, differences A373672.
The complement is A375740.
The version for non-prime-powers is A375928, differences A110969.
Prime-powers inclusive:
- terms: A000961
- differences: A057820
Non-prime-powers inclusive:
- terms: A361102
- differences: A375708

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    ce=Select[Range[100],radQ];
    Select[Range[Length[ce]-1],!ce[[#+1]]==ce[[#]]+1&]
  • Python
    from itertools import count, islice
    from sympy import perfect_power
    def A375714_gen(): # generator of terms
        a, b = -1, 0
        for n in count(1):
            c = not perfect_power(n)
            if c:
                a += 1
            if b&(c^1):
                yield a
            b = c
    A375714_list = list(islice(A375714_gen(),52)) # Chai Wah Wu, Sep 11 2024

Formula

A007916(a(n)+1) - A007916(a(n)) > 1.

A375713 Indices of consecutive non-prime-powers (A361102) differing by 1. Numbers k such that the k-th and (k+1)-th non-prime-powers differ by just one.

Original entry on oeis.org

5, 8, 9, 15, 16, 17, 19, 20, 23, 24, 27, 28, 30, 31, 32, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 67, 68, 71, 72, 74, 75, 76, 77, 78, 79, 81, 82, 85, 87, 88, 89, 90, 93, 94, 95, 96, 97, 98, 99, 100, 103, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Sep 02 2024

Keywords

Examples

			The initial non-prime-powers are 1, 6, 10, 12, 14, 15, 18, 20, 21, which first increase by one after the fifth and eighth terms.
		

Crossrefs

The inclusive version is a(n) - 1.
For prime-powers inclusive (A000961) we have A375734, differences A373671.
For nonprime numbers (A002808) we have A375926, differences A373403.
For prime-powers exclusive (A246655) we have A375734(n+1) + 1.
First differences are A373672.
Positions of 1's in A375708.
For non-perfect-powers we have A375740.
Prime-powers inclusive:
- terms: A000961
- differences: A057820
Non-prime-powers inclusive:
- terms: A361102
- differences: A375708
A000040 lists all of the primes, differences A001223.
A007916 lists non-perfect-powers, differences A375706.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],!PrimePowerQ[#]&]],1]

Formula

A361102(k+1) - A361102(k) = 1.

A375929 Numbers k such that A002808(k+1) = A002808(k) + 1. In other words, the k-th composite number is 1 less than the next.

Original entry on oeis.org

3, 4, 7, 8, 11, 12, 14, 15, 16, 17, 20, 21, 22, 23, 25, 26, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 43, 44, 45, 46, 48, 49, 52, 53, 54, 55, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 72, 73, 76, 77, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Gus Wiseman, Sep 12 2024

Keywords

Comments

Positions of 1's in A073783 (see also A054546, A065310).

Examples

			The composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after positions 3, 4, 7, 8, ...
		

Crossrefs

Positions in A002808 of each element of A068780.
The complement is A065890 shifted.
First differences are A373403 (except first).
The version for non-prime-powers is A375713, differences A373672.
The version for prime-powers is A375734, differences A373671.
The version for non-perfect-powers is A375740.
The version for nonprime numbers is A375926.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprime numbers, differences A065310.
A046933 counts composite numbers between primes.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],CompositeQ]],1]
  • Python
    from sympy import primepi
    def A375929(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+bisection(lambda y:primepi(x+2+y))-2
        return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
    
  • Python
    # faster for initial segment of sequence
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        pic, prevc = 0, -1
        for i in count(4):
            if not isprime(i):
                if i == prevc + 1:
                    yield pic
                pic, prevc = pic+1, i
    print(list(islice(agen(), 10000))) # Michael S. Branicky, Sep 17 2024

Formula

a(n) = A375926(n) - 1.

A375734 Indices of consecutive prime-powers (exclusive) differing by 1. Positions of 1's in A057820.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 17, 43, 70, 1077, 6635, 12369, 43578, 105102700
Offset: 1

Views

Author

Gus Wiseman, Sep 04 2024

Keywords

Comments

The corresponding prime-powers A246655(a(n)) are given by A006549.
From A006549, it is not known whether this sequence is infinite.

Examples

			The fifth prime-power is 7 and the sixth is 8, so 5 is in the sequence.
		

Crossrefs

For nonprime numbers (A002808) we have A375926, differences A373403.
Positions of 1's in A057820.
First differences are A373671.
For nonsquarefree numbers we have A375709, differences A373409.
For non-prime-powers we have A375713.
For non-perfect-powers we have A375740.
For squarefree numbers we have A375927, differences A373127.
Prime-powers:
- terms: A000961, complement A024619.
- differences: A057820.
- anti-runs: A373576, A120430, A006549, A373671
Non-prime-powers:
- terms: A361102
- differences: A375708
- anti-runs: A373679, A373575, A255346, A373672
A000040 lists all of the primes, differences A001223.
A025528 counts prime-powers up to n.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],PrimePowerQ]],1]

Formula

Numbers k such that A246655(k+1) - A246655(k) = 1.
The inclusive version is a(n) + 1 shifted.

Extensions

a(14) from Amiram Eldar, Sep 24 2024

A375926 Numbers k such that A018252(k+1) = A018252(k) + 1. In other words, the k-th nonprime number is 1 less than the next.

Original entry on oeis.org

4, 5, 8, 9, 12, 13, 15, 16, 17, 18, 21, 22, 23, 24, 26, 27, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 44, 45, 46, 47, 49, 50, 53, 54, 55, 56, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 73, 74, 77, 78, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Gus Wiseman, Sep 11 2024

Keywords

Examples

			The nonprime numbers are 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after term 4, term 5, term 8, etc.
		

Crossrefs

The complement appears to be A014689, except the first term.
Positions of 1's in A065310 (see also A054546, A073783).
First differences are A373403 (except first).
The version for non-prime-powers is A375713, differences A373672.
The version for prime-powers is A375734, differences A373671.
The version for non-perfect-powers is A375740.
The version for composite numbers is A375929.
A000040 lists the prime numbers, differences A001223.
A018252 lists the nonprimes, exclusive A002808.
A046933 counts composite numbers between primes.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],!PrimeQ[#]&]],1]
  • Python
    from sympy import primepi
    def A375926(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+bisection(lambda y:primepi(x+1+y))-1
        return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
Showing 1-10 of 15 results. Next