Name

number_carmichael — Returns some Carmichael numbers.

Calling Sequence

   a = number_carmichael ( )
   
   

Parameters

a :

a 33x1 matrix of floating point integers, some Carmichael numbers

Description

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.

Examples

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

   

Bibliography

http://www.research.att.com/~njas/sequences/table?a=2997&fmt=4

Carmichael number, http://en.wikipedia.org/wiki/Carmichael_numbers

Authors

Copyright (C) 2009 - 2010 - DIGITEO - Michael Baudin