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.

A124224 Table T(n,k) = reciprocal of k-th number prime to n, modulo n, for 1 <= k <= phi(n).

This page as a plain text file.
%I A124224 #23 Feb 16 2025 08:33:03
%S A124224 0,1,1,2,1,3,1,3,2,4,1,5,1,4,5,2,3,6,1,3,5,7,1,5,7,2,4,8,1,7,3,9,1,6,
%T A124224 4,3,9,2,8,7,5,10,1,5,7,11,1,7,9,10,8,11,2,5,3,4,6,12,1,5,3,11,9,13,1,
%U A124224 8,4,13,2,11,7,14,1,11,13,7,9,3,5,15,1,9,6,13,7,3,5,15,2,12,14,10,4,11,8,16
%N A124224 Table T(n,k) = reciprocal of k-th number prime to n, modulo n, for 1 <= k <= phi(n).
%C A124224 T(n,k) = smallest m such that A038566(n,k) * m = 1 (mod n).
%C A124224 For n>1 every row begins with 1 and ends with n-1.  T(n,k) = A038566(n,k)^(phi(n) - 1) (mod n). - _Geoffrey Critzer_, Jan 03 2015
%H A124224 Robert Israel, <a href="/A124224/b124224.txt">Table of n, a(n) for n = 1..10060</a>
%H A124224 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ModularInverse.html">Modular Inverse</a>
%F A124224 T(n,k) * A038566(n,k) = 1 (mod n), for n >=1 and k=1..A000010(n). - _Wolfdieter Lang_, Oct 06 2016
%e A124224 The table T(n,k) starts:
%e A124224 n\k 1  2  2  3 4  5 6  7 8  9 10 11
%e A124224 1:  0
%e A124224 2:  1
%e A124224 3:  1  2
%e A124224 4:  1  3
%e A124224 5:  1  3  2  4
%e A124224 6:  1  5
%e A124224 7:  1  4  5  2 3  6
%e A124224 8:  1  3  5  7
%e A124224 9:  1  5  7  2 4  8
%e A124224 10: 1  7  3  9
%e A124224 11: 1  6  4  3 9  2 8  7 5 10
%e A124224 12: 1  5  7 11
%e A124224 13: 1  7  9 10 8 11 2  5 3  4  6 12
%e A124224 14: 1  5  3 11 9 13
%e A124224 15: 1  8  4 13 2 11 7 14
%e A124224 16: 1 11 13  7 9  3 5 15
%e A124224 ...
%e A124224 n = 17: 1  9  6 13 7  3  5 15 2 12 14 10 4 11 8 16,
%e A124224 n = 18: 1 11 13  5 7 17,
%e A124224 n = 19: 1 10 13  5 4 16 11 12 17 2 7 8 3 15 14 6 9 18,
%e A124224 n = 20: 1 7 3 9 11 17 13 19.
%e A124224 ... reformatted (extended and corrected), - _Wolfdieter Lang_, Oct 06 2016
%p A124224 0,seq(seq(i^(-1) mod m, i = select(t->igcd(t,m)=1, [$1..m-1])),m=1..100); # _Robert Israel_, May 18 2014
%t A124224 Table[nn = n; a = Select[Range[nn], CoprimeQ[#, nn] &];
%t A124224 PowerMod[a, -1, nn], {n, 1, 20}] // Grid (* _Geoffrey Critzer_, Jan 03 2015 *)
%Y A124224 Cf. A124223, A102057, A038566, A000010 (row lengths), A023896 (row sums after first)
%K A124224 nonn,tabf
%O A124224 1,4
%A A124224 _Franklin T. Adams-Watters_, Oct 20 2006