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 A016035 #42 Apr 22 2019 15:21:41 %S A016035 0,0,0,1,0,3,0,3,2,5,0,7,0,7,6,7,0,11,0,11,8,11,0,15,4,13,8,15,0,21,0, %T A016035 15,12,17,10,23,0,19,14,23,0,29,0,23,20,23,0,31,6,29,18,27,0,35,14,31, %U A016035 20,29,0,43,0,31,26,31,16,45,0,35,24,45,0,47,0,37,34,39,16,53 %N A016035 a(n) = Sum_{j|n, 1 < j < n} phi(j). Also a(n) = n - phi(n) - 1 for n > 1. %C A016035 Number of integers less than n with at least one common factor with n. - _Olivier Gérard_, Feb 08 2011 %C A016035 A number N is a Fermat base 2 pseudoprime, that is, 2^(N-1) == 1 mod N, iff 2^a(N) == 1 mod N. - _T. D. Noe_, Jul 10 2003 %C A016035 Number of zero divisors in ring Z_n, where Z_n is the ring of integers modulo n. - Armin Vollmer (armin_vollmer(AT)web.de), Jul 23 2004 %C A016035 From _Jianing Song_, Apr 20 2019: (Start) %C A016035 a(p) = 0 if and only if p is a prime, which is equivalent to the fact that Z_p is a field if and only if p is a prime. %C A016035 a(n) = n/2 is and only if n = 2p, p prime. (End) %D A016035 Al Hibbard and Ken Levasseur, "Exploring Abstract Algebra with Mathematica", Springer Verlag. %H A016035 Olivier Gérard, <a href="/A016035/b016035.txt">Table of n, a(n) for n = 1..10000</a> %F A016035 For n > 1, a(n) = A051953(n) - 1. - _Antti Karttunen_, Mar 12 2018 %e A016035 For n = 6, the a(6) = 3 integers less than 6 with at least one common factor with 6 are {2,3,4}. %t A016035 Needs["AbstractAlgebra`Master`"] Length[ZeroDivisors[Z[ # ]]] & /@ Range[2, 25] (* Armin Vollmer, Jul 23 2004 *) %t A016035 a[n_] := n - EulerPhi[n] - 1; a[1] = 0; Table[a[n], {n, 1, 78}] (* _Jean-François Alcover_, Jan 04 2013 *) %o A016035 (Haskell) %o A016035 a016035 1 = 0 %o A016035 a016035 n = sum $ map a000010 $ init $ tail $ a027750_row n %o A016035 -- _Reinhard Zumkeller_, Mar 02 2012 %o A016035 (PARI) for(n=1,100,p=0;for(i=1,n-1,if(gcd(i,n)>1,p++));print1(p",")) /* _V. Raman_, Nov 22 2012 */ %o A016035 (PARI) for(n=1,100,if(n==1,print1(0","),print1(n-1-eulerphi(n)","))) /* _V. Raman_, Nov 22 2012 */ %Y A016035 Cf. A001567 (base 2 pseudoprimes). %Y A016035 Cf. A000010, A027750. %Y A016035 Essentially one less than cototient, A051953. %K A016035 nonn,easy %O A016035 1,6 %A A016035 _Robert G. Wilson v_ %E A016035 Typo in definition fixed by _Reinhard Zumkeller_, Mar 02 2012