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.

This page as a plain text file.
%I A175594 #24 Feb 25 2025 13:13:32
%S A175594 0,8,12,15,16,20,21,24,28,30,32,33,35,36,39,40,42,44,45,48,51,52,55,
%T A175594 56,57,60,63,64,65,66,68,69,70,72,75,76,77,78,80,84,85,87,88,90,91,92,
%U A175594 93,95,96,99,100,102,104,105,108,110,111,112,114,115,116,117,119,120,123
%N A175594 Numbers having no primitive root.
%C A175594 Union of {0} and A033949.
%C A175594 Numbers n such that A046145(n)=0 except n=1.
%t A175594 Prepend[Select[Range[2, 123], Not[IntegerQ[PrimitiveRoot[#]]] &], 0] (* _Alonso del Arte_, Dec 12 2011 *)
%o A175594 (Python)
%o A175594 from sympy import primepi, integer_nthroot
%o A175594 def A175594(n):
%o A175594     if n==1: return 0
%o A175594     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)))
%o A175594     m, k = n, f(n)
%o A175594     while m != k: m, k = k, f(k)
%o A175594     return m # _Chai Wah Wu_, Feb 25 2025
%K A175594 nonn
%O A175594 1,2
%A A175594 Vladislav-Stepan Malakhovsky and _Juri-Stepan Gerasimov_, Jul 20 2010
%E A175594 Corrected by _R. J. Mathar_, Oct 15 2011
%E A175594 Corrected by _Arkadiusz Wesolowski_, Sep 06 2012