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.

Original entry on oeis.org

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

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Crossrefs

Intersection of A002808 and A007916.

Programs

  • Mathematica
    perfPQ[n_]:=GCD@@FactorInteger[n][[All,2]]>1; Select[Range[110], CompositeQ[ #] && !perfPQ[#]&] (* Harvey P. Dale, Oct 10 2017 *)
  • 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
    
  • 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
  • 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
    

Formula

a(n) = n + O(n/log n). - Charles R Greathouse IV, Oct 03 2011