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.

A371190 The smaller of a pair of successive powerful numbers without a nonsquarefree number between them.

Original entry on oeis.org

1, 4, 8, 25, 32, 288, 675, 968, 1152, 1369, 2700, 9800, 12167, 39200, 48668, 70225, 235224, 332928, 465124, 1331712, 1825200, 5724500, 7300800, 11309768, 78960996, 189750625, 263672644, 384199200, 592192224, 912670088, 1536796800, 2368768896, 4931691075, 5425069447, 8957108164
Offset: 1

Views

Author

Amiram Eldar, Mar 14 2024

Keywords

Examples

			1 is a term since 1 and 4 are successive powerful numbers and the numbers between them, 2 and 3, are both squarefree.
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := Module[{pows = Union[Flatten[Table[i^2*j^3, {j, 1, Surd[max, 3]}, {i, 1, Sqrt[max/j^3]}]]], s = {}}, Do[If[AllTrue[Range[pows[[k]] + 1, pows[[k + 1]] - 1], SquareFreeQ], AppendTo[s, pows[[k]]]], {k, 1, Length[pows] - 1}]; s]; seq[10^10]
  • PARI
    lista(mx) = {my(s = List(), is); for(j = 1, sqrtnint(mx, 3), for(i = 1, sqrtint(mx\j^3), listput(s, i^2 * j^3))); s = Set(s); for(i = 1, #s - 1, is = 1; for(k = s[i]+1, s[i+1]-1, if(!issquarefree(k), is = 0; break)); if(is, print1(s[i], ", ")));}
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A371190_gen(): # generator of terms
        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
        def f(x):
            c, l, j = x-squarefreepi(integer_nthroot(x,3)[0]), 0, 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
        m, w = 1, 1
        for n in count(2):
            k = bisection(lambda x:f(x)+n,m,m)
            if (a:=squarefreepi(k))-w==k-1-m:
                yield m
            m, w = k, a # Chai Wah Wu, Sep 15 2024