Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Nov 06 2019 01:11:35
%S 0,1,2,2,4,2,6,4,4,3,10,3,12,4,3,8,16,4,18,4,4,6,22,5,8,7,10,5,28,2,
%T 30,16,5,9,5,7,36,10,6,6,40,3,42,7,5,12,46,9,12,7,7,8,52,10,6,7,8,15,
%U 58,3,60,16,6,32,6,3,66,10,9,3,70,13,72,19,7,11,7,4,78,10
%N Let {b(n)} = A095996; then a(n) = number of terms {b(1),b(2),...,b(n-1)} which are coprime to n.
%H Andrew Howroyd, <a href="/A096002/b096002.txt">Table of n, a(n) for n = 1..1000</a>
%F If p is prime, then a(p) = p-1.
%t f[n_] := f[n] = Select[Divisors[n! ], GCD[ #, n] == 1 &][[ -1]]; Table[ Length[ Select[ Range[n - 1], GCD[ f[ # ], n] == 1 &]], {n, 2, 33}]
%o (PARI) seq(n)={my(v=vector(n, n, denominator(n^n/n!))); vector(n, n, sum(k=1, n-1, gcd(v[k],n)==1));} \\ _Andrew Howroyd_, Nov 05 2019
%Y Cf. A095996.
%K nonn
%O 1,3
%A _Robert G. Wilson v_, Jul 19 2004, based on a suggestion from _Leroy Quet_, Jun 18 2004
%E a(33) - a(41) from _Robert G. Wilson v_, May 05 2013
%E a(1) corrected and terms a(42) and beyond from _Andrew Howroyd_, Nov 05 2019