A096002 Let {b(n)} = A095996; then a(n) = number of terms {b(1),b(2),...,b(n-1)} which are coprime to n.
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, 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, 58, 3, 60, 16, 6, 32, 6, 3, 66, 10, 9, 3, 70, 13, 72, 19, 7, 11, 7, 4, 78, 10
Offset: 1
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A095996.
Programs
-
Mathematica
f[n_] := f[n] = Select[Divisors[n! ], GCD[ #, n] == 1 &][[ -1]]; Table[ Length[ Select[ Range[n - 1], GCD[ f[ # ], n] == 1 &]], {n, 2, 33}]
-
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
Formula
If p is prime, then a(p) = p-1.
Extensions
a(33) - a(41) from Robert G. Wilson v, May 05 2013
a(1) corrected and terms a(42) and beyond from Andrew Howroyd, Nov 05 2019
Comments