OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n + O(n/log n). - Charles R Greathouse IV, Oct 03 2011
MATHEMATICA
perfPQ[n_]:=GCD@@FactorInteger[n][[All, 2]]>1; Select[Range[110], CompositeQ[ #] && !perfPQ[#]&] (* Harvey P. Dale, Oct 10 2017 *)
PROG
(PARI) lista(nn)=forcomposite(i=1, nn, if (! ispower(i), print1(i, ", ")); ); \\ Michel Marcus, Jun 27 2013
(PARI) is(n)=!isprime(n) && !ispower(n) && n>1 \\ Charles R Greathouse IV, Oct 19 2015
(SageMath)
def A106543_list(n) : return [k for k in (2..n) if not k.is_prime() and not k.is_perfect_power()]
A106543_list(106) # Terry D. Grant, Jul 17 2016
(Python)
from sympy import primepi, mobius, integer_nthroot
def A106543(n):
def f(x): return int(n+1+primepi(x)-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Oct 12 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, May 08 2005
STATUS
approved