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.

A215486 n - 1 mod phi(n), where phi(n) is Euler's totient function.

This page as a plain text file.
%I A215486 #23 Jul 09 2025 04:34:32
%S A215486 0,0,0,1,0,1,0,3,2,1,0,3,0,1,6,7,0,5,0,3,8,1,0,7,4,1,8,3,0,5,0,15,12,
%T A215486 1,10,11,0,1,14,7,0,5,0,3,20,1,0,15,6,9,18,3,0,17,14,7,20,1,0,11,0,1,
%U A215486 26,31,16,5,0,3,24,21,0,23,0,1,34,3,16,5,0,15,26,1,0,11,20,1,30,7,0,17
%N A215486 n - 1 mod phi(n), where phi(n) is Euler's totient function.
%C A215486 Lehmer conjectured that a(n) = 0 only when n is 1 or prime.
%H A215486 Charles R Greathouse IV, <a href="/A215486/b215486.txt">Table of n, a(n) for n = 1..10000</a>
%H A215486 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lehmer&#39;s_totient_problem">Lehmer's totient problem</a>
%e A215486 a(8) = 3 because 8 - 1 mod phi(8) = 3.
%e A215486 a(9) = 2 because 9 - 1 mod phi(9) = 2.
%e A215486 a(10) = 1 because 10 - 1 mod phi(10) = 1.
%t A215486 Table[Mod[n - 1, EulerPhi[n]], {n, 2, 100}]
%o A215486 (Magma) [(n-1) mod EulerPhi(n): n in [2..90]]; // _Bruno Berselli_, Feb 18 2013
%o A215486 (Maxima) makelist(mod(n-1,totient(n)), n, 2, 90); /* _Bruno Berselli_, Feb 18 2013 */
%o A215486 (PARI) a(n)=(n-1)%eulerphi(n) \\ _Charles R Greathouse IV_, Dec 29 2013
%Y A215486 Cf. A068494, A007694.
%K A215486 nonn,easy
%O A215486 1,8
%A A215486 _Alonso del Arte_, Feb 17 2013, based on an idea from _Balarka Sen_