The converse of Fermat's Little Theorem is False - another example

Which of the odd numbers from 547 to 567 are prime?

m "\!\(5\^m\)" ≡(mod m)
547 "5" 546 1
549 "5" 548 286
551 "5" 550 480
553 "5" 552 141
555 "5" 554 250
557 "5" 556 1
559 "5" 558 428
561 "5" 560 1
563 "5" 562 1
565 "5" 564 60
567 "5" 566 340
Select [ Range [ 547 , 567 ] , PrimeQ ] { 547 , 557 , 563 }


Converted by Mathematica      April 24, 2000