MC: Ping-Pong Cubes
|
05-22-2018, 03:16 PM
Post: #1
|
|||
|
|||
MC: Ping-Pong Cubes
You always thought that Ping-Pong™ only involved planes and spheres, right? Here's a programming mini-challenge that involves Ping-Pong Cubes!
Definition 1: A Ping-Pong Number is any multi-digit integer whose consecutive digits always alternate between even and odd. For example, 18505 is a Ping-Pong Number because its consecutive digits are odd, even, odd, even, odd. 16850 is not (because 6 and 8 are both even). Any pair of even digits, or pair of odd digits, anywhere in the number, disqualifies it from being a Ping-Pong Number. The name of course comes from the concept of a rally on a Ping-Pong table marked like this: Note: Dotted lines are not necessarily to scale; on a perfect table, the probability of hitting any digit is the same. Definition 2: A Ping-Pong Cube is a Ping-Pong Number which is the cube of another Ping-Pong Number. The smallest Ping-Pong Cube is 5832, because it is a Ping-Pong Number and it is the cube of 18 which is also a Ping-Pong Number. The first 5 Ping-Pong Cubes are: 5832 = 18^3 12167 = 23^3 614125 = 85^3 658503 = 87^3 1030301 = 101^3 Your mini-challenge, should you choose to accept it, is to write an HP calculator program that finds the first ten Ping-Pong Cubes. Don't worry; the 10th one is not very large. A much bigger challenge, which has eluded me thus far, is to find the 11th Ping-Pong Cube. It must be very large, if it even exists. <0|ɸ|0> -Joe- |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)