schoolmath

Le Monde puzzle [#6]

February 17, 2011 | xi'an

A simple challenge in Le Monde this week: find the group of four primes such that any sum of three terms in the group is prime and the overall sum is minimised. Here is a quick exploration by simulation, using the schoolmath package (with its imperfections): A=primes(start=1,end=53)[... [Read more...]

Le Monde puzzle [41]

October 17, 2010 | xi'an

The current puzzle in Le Monde this week is again about prime numbers: The control key on a credit card is an integer η(a) associated with the card number a such that, if the card number is c=ab, its key η(c) satisfies η(c)=η(a)+η(b)-1. There is only ... [Read more...]

bug in schoolmath

June 13, 2010 | xi'an

Neil Gunther has pointed out on his blog that the prime number decomposition R package schoolmath contains mistakes in the function primes, listing 1 as a prime number but also including decomposable numbers like 133 in its list of prime numbers: __ primes(100,140) [1] 101 107 111 113 123 129 131 137 __ primes(50,140) [1]  [...] [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)