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.

A068494 a(n) = n mod phi(n).

This page as a plain text file.
%I A068494 #38 Aug 03 2023 16:14:27
%S A068494 0,0,1,0,1,0,1,0,3,2,1,0,1,2,7,0,1,0,1,4,9,2,1,0,5,2,9,4,1,6,1,0,13,2,
%T A068494 11,0,1,2,15,8,1,6,1,4,21,2,1,0,7,10,19,4,1,0,15,8,21,2,1,12,1,2,27,0,
%U A068494 17,6,1,4,25,22,1,0,1,2,35,4,17,6,1,16,27,2,1,12,21,2,31,8,1,18,19,4
%N A068494 a(n) = n mod phi(n).
%C A068494 By Lehmer's Conjecture, when n > 2 then a(n) = 1 if and only if n is prime. The Notices article states "Lehmer's Conjecture (1932). phi(n) | (n-1) if and only if n is prime." - _Michael Somos_, Oct 14 2011
%H A068494 Reinhard Zumkeller, <a href="/A068494/b068494.txt">Table of n, a(n) for n = 1..10000</a>
%H A068494 D. H. Bailey and J. M. Borwein, <a href="http://www.ams.org/notices/201110/rtx111001410p.pdf">Exploratory Experimentation and Computation</a>, Notices of A. M. S. 58 (2011) 1410-1419, see p. 1416.
%F A068494 b^(n - a(n)) == 1 (mod n) for every b coprime to n. - _Thomas Ordowski_, Jun 30 2017
%t A068494 Table[Mod[n, EulerPhi[n]], {n, 100}] (* _Alonso del Arte_, Feb 15 2013 *)
%o A068494 (PARI) for(n=1,150,print1(n%eulerphi(n),","))
%o A068494 (PARI) {a(n) = n % eulerphi(n)}; /* _Michael Somos_, Oct 14 2011 */
%o A068494 (Haskell)
%o A068494 a068494 n = mod n $ a000010 n  -- _Reinhard Zumkeller_, Oct 14 2011
%o A068494 (Magma) [n mod EulerPhi(n): n in [1..100]]; // _Vincenzo Librandi_, Jul 19 2015
%Y A068494 Positions of particular numbers: 0: A007694, 1 (conjectured): A065091, 3: A350777\{1, 2, 3}.
%Y A068494 Cf. A055516.
%K A068494 easy,nonn
%O A068494 1,9
%A A068494 _Benoit Cloitre_, Mar 11 2002