login
A106543
Composite numbers that are not perfect powers.
10
6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104, 105, 106
OFFSET
1,1
LINKS
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
Intersection of A002808 and A007916.
Sequence in context: A335080 A323304 A325411 * A324455 A327476 A007774
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, May 08 2005
STATUS
approved