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.

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

This page as a plain text file.
%I A049559 #79 Feb 16 2025 08:32:40
%S A049559 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,
%T A049559 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,
%U A049559 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
%N A049559 a(n) = gcd(n - 1, phi(n)).
%C A049559 For prime n, a(n) = n - 1. Question: do nonprimes exist with this property?
%C A049559 Answer: No. If n is composite then a(n) < n - 1. - _Charles R Greathouse IV_, Dec 09 2013
%C A049559 Lehmer's totient problem (1932): are there composite numbers n such that a(n) = phi(n)? - _Thomas Ordowski_, Nov 08 2015
%C A049559 a(n) = 1 for n in A209211. - _Robert Israel_, Nov 09 2015
%D A049559 Richard K. Guy, Unsolved Problems in Number Theory, B37.
%H A049559 Charles R Greathouse IV, <a href="/A049559/b049559.txt">Table of n, a(n) for n = 1..10000</a>
%H A049559 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LehmersTotientProblem.html">Lehmer's Totient Problem</a>
%F A049559 a(p^m) = a(p) = p - 1 for prime p and m > 0. - _Thomas Ordowski_, Dec 10 2013
%F A049559 From _Antti Karttunen_, Sep 09 2018: (Start)
%F A049559 a(n) = A000010(n) / A160595(n) = A063994(n) / A318829(n).
%F A049559 a(n) = n - A318827(n) = A000010(n) - A318830(n).
%F A049559 (End)
%F A049559 a(n) = gcd(A000010(n), A219428(n)) = gcd(A000010(n), A318830(n)). - _Antti Karttunen_, Jan 05 2021
%e A049559 a(9) = 2 because phi(9) = 6 and gcd(8, 6) = 2.
%e A049559 a(10) = 1 because phi(10) = 4 and gcd(9, 4) = 1.
%p A049559 seq(igcd(n-1, numtheory:-phi(n)), n=1..100); # _Robert Israel_, Nov 09 2015
%t A049559 Table[GCD[n - 1, EulerPhi[n]], {n, 93}] (* _Michael De Vlieger_, Nov 09 2015 *)
%o A049559 (PARI) a(n)=gcd(eulerphi(n),n-1) \\ _Charles R Greathouse IV_, Dec 09 2013
%o A049559 (Python)
%o A049559 from sympy import totient, gcd
%o A049559 print([gcd(totient(n), n - 1) for n in range(1, 101)]) # _Indranil Ghosh_, Mar 27 2017
%o A049559 (Magma) [Gcd(n-1, EulerPhi(n)): n in [1..80]]; // _Vincenzo Librandi_, Oct 13 2018
%Y A049559 Cf. A000010, A002322, A039766, A063994, A160595, A209211, A219428, A264012, A264024, A280262, A283656, A283872, A284089, A284440, A318827, A318829, A318830, A330747 (ordinal transform), A340195.
%Y A049559 Cf. also A009195, A058515, A058663, A187730, A258409, A339964, A340071, A340081, A340087 for more or less analogous sequences.
%K A049559 nonn
%O A049559 1,3
%A A049559 _Labos Elemer_, Dec 28 2000