OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
If p is prime, then a(p) = p-1.
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}]
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 19 2004, based on a suggestion from Leroy Quet, Jun 18 2004
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
STATUS
approved