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 13 results. Next

A361098 Intersection of A360765 and A360768.

Original entry on oeis.org

36, 48, 50, 54, 72, 75, 80, 96, 98, 100, 108, 112, 135, 144, 147, 160, 162, 189, 192, 196, 200, 216, 224, 225, 240, 242, 245, 250, 252, 270, 288, 294, 300, 320, 324, 336, 338, 350, 352, 360, 363, 375, 378, 384, 392, 396, 400, 405, 416, 432, 441, 448, 450, 468, 480, 484, 486, 490, 500, 504, 507, 525
Offset: 1

Views

Author

Michael De Vlieger, Mar 15 2023

Keywords

Comments

Numbers k that are neither prime powers nor squarefree, such that rad(k) * A053669(k) < k and k/rad(k) >= A119288(k), where rad(k) = A007947(k).
Numbers k such that A360480(k), A360543(k), A361235(k), and A355432(k) are positive.
Subset of A126706. All terms are neither prime powers nor squarefree.
From Michael De Vlieger, Aug 03 2023: (Start)
Superset of A286708 = A001694 \ {{1} U A246547}, which in turn is a superset of A303606. We may write k in A286708 as m*rad(k)^2, m >= 1. Since omega(k) > 1, it is clear both k/rad(k) > A053669(k) and k/rad(k) >= A119288(k). Also superset of A359280 = A286708 \ A303606.
This sequence contains {A002182 \ A168263}. (End)

Examples

			For prime p, A360480(p) = A360543(p) = A361235(p) = A355432(p) = 0, since k < p is coprime to p.
For prime power n = p^e > 4, e > 0, A360543(n) = p^(e-1) - e, but A360480(n) = A361235(n) = A355432(n) = 0, since the other sequences require omega(n) > 1.
For squarefree composite n, A360480(n) >= 1 and A361235(n) >= 1 (the latter for n > 6), but A360543(n) = A355432(n) = 0, since the other sequences require at least 1 prime power factor p^e | n with e > 0.
For n = 18, A360480(n) = | {10, 14, 15} | = 3,
            A360543(n) = | {} | = 0,
            A361235(n) = | {4, 8, 16} | = 3,
            A355432(n) = | {12} | = 1.
Therefore 18 is not in the sequence.
For n = 36, A360480(n) = | {10, 14, 15, 20, 21, 22, 26, 28, 33, 34} | = 10,
            A360543(n) = | {30} | = 1,
            A361235(n) = | {8, 16, 27, 32} | = 4,
            A355432(n) = | {24} | = 1.
Therefore 36 is the smallest term in the sequence.
Table pertaining to the first 12 terms:
Key: a = A360480, b = A360543, c = A243823; d = A361235, e = A355432, f = A243822;
g = A046753 = f + c, tau = A000005, phi = A000010.
    n |  a + b =  c | d + e = f | g + tau + phi - 1 =  n
  ------------------------------------------------------
   36 | 10 + 1 = 11 | 4 + 1 = 5 | 16 +  9 + 12 - 1 =  36
   48 | 16 + 2 = 18 | 3 + 2 = 5 | 23 + 10 + 16 - 1 =  48
   50 | 18 + 1 = 19 | 4 + 2 = 6 | 25 +  6 + 20 - 1 =  50
   54 | 19 + 2 = 21 | 4 + 4 = 8 | 29 +  8 + 18 - 1 =  54
   72 | 27 + 4 = 31 | 4 + 2 = 6 | 37 + 12 + 24 - 1 =  72
   75 | 25 + 2 = 27 | 2 + 1 = 3 | 30 +  6 + 40 - 1 =  75
   80 | 32 + 3 = 35 | 3 + 1 = 4 | 39 + 10 + 32 - 1 =  80
   96 | 38 + 7 = 45 | 4 + 4 = 8 | 53 + 12 + 32 - 1 =  96
   98 | 41 + 3 = 44 | 5 + 2 = 7 | 51 +  6 + 42 - 1 =  98
  100 | 42 + 4 = 46 | 4 + 2 = 6 | 52 +  9 + 40 - 1 = 100
  108 | 44 + 8 = 52 | 5 + 4 = 9 | 61 + 12 + 36 - 1 = 108
  112 | 48 + 3 = 51 | 3 + 1 = 4 | 55 + 10 + 48 - 1 = 112
		

