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.
%I A048864 #34 Feb 25 2020 08:05:56 %S A048864 1,1,1,1,2,1,3,1,3,2,6,1,7,2,4,3,10,1,11,2,6,4,14,1,12,5,10,5,19,1,20, %T A048864 6,11,7,15,3,25,8,14,6,28,2,29,8,12,10,32,3,28,7,19,11,37,4,26,10,22, %U A048864 14,42,2,43,14,20,15,32,5,48,15,27,8,51,6,52,17,21,17,41,6,57,12,33,20 %N A048864 Number of nonprime numbers (composites and 1) in the reduced residue system of n. %C A048864 Differs from A039776 at n = 20, 21, ... %H A048864 Michael De Vlieger, <a href="/A048864/b048864.txt">Table of n, a(n) for n = 1..10000</a> %H A048864 Abhijit A J, A. Satyanarayana Reddy, <a href="https://arxiv.org/abs/1907.09908">Number of non-primes in the set of units modulo n</a>, arXiv:1907.09908 [math.GM], 2019. %H A048864 Abhijit A. J. and A. Satyanarayana Reddy, <a href="http://www.indianmathsociety.org.in/mathstudent-part-1-2019.pdf#page=153">Number of non-primes in the set of units modulo n</a>, The Mathematics Student, Vol. 88, No. 1-2 (2019), 147-152. %F A048864 a(n) = A036997(n) + 1. - _Peter Luschny_, Oct 22 2010 %F A048864 a(n) = A000010(n) - (A000720(n) - A001221(n)). %e A048864 At n = 10, we see that the numbers below 10 coprime to 10 are 1, 3, 7, 9. Removing 3 and 7, which are prime, we are left with two numbers, 1 and 9. Hence a(10) = 2. %e A048864 At n = 100, phi(100) = 40, phi(100) - (pi(100) - A001221(100)) = 17, thus a(100) = 17. %p A048864 A048864 := n -> nops(select(k->gcd(k,n)=1,remove(isprime,[$1..n]))); # _Peter Luschny_, Oct 22 2010 %t A048864 Array[EulerPhi@ # - (PrimePi@ # - PrimeNu@ #) &, 82] (* _Michael De Vlieger_, Jul 03 2016 *) %t A048864 Table[Length[Select[Range[n], GCD[n, #] == 1 && Not[PrimeQ[#]] &]], {n, 80}] (* _Alonso del Arte_, Oct 02 2017 *) %o A048864 (PARI) a(n) = eulerphi(n) - (primepi(n) - omega(n)); \\ _Indranil Ghosh_, Apr 27 2017 %o A048864 (Python) %o A048864 from sympy import totient, primepi, primefactors %o A048864 def a(n): return totient(n) - (primepi(n) - len(primefactors(n))) # _Indranil Ghosh_, Apr 27 2017 %Y A048864 Cf. A039776, A000010, A000720, A001221, A037228, A072022, A072023, A074915. %K A048864 nonn %O A048864 1,5 %A A048864 _Labos Elemer_ %E A048864 Converted second formula to an equation, added commas to the example - _R. J. Mathar_, Oct 23 2010