number_carmichael — Returns some Carmichael numbers.
a = number_carmichael ( )
In number theory, a Carmichael number is a composite positive integer n which satisfies the congruence
for all integers b which are relatively prime to n.
a = number_carmichael ( ) // Test Carmichael #1 in the range b=[1,50] n=a(1); bmin = 1; bmax = 50; for b = bmin : bmax if ( number_gcd(b,n) == 1 ) then x = number_powermod ( b, n-1, n ); mprintf("gcd(%d,%d)=1 and %d^%d = %d (mod %d)\n",.. b,n,b,n-1,x,n); end end