Crossrefs

Programs

  • Mathematica
    nn = 2^16;
    a053669[n_] := If[OddQ[n], 2, p = 2; While[Divisible[n, p], p = NextPrime[p]]; p];
    s = Select[Range[nn], Nor[PrimePowerQ[#], SquareFreeQ[#]] &];
    Reap[ Do[n = s[[j]];
        If[And[#1*a053669[n] < n, n/#1 >= #2] & @@ {Times @@ #, #[[2]]} &@
          FactorInteger[n][[All, 1]], Sow[n]], {j, Length[s]}]][[-1, -1]]

A365308 Powers of primorials P(k)^m, k > 1, m > 1, where P(k) = A002110(k).

Original entry on oeis.org

36, 216, 900, 1296, 7776, 27000, 44100, 46656, 279936, 810000, 1679616, 5336100, 9261000, 10077696, 24300000, 60466176, 362797056, 729000000, 901800900, 1944810000, 2176782336, 12326391000, 13060694016, 21870000000, 78364164096, 260620460100, 408410100000, 470184984576
Offset: 1

Views

Author

Michael De Vlieger, Oct 02 2023

Keywords

Comments

Proper subset of A303606, in turn a proper subset of A286708, in turn a proper subset of A126706.
Numbers in A322793 that are not powers of 2.

Examples

			Terms less than 10^4 include P(2)^2 = 36, P(2)^3 = 216, P(2)^4 = 1296, P(2)^5 = 7776, and P(3)^2 = 900.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^39; k = 2; P = 6; Union@ Reap[While[j = 2; While[P^j < nn, Sow[P^j]; j++]; j > 2, k++; P *= Prime[k]] ][[-1, 1]]

Formula

Intersection of A100778 and A303606.
This sequence is {A325374 \ {A002110 \ {1,2}}} = {A322793 \ {A000079 \ {1,2}}}.
Sum_{n>=1} 1/a(n) = Sum_{k>=2} 1/(P(k)*(P(k)-1)) = 0.03450573145072369022... . - Amiram Eldar, Mar 10 2024

A359280 Powerful numbers that are neither prime powers nor powers of squarefree composites.

Original entry on oeis.org

72, 108, 144, 200, 288, 324, 392, 400, 432, 500, 576, 648, 675, 784, 800, 864, 968, 972, 1125, 1152, 1323, 1352, 1372, 1568, 1600, 1728, 1800, 1936, 1944, 2000, 2025, 2304, 2312, 2500, 2592, 2700, 2704, 2888, 2916, 3087, 3136, 3200, 3267, 3456, 3528, 3600, 3872, 3888, 3969
Offset: 1

Views

Author

Michael De Vlieger, Aug 01 2023

Keywords

Comments

Numbers k such that omega(k) > 1 and for prime power factors p^e | k, multiplicities e > 1, yet the multiplicities are not equal.
Subset of A286708, which in turn is a subset of A361098, itself a subset of A126706, the sequence of numbers neither squarefree nor prime powers.
Since A001694 = Union({1}, A246547, A286708), this sequence is a subset of A001694.

Examples

			Let b(n) = A286708(n).
b(1) = 36 is not in the sequence since rad(36) = A007947(36) = 6, and 36 = 6^2.
b(2) = a(1) = 72 since 72 is not a perfect power of rad(72).
b(3) = 100 = rad(100)^2 = 10^2, so it is not in the sequence.
b(4) = a(2) = 108, since 108 is not a perfect power of rad(108) = 6.
b(5) = a(3) = 144, since 144 is not a perfect power of rad(144) = 6.
b(6) = 196 is not in the sequence since 196 = rad(196)^2 = 14^2, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 5000; s = Rest@ Select[Union@ Flatten@Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], Not@*PrimePowerQ]; Select[s, !SameQ @@ FactorInteger[#][[All, -1]] &]
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A359280(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            j = isqrt(x)
            c, l = n+x+3-(y:=x.bit_length())+squarefreepi(j)+sum(squarefreepi(integer_nthroot(x, k)[0]) for k in range(4, y)), 0
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            return c+l
        return bisection(f,n,n) # Chai Wah Wu, Feb 09 2025

Formula

This sequence is A286708 \ A303606.
Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6) - Sum_{k>=2} (zeta(k)/zeta(2*k) - 1) - 1 = 0.094962568855... . - Amiram Eldar, Dec 09 2023

A364996 Union of A360767 and A363082.

Original entry on oeis.org

12, 18, 20, 24, 28, 40, 44, 45, 52, 56, 60, 63, 68, 76, 84, 88, 90, 92, 99, 104, 116, 117, 120, 124, 126, 132, 136, 140, 148, 150, 152, 153, 156, 164, 168, 171, 172, 175, 176, 180, 184, 188, 198, 204, 207, 208, 212, 220, 228, 232, 234, 236, 244, 248, 260, 261
Offset: 1

Views

Author

Michael De Vlieger, Aug 26 2023

Keywords

Examples

			This sequence is A126706 \ A361098.
Union of A364997, A364998, A364999.
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Range[261], Nor[PrimePowerQ[#], SquareFreeQ[#]] &], Function[{k, f}, Function[{p, q, r}, Or[p r > k, q r > k]] @@ {f[[2, 1]], SelectFirst[Prime@ Range[PrimePi[f[[-1, 1]]] + 1], ! Divisible[k, #] &], Times @@ f[[All, 1]]}] @@ {#, FactorInteger[#]} &]

A303661 Powers of squarefree semiprimes that are not squarefree.

Original entry on oeis.org

36, 100, 196, 216, 225, 441, 484, 676, 1000, 1089, 1156, 1225, 1296, 1444, 1521, 2116, 2601, 2744, 3025, 3249, 3364, 3375, 3844, 4225, 4761, 5476, 5929, 6724, 7225, 7396, 7569, 7776, 8281, 8649, 8836, 9025, 9261, 10000, 10648, 11236, 12321, 13225, 13924, 14161, 14884
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 28 2018

Keywords

Examples

			1089 is in the sequence because 1089 = 3^2*11^2.
1296 is in the sequence because 1296 = 2^4*3^4.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[15000], Length[Union[FactorInteger[#][[All, 2]]]] == 1 && PrimeNu[#] == 2 && ! SquareFreeQ[#] &]
    seq[max_] := Module[{sp = Select[Range[Floor@Sqrt[max]], SquareFreeQ[#] && PrimeNu[#] == 2 &], s = {}}, Do[s = Join[s, sp[[k]]^Range[2, Floor@Log[sp[[k]], max]]], {k, 1, Length[sp]}]; Union@s]; seq[10000] (* Amiram Eldar, Feb 12 2021 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A303661(n):
        def g(x): return int(-(t:=primepi(s:=isqrt(x)))-(t*(t-1)>>1)+sum(primepi(x//k) for k in primerange(1, s+1)))
        def f(x): return n-1+x-sum(g(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length()))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/((A006881(n)-1)*A006881(n)) = Sum_{k>=2} (P(k)^2 - P(2*k))/2 = 0.07160601536406295068..., where P(k) is the prime zeta function. - Amiram Eldar, Feb 12 2021

A363596 a(n) = (Product_{k=1..pi(n+1)} prime(k)^floor(n/(prime(k)-1) ) )/(n+1)!.

Original entry on oeis.org

1, 1, 2, 1, 6, 2, 12, 3, 10, 2, 12, 2, 420, 60, 24, 3, 90, 10, 420, 42, 660, 60, 360, 30, 3276, 252, 56, 4, 120, 8, 3696, 231, 3570, 210, 36, 2, 103740, 5460, 840, 42, 13860, 660, 27720, 1260, 19320, 840, 5040, 210, 198900, 7956, 10296, 396, 11880, 440, 6384, 228
Offset: 0

Views

Author

Michael De Vlieger, Aug 03 2023

Keywords

Comments

Motivated by Proposition 3.2, p. 10 of the Bedhouche-Farhi paper.
Observations regarding prime power decomposition of terms in a(0..20737):
For n > 300, most terms are in A361098 but not in A286708. A303606 is a subset of A286708, which is a subset of A361098, which in turn is a subset of A126706, numbers that are neither prime powers nor squarefree.
a(34) = 36 is the only term in A286708 (more specifically, in A303606).
a(35) = 2 is the last prime term.
a(29) = 8 is the only composite prime power.
a(190) = 221760 is the last term in A002182, but a(61) = a(102) = 720720 is the largest.
a(191) = 2310 is the last primorial term.
a(1055) = 2207550414530882190 is the last squarefree term. If there are further squarefree terms a(n), n is likely to belong to -1 (mod 24).
a(7055) = 1733187515208453605856007490304335826298500960 is the last term that is not in A361098. a(n) not in A361098 is likely to belong to -1 (mod 24).

Examples

			The table below relates b(n) = A091137(n) to a(n), with (n+1)!*a(n) = k!*m = b(n), where k! is the largest factorial that divides b(n).
 n  A067255(b(n)) (n+1)!*a(n)   k! * m
---------------------------------------
 0  0                1! * 1     1! * 1
 1  1                2! * 1     2! * 1
 2  2.1              3! * 2     3! * 2
 3  3.1              4! * 1     4! * 1
 4  4.2.1            5! * 6     6! * 1
 5  5.2.1            6! * 2     6! * 2
 6  6.3.1.1          7! * 12    7! * 12
 7  7.3.1.1          8! * 3     8! * 3
 8  8.4.2.1          9! * 10   10! * 1
 9  9.4.2.1         10! * 2    10! * 2
10  10.5.2.1.1      11! * 12   12! * 1
11  11.5.2.1.1      12! * 2    12! * 2
12  12.6.3.2.1.1    13! * 420  15! * 2
13  13.6.3.2.1.1    14! * 60   15! * 4
14  14.7.3.2.1.1    15! * 24   15! * 24
15  15.7.3.2.1.1    16! * 3    16! * 3
16  16.8.4.2.1.1.1  17! * 90   18! * 5
...
		

Crossrefs

Programs

  • Mathematica
    Table[j = 1; ( Times @@ Reap[While[Sow[#^Floor[n/(# - 1)]] &[Prime[j]] > 1, j++]][[-1, 1]] )/Factorial[n + 1], {n, 0, 60}]
  • Python
    from math import prod, factorial
    from sympy import sieve
    def A363596(n: int) -> int:
        numer = prod(p ** (n // (p - 1)) for p in sieve.primerange(2, n + 2))
        return numer // factorial(n + 1)
    print([A363596(n) for n in range(56)])  # Peter Luschny, Aug 17 2025

Formula

a(n) = A091137(n)/(n+1)!.

A365436 a(2^k) = 2^k for all k >= 0. let 2^r be the smallest power of 2 which exceeds n, then a(n) = the least novel m*a(k), where k = 2^r-n, and m is not a prior term.

Original entry on oeis.org

1, 2, 3, 4, 15, 10, 5, 8, 30, 60, 90, 24, 18, 12, 6, 16, 42, 84, 126, 168, 630, 420, 210, 56, 35, 70, 105, 28, 21, 14, 7, 32, 63, 154, 189, 252, 945, 770, 315, 504, 1890, 3780, 5670, 1512, 1134, 756, 378, 144, 54, 108, 162, 216, 810, 540, 270, 72, 45, 110, 135
Offset: 1

Views

Author

David James Sycamore, Nov 09 2023

Keywords

Comments

Based on a recursion similar to that which produces the Doudna sequence, A005940, (using the least power of 2 exceeding n rather than the greatest power of 2 not exceeding n). All 2^(n-1) terms between between fixed points 2^n and 2^(n+1) are multiples m*a(k) of m, the least unused term, and m is a(2^(k+1)-1).
Conjectured to be a permutation of the positive integers.
From David A. Corneth, Nov 11 2023: (Start)
This is a permutation of the positive integers.
To prove this we'll show that each integer occurs at most once and at least once hence exactly once.
By definition (...a(n) = the least novel...) each positive integer occurs at most once.
Now suppose t is the smallest term not in the sequence. Then there exists u such that a(1)..a(u) contain the positive integers from 1 through t-1. Then a(i) = t for some 1 <= i <= 2^e - 1 where 2^e - 1 >= u. If a(i) != t for 1 <= i <= 2^e-2 then a(2^e - 1) = t as then k = 1, a(k) = 1 and m is not a prior term (t did not occur earlier).
Hence t occurs at least once. As it also occurs at most once every positive integer occurs exactly once and this sequence is a permutation of the positive integers. (End)

Examples

			a(3) = 3 since k = 1, a(1) = 1  and 3 is the smallest number which is not already a term.
a(5) = 15 since k = 8-5 = 3, a(3) = 3 and 5 is the smallest number which is not already a term.
a(31) = 7, the least unused term at this point in the sequence.
		

Crossrefs

Programs

  • Mathematica
    nn = 120;  c[] := False; c[1] = True; m[] := 1; a[1] = 1; c[1] = True;
     Do[If[IntegerQ[#],
          Set[k, i],
           While[Or[c[m[#]], c[Set[k, # m[#]]]], m[#]++] &[
             a[2^Floor[# + 1] - i]]] &@ Log2[i];
          Set[{a[i], c[k]}, {k, True}], {i, nn}];
      Array[a, nn] (* Michael De Vlieger, Nov 13 2023 *)
  • PARI
    \\ See PARI link

A366854 Powers k^m such that k is neither squarefree nor prime powers, and m > 1.

Original entry on oeis.org

144, 324, 400, 576, 784, 1296, 1600, 1728, 1936, 2025, 2304, 2500, 2704, 2916, 3136, 3600, 3969, 4624, 5184, 5625, 5776, 5832, 6400, 7056, 7744, 8000, 8100, 8464, 9216, 9604, 9801, 10000, 10816, 11664, 12544, 13456, 13689, 13824, 14400, 15376, 15876, 17424, 18225
Offset: 1

Views

Author

Michael De Vlieger, Jan 01 2024

Keywords

Comments

Analogous to A303606 = { k^m : Omega(k) = omega(k) > 1, m > 1 }, i.e., squarefree composite k (in A120944) raised to m > 1. Proper subset of A131605, itself a proper subset of A286708, which is in turn a proper subset of A126706. This sequence does not intersect Achilles numbers A052486.

Examples

			Let b(n) = A126706(n).
a(1) = b(1)^2 = 12^2 = 144. Since 144 = 2^4*3^2, it is both powerful and a perfect power.
a(2) = b(2)^2 = 18^2 = 324.
a(3) = b(3)^2 = 20^2 = 400.
a(8) = b(1)^3 = 12^3 = 1728, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 20000; i = 1; k = 2;
    MapIndexed[Set[S[First[#2]], #1] &,
      Select[Range@ Sqrt[nn], Nor[SquareFreeQ[#], PrimePowerQ[#]] &] ];
    Union@ Reap[
      While[j = 2;
        While[S[i]^j < nn, Sow[S[i]^j]; j++]; j > 2,
        k++; i++] ][[-1, 1]]

Formula

This sequence is A126706(i)^m, m > 1.
A131605 = union of {1}, A303606, and {a(n)}.
A286708 = union of A303606, {a(n)}, and A052486.
A001597 = union of {1}, A246547, A303606, and {a(n)}.
A001694 = union of A246547, A303606, {a(n)}, and A052486.

A383018 Numbers k such that A008683(k) = 0 and A382883(k) = -1.

Original entry on oeis.org

36, 64, 100, 196, 216, 225, 441, 484, 676, 729, 1000, 1024, 1089, 1156, 1225, 1444, 1521, 2116, 2601, 2744, 3025, 3249, 3364, 3375, 3844, 4225, 4761, 5476, 5929, 6724, 7225, 7396, 7569, 7776, 8281, 8649, 8836, 9025, 9261, 10648, 11236, 12321, 13225, 13924, 14161
Offset: 1

Views

Author

Peter Luschny, Apr 14 2025

Keywords

Comments

See the comments in A382883.

Crossrefs

Programs

  • Mathematica
    V[n_, e_] := If[e == 1, 1, IntegerExponent[n, e]]; f[n_] := f[n] = -DivisorSum[n, V[n, #] * f[#] &, # < n &]; f[1] = 1; Select[Range[15000], !SquareFreeQ[#] && f[#] == -1 &] (* Amiram Eldar, Apr 29 2025 *)
  • SageMath
    print([n for n in range(1, 14444) if moebius(n) == 0 and A382883(n) == -1])

Formula

Subsequence of A383105.

A383394 Perfect powers of Achilles numbers.

Original entry on oeis.org

5184, 11664, 40000, 82944, 153664, 186624, 250000, 373248, 419904, 455625, 640000, 746496, 937024, 944784, 1259712, 1265625, 1327104, 1750329, 1827904, 1882384, 2458624, 3240000, 3779136, 4000000, 5345344, 6718464, 7290000, 8000000, 8340544, 9529569, 10240000
Offset: 1

Views

Author

Michael De Vlieger, Aug 01 2025

Keywords

Comments

Proper subset of A131605, where A286708 is the union of A131605 and A052486. Therefore these are both powerful numbers and perfect powers, unlike Achilles numbers themselves.
Proper subset of A366854.
This sequence does not intersect A303606, also a proper subset of A131605.

Examples

			Table of n, a(n) for n = 1..12:
 n      a(n)
--------------------------------
 1     5184 =  72^2 = 2^6  * 3^4
 2    11664 = 108^2 = 2^4  * 3^6
 3    40000 = 200^2 = 2^6  * 5^4
 4    82944 = 288^2 = 2^10 * 3^4
 5   153664 = 392^2 = 2^6  * 7^4
 6   186624 = 432^2 = 2^8  * 3^6
 7   250000 = 500^2 = 2^4  * 5^6
 8   373248 =  72^3 = 2^9  * 3^6
 9   419904 = 648^2 = 2^6  * 3^8
10   455625 = 675^2 = 3^6  * 5^4
11   640000 = 800^2 = 2^10 * 5^4
12   746496 = 864^2 = 2^10 * 3^6
		

Crossrefs

Programs

  • Mathematica
    nn = 2^24; mm = Sqrt[nn]; i = 1; k = 2; MapIndexed[Set[S[First[#2]], #1] &, Rest@ Select[Union@ Flatten@ Table[a^2*b^3, {b, Surd[mm, 3]}, {a, Sqrt[mm/b^3]}], GCD @@ FactorInteger[#][[;; , -1]] == 1 &]]; Union@ Reap[While[j = 2; While[S[i]^j < nn, Sow[S[i]^j]; j++]; j > 2, k++; i++] ][[-1, 1]]
  • Python
    from math import isqrt
    from sympy import integer_nthroot, mobius
    def A383394(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while f(kmin) < kmin: kmin >>= 1		
            kmin = max(kmin,kmax >> 1)
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x):
            c, l = squarefreepi(integer_nthroot(x,3)[0])+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length()))-1, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c += j*(w-l)
                l, j = w, isqrt(x//k2**3)
            return c-l
        def f(x): return n+x-sum(g(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length()))
        return bisection(f,n,n) # Chai Wah Wu, Aug 11 2025
Showing 1-10 of 13 results. Next