A160595 Numerator of resilience R(n) = phi(n)/(n-1), with a(1) = 1 by convention.
1, 1, 1, 2, 1, 2, 1, 4, 3, 4, 1, 4, 1, 6, 4, 8, 1, 6, 1, 8, 3, 10, 1, 8, 5, 12, 9, 4, 1, 8, 1, 16, 5, 16, 12, 12, 1, 18, 12, 16, 1, 12, 1, 20, 6, 22, 1, 16, 7, 20, 16, 8, 1, 18, 20, 24, 9, 28, 1, 16, 1, 30, 18, 32, 3, 4, 1, 32, 11, 8, 1, 24, 1, 36, 20, 12, 15, 24, 1, 32, 27, 40, 1, 24, 16, 42, 28
Offset: 1
Examples
a(9) = 3 since for the denominator d = 9, among the 8 proper fractions n/9 (n = 1, ..., 8), six cannot be canceled down by a common factor (namely 1/9, 2/9, 4/9, 5/9, 7/9, 8/9), thus R(9) = 6/8 = 3/4.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537 (terms 2..10000 from Robert Israel)
- Project Euler, Problem 245: resilient fractions, May 2009
- Wikipedia, Lehmer's totient problem.
Programs
-
Magma
[Numerator(EulerPhi(n)/(n-1)): n in [2..90]]; // Vincenzo Librandi, Jan 02 2017
-
Maple
seq(numer(numtheory:-phi(n)/(n-1)),n=2..100); # Robert Israel, Dec 26 2016
-
Mathematica
Numerator[Table[EulerPhi[n]/(n - 1), {n, 2, 87}]] (* Alonso del Arte, Sep 19 2011 *)
-
PARI
A160595(n) = if(1==n,n,numerator(eulerphi(n)/(n-1)));
Formula
a(n) = phi(n)/gcd(phi(n),n-1) = A000010(n) / A049559(n) = A247074(n) * A318829(n). - Antti Karttunen, Sep 09 2018
Extensions
Term a(1) = 1 prepended by Antti Karttunen, Sep 09 2018
Comments