Carmichael Numbers (Updated 2/21/2016)

02162016, 02:05 PM
(This post was last modified: 02212016 04:17 PM by Eddie W. Shore.)
Post: #1




Carmichael Numbers (Updated 2/21/2016)
Blog entry: http://edspi31415.blogspot.com/2016/02/h...mbers.html
Program (Updated 2/21/2016: I was mistaken on the definition of squarefree integers, the program is now corrected.) Code: EXPORT ISCARMICHAEL(n) The commands isprime and ifactors are generated from the CASInteger (Options 6 then 1 for isprime; option 3 for ifactors) submenu. However, I think in order for this program to work properly, the “CAS.” must be deleted and the command should be in alllowercase. Introduction An integer n is a Carmichael number (1910) when the following holds: a^n ≡ a mod n (or for a>0 and n>0) a^n – integer(a^n/n) * n = a For all integers a. The program ISCARMICHAEL tests whether an integer n qualifies as a Carmichael number based on the Korselt’s Criterion: 1. n is a positive, composite integer. That is, n can be factored into a multiplication of prime numbers. 2. n is squarefree. 3. For each prime factor p dividing n (not 1 or n), the following is true: (p1) divides (n1) evenly (without fraction). 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)