login
A384419
Exponentially squarefree prime powers.
4
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223
OFFSET
1,2
COMMENTS
Differs from A283262 by having the terms 1, 128, 1024, 2187, 8192, ..., and not having the terms 256, 512, 6561, ... .
1 and numbers of the form p^e where p is prime and e is a squarefree number.
LINKS
Chai Wah Wu, Algorithms for Complementary Sequences, Integers (2025) Vol. 25, Art. No. A95. See p. 24.
MATHEMATICA
seq[lim_] := Module[{s = Select[Range[lim], !CompositeQ[#] &]}, Do[If[SquareFreeQ[i], s = Join[s, Select[Range[Surd[lim, i]], PrimeQ]^i]], {i, 2, Floor[Log2[lim]]}]; Sort[s]]; seq[250]
PROG
(Python)
from math import isqrt
from sympy import mobius, integer_log, primerange, primepi
def A384419(n):
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 g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
def f(x): return n-1+x-sum(g(integer_log(x, p)[0])-1 for p in primerange(isqrt(x)+1))-primepi(x)
return bisection(f, n, n) # Chai Wah Wu, Sep 21 2025
CROSSREFS
Intersection of A000961 and A209061.
Disjoint union of {1}, A000040 and A383211.
Sequence in context: A056781 A079446 A322546 * A283262 A334393 A115975
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, May 28 2025
STATUS
approved