# Recalling sine and cosine addition rules

If you are like me you are always turning to a textbook or wikipedia whenever you need to remember the sine and cosine addition rules. In the back of my […]

# How many dogs at the dog show?

I recently came across an apparent 2nd grade maths problem, maybe you saw it. A dog show has 49 dogs in it. There are 36 more small dogs than large […]

# Numerically solving (finding the zeros) of a one-dimensional function

Solving a function, also known as root finding, is where we are given a function and we wish to find the value(s) such that . For text-book problems, ideally we […]

# Returning the nth largest values of a vector in R

Suppose I have a vector in R of the following six values: U <- c(5, 12, 23, -7, 12, 3), and I want the two largest values (or their indices […]

# Factoring large numbers with the continued fraction method

Recently I mentioned a general method for factoring a large number, not by searching explicitly for factors of the number, but searching instead for congruent squares. This method lies at […]

# Factoring large numbers using congruent squares

Factoring large numbers is a time-consuming problem. RSA cryptography, and secure communication over the internet, depends on this fact. Algorithms for factoring numbers are also fascinating in their own right. […]

# Prime testing as mental arithmetic

In the last post I discussed mentally dividing a number by 11. Another related mental arithmetic problem is prime testing. So, how can you test for primality in your head? […]

In Australia in 2000, the government introduced a 10% tax (called the goods and services tax or GST) payable on most things. Given a pre-tax price of something, it’s pretty […]