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

A336175 Numbers k such that there are no powerful numbers between k^2 and (k+1)^2.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 12, 13, 17, 21, 23, 24, 26, 27, 30, 32, 34, 35, 38, 40, 43, 47, 49, 54, 60, 61, 64, 66, 68, 69, 71, 75, 80, 81, 85, 86, 91, 95, 97, 99, 105, 106, 108, 112, 120, 123, 125, 128, 131, 133, 136, 137, 139, 142, 143, 151, 153, 154, 159, 160, 162, 163
Offset: 1

Views

Author

Amiram Eldar, Jul 10 2020

Keywords

Comments

Positions of 0's in A119241.
Shiu (1980) proved that this sequence has an asymptotic density 0.2759... A more accurate calculation using his formula gives 0.275965511407718981...

Examples

			1 is a term since the two numbers between 1^2 = 1 and (1+1)^2 = 4, 2 and 3, are not powerful.
2 is not a term since there is a powerful number, 8 = 2^3, between 2^2 = 4 and (2+1)^2 = 9.
		

References

  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, chapter VI, p. 226.

Crossrefs

Programs

  • Mathematica
    powQ[n_] := (n == 1) || Min @@ FactorInteger[n][[;; , 2]] > 1; Select[Range[150], ! AnyTrue[Range[#^2 + 1, (# + 1)^2 - 1], powQ] &]
  • PARI
    is(n)=forfactored(k=n^2+1,n^2+2*n, if(ispowerful(k), return(0))); 1 \\ Charles R Greathouse IV, Oct 31 2022
    
  • Python
    from functools import lru_cache
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A336175(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 kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        @lru_cache(maxsize=None)
        def g(x):
            c, l = 0, 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)
            c += squarefreepi(integer_nthroot(x,3)[0])-l
            return c
        def f(x):
            c, a = n+x, 1
            for k in range(1,x+1):
                b = g((k+1)**2)
                if b == a+1:
                    c -= 1
                a = b
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 14 2024

Formula

a(n) ~ k*n, where k = 3.623641211175... is the inverse of the density, see Shiu link. - Charles R Greathouse IV, Oct 31 2022

A338389 Numbers k such that there are exactly two biquadratefree powerful numbers (A338325) between k^2 and (k+1)^2.

Original entry on oeis.org

14, 31, 67, 72, 82, 93, 98, 110, 132, 140, 156, 172, 189, 192, 223, 240, 257, 281, 285, 322, 347, 368, 379, 407, 410, 414, 426, 441, 455, 468, 472, 481, 488, 514, 515, 517, 524, 525, 537, 551, 555, 574, 579, 602, 613, 664, 680, 693, 702, 703, 737, 743, 749, 755
Offset: 1

Views

Author

Amiram Eldar, Oct 23 2020

Keywords

Comments

Positions of 2's in A338326.
The asymptotic density of this sequence is 0.058757863... (Dehkordi, 1998).

Examples

			14 is a term since there are exactly two biquadratefree powerful numbers, 200 = 2*3 * 5^2 and 216 = 2^3 * 3^3, between 14^2 = 196 and (14+1)^2 = 225.
		

Crossrefs

Programs

  • Mathematica
    bqfpowQ[n_] := AllTrue[FactorInteger[n][[;; , 2]], MemberQ[{2, 3}, #] &]; Select[Range[800], Count[Range[#^2 + 1, (# + 1)^2 - 1], _?bqfpowQ] == 2 &]

A336176 Numbers k such that there is a single powerful number between k^2 and (k+1)^2.

Original entry on oeis.org

2, 8, 10, 15, 16, 18, 19, 20, 28, 29, 37, 39, 41, 42, 45, 48, 50, 51, 52, 53, 56, 57, 59, 63, 65, 74, 76, 77, 78, 79, 83, 84, 87, 89, 90, 92, 94, 100, 101, 102, 107, 113, 114, 115, 116, 117, 118, 119, 121, 122, 126, 127, 130, 134, 138, 141, 144, 146, 147, 148
Offset: 1

Views

Author

Amiram Eldar, Jul 10 2020

Keywords

Comments

Positions of 1's in A119241.
Shiu (1980) proved that this sequence has an asymptotic density 0.3955... A more accurate calculation using his formula gives 0.3955652153962362...
1 is the most common value of A119241.

Examples

			2 is a term since there is a single powerful number, 8 = 2^3, between 2^2 = 4 and (2+1)^2 = 9.
		

References

  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, chapter VI, p. 226.

Crossrefs

Programs

  • Mathematica
    powQ[n_] := (n == 1) || Min @@ FactorInteger[n][[;; , 2]] > 1; Select[Range[150], Count[Range[#^2 + 1, (# + 1)^2 - 1], _?powQ] == 1 &]

A336178 Numbers k such that there are exactly three powerful numbers between k^2 and (k+1)^2.

Original entry on oeis.org

31, 36, 67, 93, 132, 140, 145, 161, 166, 189, 192, 220, 223, 265, 280, 290, 296, 311, 316, 322, 364, 384, 407, 468, 537, 576, 592, 602, 623, 639, 644, 656, 659, 661, 670, 690, 722, 769, 771, 793, 828, 883, 888, 890, 896, 950, 961, 981, 984, 987, 992, 995, 1018
Offset: 1

Views

Author

Amiram Eldar, Jul 10 2020

Keywords

Comments

Positions of 3's in A119241.
Shiu (1980) proved that this sequence has an asymptotic density = 0.0770... A more accurate calculation using his formula gives 0.0770742722233...

Examples

			31 is a term since there are exactly three powerful numbers, 968 = 2^3 * 11^2, 972 = 2^2 * 3^5 and 1000 = 2^3 * 5^3 between 31^2 = 961 and (31+1)^2 = 1024.
		

References

  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, chapter VI, p. 226.

Crossrefs

Programs

  • Mathematica
    powQ[n_] := (n == 1) || Min @@ FactorInteger[n][[;; , 2]] > 1; Select[Range[1000], Count[Range[#^2 + 1, (# + 1)^2 - 1], _?powQ] == 3 &]
  • Python
    from functools import lru_cache
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A336178(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 kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        @lru_cache(maxsize=None)
        def g(x):
            c, l = 0, 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)
            c += squarefreepi(integer_nthroot(x,3)[0])-l
            return c
        def f(x):
            c, a = n+x, 1
            for k in range(1,x+1):
                b = g((k+1)**2)
                if b == a+4:
                    c -= 1
                a = b
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 14 2024
Showing 1-4 of 4 results.