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.
%I A066340 #20 Aug 13 2019 05:01:14 %S A066340 1,1,1,1,0,1,1,1,1,1,1,4,3,4,1,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,0,1,1,0, %T A066340 1,1,1,6,1,6,5,6,1,6,1,1,1,1,1,1,1,1,1,1,1,1,4,9,4,1,0,1,4,9,4,1,1,1, %U A066340 1,1,1,1,1,1,1,1,1,1,1,8,1,8,1,8,7,8,1,8,1,8,1,1,1,6,1,10,6,1,1,6,10,1,6,1,1 %N A066340 Fermat's triangle: T(n,m) = m^phi(n) mod n; n >= 2; 1 <= m <= n-1, where phi is Euler's totient function. %C A066340 Fermat's little theorem states that T(n,m)=1 for all m relatively prime to n. %H A066340 Alois P. Heinz, <a href="/A066340/b066340.txt">Rows n = 2..201, flattened</a> %e A066340 Triangle begins: %e A066340 1; %e A066340 1, 1; %e A066340 1, 0, 1; %e A066340 1, 1, 1, 1; %e A066340 1, 4, 3, 4, 1; %e A066340 1, 1, 1, 1, 1, 1; %e A066340 1, 0, 1, 0, 1, 0, 1; %e A066340 1, 1, 0, 1, 1, 0, 1, 1; %e A066340 1, 6, 1, 6, 5, 6, 1, 6, 1; %e A066340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; %e A066340 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1; %e A066340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; %e A066340 1, 8, 1, 8, 1, 8, 7, 8, 1, 8, 1, 8, 1; %e A066340 1, 1, 6, 1, 10, 6, 1, 1, 6, 10, 1, 6, 1, 1; %t A066340 Table[PowerMod[ #, EulerPhi[n], n]&/@ Range[n-1], {n, 2, 32} ] %o A066340 (PARI) T(n,k) = lift(Mod(k, n)^eulerphi(n)); %o A066340 tabl(nn) = for (n=2, nn, for (k=1, n-1, print1(T(n,k), ", ")); print); \\ _Michel Marcus_, Aug 13 2019 %Y A066340 Cf. A000010. %K A066340 easy,nonn,tabl %O A066340 2,12 %A A066340 _Wouter Meeussen_, Jan 01 2002