A197113 Nonprime numbers n such that the greatest residue of the congruence x^n (mod n) equals n-1 where x = 0..n-1.
1, 9, 10, 15, 21, 25, 26, 27, 33, 34, 35, 39, 45, 49, 50, 51, 55, 57, 58, 63, 65, 69, 74, 75, 77, 81, 82, 85, 87, 91, 93, 95, 99, 105, 106, 111, 115, 117, 119, 121, 122, 123, 125, 129, 130, 133, 135, 141, 143, 145, 146, 147, 153, 155, 159, 161, 165, 169, 170
Offset: 1
Keywords
Examples
50 is in the sequence because the residues of the congruence x^50 (mod 50) are { 0, 1, 24, 25, 26, 49} and the greatest value is 50 - 1 = 49.
Programs
-
Maple
with(numtheory):T:=array(1..170): for n from 1 to 170 do:for k from 1 to n do:T[k]:=irem(k^n,n):od:W:=convert(T,set):x:=nops(W):if type(n,prime) = false and W[x]= n-1 then printf(`%d, `,n):else fi:od:
Comments