cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A106543 Composite numbers that are not perfect powers.

This page as a plain text file.
%I A106543 #29 Oct 13 2024 02:38:41
%S A106543 6,10,12,14,15,18,20,21,22,24,26,28,30,33,34,35,38,39,40,42,44,45,46,
%T A106543 48,50,51,52,54,55,56,57,58,60,62,63,65,66,68,69,70,72,74,75,76,77,78,
%U A106543 80,82,84,85,86,87,88,90,91,92,93,94,95,96,98,99,102,104,105,106
%N A106543 Composite numbers that are not perfect powers.
%H A106543 Amiram Eldar, <a href="/A106543/b106543.txt">Table of n, a(n) for n = 1..10000</a>
%F A106543 a(n) = n + O(n/log n). - _Charles R Greathouse IV_, Oct 03 2011
%t A106543 perfPQ[n_]:=GCD@@FactorInteger[n][[All,2]]>1; Select[Range[110], CompositeQ[ #] && !perfPQ[#]&] (* _Harvey P. Dale_, Oct 10 2017 *)
%o A106543 (PARI) lista(nn)=forcomposite(i=1, nn, if (! ispower(i), print1(i, ", "));); \\ _Michel Marcus_, Jun 27 2013
%o A106543 (PARI) is(n)=!isprime(n) && !ispower(n) && n>1 \\ _Charles R Greathouse IV_, Oct 19 2015
%o A106543 (SageMath)
%o A106543 def A106543_list(n) : return [k for k in (2..n) if not k.is_prime() and not k.is_perfect_power()]
%o A106543 A106543_list(106) # _Terry D. Grant_, Jul 17 2016
%o A106543 (Python)
%o A106543 from sympy import primepi, mobius, integer_nthroot
%o A106543 def A106543(n):
%o A106543     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())))
%o A106543     m, k = n, f(n)
%o A106543     while m != k: m, k = k, f(k)
%o A106543     return m # _Chai Wah Wu_, Oct 12 2024
%Y A106543 Intersection of A002808 and A007916.
%Y A106543 Cf. A105642, A089229.
%K A106543 easy,nonn
%O A106543 1,1
%A A106543 _Alexandre Wajnberg_, May 08 2005