OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
45 is in the sequence because 45=3^2*5, i.e., neither squarefree nor a prime power.
MAPLE
with(numtheory): a:=proc(n) if mobius(n)=0 and nops(factorset(n))>1 then n else fi end: seq(a(n), n=1..230); # Emeric Deutsch, Feb 17 2007
MATHEMATICA
Select[Range[200], Max @@ Last /@ FactorInteger[ # ] >1 && Length[FactorInteger[ # ]] > 1 &] (* Ray Chandler, Feb 17 2007 *)
Select[Range[200], !SquareFreeQ[#]&&!PrimePowerQ[#]&] (* Harvey P. Dale, Aug 05 2023 *)
PROG
(PARI) isok(k) = !issquarefree(k) && !isprimepower(k); \\ Michel Marcus, Nov 02 2022
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot, mobius
def A126706(n):
def f(x): return int(n+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 15 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 11 2007
EXTENSIONS
Extended by Emeric Deutsch and Ray Chandler, Feb 17 2007
STATUS
approved