cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A049559 a(n) = gcd(n - 1, phi(n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 4, 1, 22, 1, 4, 1, 2, 3, 28, 1, 30, 1, 4, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 4, 1, 46, 1, 6, 1, 2, 3, 52, 1, 2, 1, 4, 1, 58, 1, 60, 1, 2, 1, 16, 5, 66, 1, 4, 3, 70, 1, 72, 1, 2, 3, 4, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 18, 1, 4
Offset: 1

Views

Author

Labos Elemer, Dec 28 2000

Keywords

Comments

For prime n, a(n) = n - 1. Question: do nonprimes exist with this property?
Answer: No. If n is composite then a(n) < n - 1. - Charles R Greathouse IV, Dec 09 2013
Lehmer's totient problem (1932): are there composite numbers n such that a(n) = phi(n)? - Thomas Ordowski, Nov 08 2015
a(n) = 1 for n in A209211. - Robert Israel, Nov 09 2015

Examples

			a(9) = 2 because phi(9) = 6 and gcd(8, 6) = 2.
a(10) = 1 because phi(10) = 4 and gcd(9, 4) = 1.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, B37.

Crossrefs

Programs

  • Magma
    [Gcd(n-1, EulerPhi(n)): n in [1..80]]; // Vincenzo Librandi, Oct 13 2018
  • Maple
    seq(igcd(n-1, numtheory:-phi(n)), n=1..100); # Robert Israel, Nov 09 2015
  • Mathematica
    Table[GCD[n - 1, EulerPhi[n]], {n, 93}] (* Michael De Vlieger, Nov 09 2015 *)
  • PARI
    a(n)=gcd(eulerphi(n),n-1) \\ Charles R Greathouse IV, Dec 09 2013
    
  • Python
    from sympy import totient, gcd
    print([gcd(totient(n), n - 1) for n in range(1, 101)]) # Indranil Ghosh, Mar 27 2017
    

Formula

a(p^m) = a(p) = p - 1 for prime p and m > 0. - Thomas Ordowski, Dec 10 2013
From Antti Karttunen, Sep 09 2018: (Start)
a(n) = A000010(n) / A160595(n) = A063994(n) / A318829(n).
a(n) = n - A318827(n) = A000010(n) - A318830(n).
(End)
a(n) = gcd(A000010(n), A219428(n)) = gcd(A000010(n), A318830(n)). - Antti Karttunen, Jan 05 2021

A160595 Numerator of resilience R(n) = phi(n)/(n-1), with a(1) = 1 by convention.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 23 2009

Keywords

Comments

The resilience of a denominator, R(d), is the ratio of proper fractions n/d, 0 < n < d, that are resilient, i.e., such that gcd(n, d) = 1. Obviously this is the case for phi(d) proper fractions among the d - 1 possible ones.
a(n) = 1 if n is prime. It is unknown whether there exist composite n with a(n) = 1 (see Wikipedia link). - Robert Israel, Dec 26 2016
Conjecture: a(n) > 2 for every composite n > 6. Slightly stronger than the Lehmer's totient conjecture (1932). - Thomas Ordowski, Mar 13 2019

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.
		

Crossrefs

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

A318828 a(n) = n - A063994(n) = n - Product_{primes p dividing n} gcd(p-1, n-1).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 7, 7, 9, 1, 11, 1, 13, 11, 15, 1, 17, 1, 19, 17, 21, 1, 23, 21, 25, 25, 25, 1, 29, 1, 31, 29, 33, 31, 35, 1, 37, 35, 39, 1, 41, 1, 43, 37, 45, 1, 47, 43, 49, 47, 49, 1, 53, 51, 55, 53, 57, 1, 59, 1, 61, 59, 63, 49, 61, 1, 67, 65, 67, 1, 71, 1, 73, 71, 73, 73, 77, 1, 79, 79, 81, 1, 83, 69, 85, 83, 87, 1, 89, 55
Offset: 1

Views

Author

Antti Karttunen, Sep 09 2018

Keywords

Crossrefs

Programs

Formula

a(n) = n - A063994(n).

A318827 a(n) = n - gcd(n - 1, phi(n)).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 7, 7, 9, 1, 11, 1, 13, 13, 15, 1, 17, 1, 19, 17, 21, 1, 23, 21, 25, 25, 25, 1, 29, 1, 31, 29, 33, 33, 35, 1, 37, 37, 39, 1, 41, 1, 43, 41, 45, 1, 47, 43, 49, 49, 49, 1, 53, 53, 55, 53, 57, 1, 59, 1, 61, 61, 63, 49, 61, 1, 67, 65, 67, 1, 71, 1, 73, 73, 73, 73, 77, 1, 79, 79, 81, 1, 83, 81, 85, 85, 87, 1, 89, 73
Offset: 1

Views

Author

Antti Karttunen, Sep 09 2018

Keywords

Comments

a(n) = n-1 for n in A209211.

Crossrefs

Programs

  • Mathematica
    Array[# - GCD[# - 1, EulerPhi[#]] &, 100] (* Alonso del Arte, Sep 09 2018 *)
  • PARI
    A318827(n) = (n-gcd(eulerphi(n), n-1));

Formula

a(n) = n - A049559(n) = n - gcd(n - 1, phi(n)).
a(n) = A051953(n) + A318830(n).
a(p) = 1 for p prime.
Showing 1-4 of 4 results.