# Computer Programming

## Converting Between Bases

I was working through the November problems for NCTM’s Mathematics Teacher. There’s a problem on converting between bases, which led to me developing a new-to-me method. What I was taught I started by using the method I’d been taught by…

Computer Programming

## Dan Meyer’s Really Really Really Difficult Puzzle

Dan Meyer offered this puzzle. The essence of it is, given an arbitrary number for volume, can we build an algorithm that will always generate the integer side lengths that give us the least surface area? He put it in more…

## Object-Oriented Geometry

In an earlier post, I reflected on the relationship between mathematics, language, and computer programming. One detail of that has been on my mind quite a bit lately, as I’ve been teaching geometry. While early computer programming was heavily reliant…

I’m exploring if it’s possible to create a function in GeoGebra that would take an integer as input and create a simplified radical as output. For instance, it would take $$20$$ as input and return $$2\sqrt{5}$$ as output. I don’t…

## Programming, Mathematics, and Language

I’ve been struggling for a while now to find a way to frame and articulate the answer to what seems like a simple question: “What is mathematics?” At the same time, I’ve been seeking to layout the similarities and differences…

## Pseudocode for the Russian peasant method of binary

Just for fun… Here’s the pseudocode for the method of building a binary number from a decimal number, based on the Russian peasant method of multiplication: function mybin(mydec) { mybin = “”; do while mydec > 0 { if mydec…

## The square of a sum and the sum of cubes

Let’s start with a fun fact: Take the first $$n$$ integers. Add them and then square the result; call this $$S$$. Take the cube of each and add those numbers; call this $$C$$. It will always be the case that…

## =

When I was a lad studying mathematics, the equality sign seemed particularly simple: The stuff on the left is equal to the stuff on the right. However, I have since been developing a much more sophisticated perception of the simple…

## The Reversible Phone Number

Consider this problem: An absent-minded American mathematician has difficulty remembering his seven-digit phone number until he notices that, when he reverses the digits, he gets another seven-digit phone number that is a factor of his own phone number. After this…

## Logarithmic notation: Mathematics vs. computer programming

One of my concerns as an educator is the way in which peccadilloes of mathematical notation can get in the way of understanding. In the case of logarithms, this has become more troublesome as general education about numeric bases at…