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.

A175594 Numbers having no primitive root.

Original entry on oeis.org

0, 8, 12, 15, 16, 20, 21, 24, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 51, 52, 55, 56, 57, 60, 63, 64, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 99, 100, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116, 117, 119, 120, 123
Offset: 1

Views

Author

Vladislav-Stepan Malakhovsky and Juri-Stepan Gerasimov, Jul 20 2010

Keywords

Comments

Union of {0} and A033949.
Numbers n such that A046145(n)=0 except n=1.

Programs

  • Mathematica
    Prepend[Select[Range[2, 123], Not[IntegerQ[PrimitiveRoot[#]]] &], 0] (* Alonso del Arte, Dec 12 2011 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A175594(n):
        if n==1: return 0
        def f(x): return int(n+(x>=2)+(x>=4)+sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length()))+sum(primepi(integer_nthroot(x>>1,k)[0])-1 for k in range(1,x.bit_length()-1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 25 2025

Extensions

Corrected by R. J. Mathar, Oct 15 2011
Corrected by Arkadiusz Wesolowski, Sep 06 2012