%I #12 Apr 22 2020 16:59:09
%S 8190,7600,2184,6810,7246,2024,994,5956,182,7128,336,1806,448,920,
%T 1932,5068,375,168,330,6578,196,312,274,1579,6250,414,0,821,200,1908,
%U 244,4246,84,342,878,154,112,301,140,5844,134,182,122,276,168,255,111,1347,125,6248,92,363,104,0,294,715,85,183,75,1758,92,223,0,3492,392,78,70,300,64,864,110,140,63,108,1673,262,28,130,65,5054,0,120,63,160,323,111,51,238,57,168,28,225,77,102,286,1132,74,120,0
%N Number of errors that occur when choosing n as modulus in French INSEE code (0<n<100).
%C The most frequent errors are:
%C - permutation between 2 ranks
%C - error in one rank
%H Author?, <a href="http://les-mathematiques.u-strasbg.fr/phorum5/read.php?2,439164,439164#msg-439164">Les-mathematiques.net</a> [Broken link?]
%e Actual n is 97. It generates 74 errors.
%e Best choices could be 27, 54, 63, 81 or 99 instead of 97.
%o (Python)
%o for cle in range(1,100):
%o n=0
%o for r1 in range(1,14):
%o for r2 in range(r1,14):
%o ur1=cle-(10**(13-r1))%cle
%o ur2=cle-(10**(13-r2))%cle
%o for c1 in range(10):
%o for c2 in range(10):
%o if c1==c2:
%o dif=1
%o else:
%o dif=(c1*ur1-c2*ur2)%cle
%o if dif==0:
%o n=n+1
%o print(cle,':',n)
%K fini,full,nonn
%O 1,1
%A _Sébastien Dumortier_, Apr 26 2008