Carmichael number, more or less

A quick-and-dirty R resolution of a riddle from The Riddler, namely to find a Carmichael number of the form abcabc:

for(i in 1:9)
  for(j in 0:9)
    for(k in 0:9){

resulting into the number 101 101, since its prime factors are

> primeFactors(101101)
[1]   7  11  13 101

and 6, 10, 12, and 100 are divisors of 101100:

> primeFactors(101100) 
[1] 2 2 3 5 5 337

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: