A247074 a(n) = phi(n)/(Product_{primes p dividing n } gcd(p - 1, n - 1)).
1, 1, 1, 2, 1, 2, 1, 4, 3, 4, 1, 4, 1, 6, 2, 8, 1, 6, 1, 8, 3, 10, 1, 8, 5, 12, 9, 4, 1, 8, 1, 16, 5, 16, 6, 12, 1, 18, 6, 16, 1, 12, 1, 20, 3, 22, 1, 16, 7, 20, 8, 8, 1, 18, 10, 24, 9, 28, 1, 16, 1, 30, 9, 32, 3, 4, 1, 32, 11, 8, 1, 24, 1, 36, 10, 12, 15, 24, 1, 32, 27, 40, 1, 24, 4, 42, 14, 40, 1, 24, 2, 44, 15, 46
Offset: 1
Examples
EulerPhi(15) = 8, and that 15 is a Fermat pseudoprime in base 1, 4, 11, and 14, the total is 4 bases, so a(15) = 8/4 = 2.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Gérard P. Michon, Pseudoprimes
Programs
-
Mathematica
a063994[n_] := Times @@ GCD[n - 1, First /@ FactorInteger@ n - 1]; a063994[1] = 1; a247074[n_] := EulerPhi[n]/a063994[n]; Array[a247074, 150]
-
PARI
a(n)=my(f=factor(n));eulerphi(f)/prod(i=1,#f~,gcd(f[i,1]-1,n-1)) \\ Charles R Greathouse IV, Nov 17 2014
Formula
A003557(n) <= a(n) <= n, and a(n) is a multiple of A003557(n). - Charles R Greathouse IV, Nov 17 2014
Comments