OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime Power
Eric Weisstein's World of Mathematics, Squarefree
Chai Wah Wu, Algorithms for Complementary Sequences, Integers (2025) Vol. 25, Art. No. A95. See p. 21.
EXAMPLE
42 is in the sequence because 42 = 2*3*7 (3 distinct prime factors).
81 is in the sequence because 81 = 3^4 (4 prime factors, 1 distinct).
MATHEMATICA
Select[Range[110], PrimePowerQ[#] || SquareFreeQ[#] &]
Select[Range[110], PrimeNu[#] == 1 || PrimeNu[#] == PrimeOmega[#] &]
PROG
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot, mobius
def A303554(n):
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length()))-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 26 2018
STATUS
approved
