Pizza Hut Pi Day Challenge (Part 3)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. In yesterday’s post, I described why the solution must have the form

 

___ , ___ ___ ___ , 5 ___ ___ , ___ ___ 0,

where the blanks have to filled by using the numbers 1, 2, 3, 4, 6, 7, 8, and 9. There are 8 remaining digits, and so there are 8! = 40,320 possible answers left.

Step 5. The number formed by the first two digits has to be a multiple of 2. The number formed by the first four digits has to be a multiple of 4, which means it’s also a multiple of 2. The number formed by the first six digits has to be a multiple of 6, which means it’s also a multiple of 2. The number formed by the first eight digits has to be a multiple of 8, which means it’s also a multiple of 2. By the divisibility rules, that means that the second, fourth, sixth, and eighth digits are even numbers. So the ten-digit number must have the form

___ , E ___ E , 5 E ___ , E ___ 0,

where E is one of 2, 4, 6, and 8. Therefore, the remaining dashes must be odd numbers:

    O , E O E , 5 E O , E O 0,

where O is one of 1, 3, 7, and 9. There are 4! = 24 ways of arranging the four remaining even digits and also 4! = 24 ways of arranging the remaining odd digits. Therefore, there are 24 x 24 = 576 possible answers left.

While it’s now tractable to find this number by brute force by listing and testing the 576 possible numbers, we can use the divisibility rules to reduce the list to only 192. I’ll continue this in tomorrow’s post.

 

Pizza Hut Pi Day Challenge (Part 2)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. To illustrate this idea, let me give an example that almost works: 9,632,581,470, a ten-digit number that uses each digit exactly once.

  1. The first digit is 9, which is clearly a multiple of 1.
  2. The first two digits form the number 96, which is clearly a multiple of 2: 96 = 2 \times 48.
  3. The first three digits form the number 963, which is a multiple of 3: 963 = 3 \times 321.
  4. The first four digits form the number 9632, which is a multiple of 4: 9632 = 4 \times 2408.
  5. The first five digits form the number 96,325, which is a multiple of 5: 96,325 = 5 \times 19,265.
  6. The first six digits form the number 963,258, which is a multiple of 6: 963,258 = 6 \times 160,523.
  7. The first seven digits form the number 9,632,581, which is a multiple of 7: 9,632,581 = 7 \times 1,376,083.
  8. Doesn’t work: 96,325,814 = 8 \times 12,040,726 + 6.
  9. The first nine digits for the number 963,258,147, which is a multiple of 9: 963,258,147 = 9 \times 107,028,683
  10. The ten-digit number is a multiple of 10: 9,632,581,470 = 10 \times 963,258,147.

So, this number works for 9 of the 10 cases… but we need the number that works for all 10 cases.

green lineHere’s the ten-digit number, where the blanks have to be filled in:

___ , ___ ___ ___ , ___ ___ ___ , ___ ___ ___.

Each of the blanks has to be a digit from 0 through 9, and each can only be used once. Therefore, there are 10! = 3,628,800 possible answers, but we’d like to whittle this down to a more tractable number.

Step 1. This ten-digit number has to be a multiple of 10. By the divisibility rules, that means that the last digit has to be 0. So the ten-digit number must have the form

___ , ___ ___ ___ , ___ ___ ___ , ___ ___ 0.

Each of the blanks has to be a digit from 1 through 9, and each can only be used once. Therefore, at this stage, there are 9! = 362,880 possible answers.

Step 2. The number formed by the first five digits has to be a multiple of 5. By the divisibility rules, that means that the fifth digit has to be either 5 or 0. However, the 0 has already been used, so the fifth digit must be 5. So the ten-digit number must have the form

___ , ___ ___ ___ , 5 ___ ___ , ___ ___ 0.

Each of the blanks has to be one of the 8 remaining digits, and each can only be used once. Therefore, at this stage, there are 8! = 40,320 possible answers.

Step 3. The number formed by the first nine digits has to be a multiple of 9. By the divisibility rules, that means that the sum of the first nine digits has to be a multiple of 9. However, this isn’t helpful: we know that the first nine digits are going to be 1 through 9 in some order, and we already know that

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45

is a multiple of 9. So considering the first nine digits gives us no new information.

Step 4. The first digit has to be a multiple of 1. However, this isn’t helpful since every digit is a multiple of 1. So considering only the first digit gives us no new information.

I’ll continue this discussion with tomorrow’s post, where I’ll reduce the number of possible answers from 40,320 to only 576.

Pizza Hut Pi Day Challenge (Part 1)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

To illustrate this idea, let me give an example that almost works: 9,632,581,470, a ten-digit number that uses each digit exactly once.

  1. The first digit is 9, which is clearly a multiple of 1.
  2. The first two digits form the number 96, which is clearly a multiple of 2: 96 = 2 \times 48.
  3. The first three digits form the number 963, which is a multiple of 3: 963 = 3 \times 321.
  4. The first four digits form the number 9632, which is a multiple of 4: 9632 = 4 \times 2408.
  5. The first five digits form the number 96,325, which is a multiple of 5: 96,325 = 5 \times 19,265.
  6. The first six digits form the number 963,258, which is a multiple of 6: 963,258 = 6 \times 160,523.
  7. The first seven digits form the number 9,632,581, which is a multiple of 7: 9,632,581 = 7 \times 1,376,083.
  8. Doesn’t work: 96,325,814 = 8 \times 12,040,726 + 6.
  9. The first nine digits for the number 963,258,147, which is a multiple of 9: 963,258,147 = 9 \times 107,028,683
  10. The ten-digit number is a multiple of 10: 9,632,581,470 = 10 \times 963,258,147.

So, this number works for 9 of the 10 cases… but we need the number that works for all 10 cases.

In this series, I plan to discuss my solution of this problem using the rules of divisibility. I’ll start my solution with tomorrow’s post.

In the meantime, if you’d like to think about the solution on your own, I offer this green thought bubble to give you some time to think about it on your own.

green_speech_bubble

 

Geometry and Halloween Costumes

From a friend’s Facebook post (shared with her permission):

For every time a geometry student asks, “When am I ever going to use this in real life?” Well, if your child ever asks you to make her a Harley Quinn costume, and there is no pattern, so you have to draft your own, you will need to find the sides of a square using the measurement of the diagonal…

[I]f you need to have a square patchwork of different colored fabrics which line up on diagonal points for a specific measurement so that you have four colored diagonal squares from the shoulder to just below the waist, you would need to find the measurement of the four equal sides of each square. Then you would add seam allowances so you could cut the squares out of the different colored fabrics and sew them together in exact lines to line up just right so you could make a top that looks like the top the character wears. And since this character is only a cartoon character who has been made into a little doll, not many people out there in the world have yet attempted an actual costume to be worn by a real live girl. Of course, a person could just take a pencil and a ruler and draw squares, but without using math, that person could not put together a patchwork of colored fabric squares with this result.

The finished product:

 

My Mathematical Magic Show: Part 9

This mathematical trick was not part of my Pi Day magic show but probably should have been. I first read about this trick in one of Martin Gardner‘s books when I was a teenager, and it’s amazing how impressive this appears when performed. I particularly enjoy stumping my students with this trick, inviting them to figure out how on earth I pull it off.

Here’s a video of the trick, courtesy of Numberphile:

Summarizing, there’s a way of quickly determining x given the value of x^5 if x is a positive integer less than 100:

  • The ones digit of x will be the ones digit of x^5.
  • The tens digit of x can be obtained by listening to how big x^5 is. This requires a bit of memorization (and I agree with the above video that the hardest ones to quickly determine in a magic show are the ones less than 40^5 and the ones that are slightly larger than a billion):
    • 10: At least 10,000.
    • 20: At least 3 million.
    • 30: At least 24 million.
    • 40: At least 100 million.
    • 50: At least 300 million.
    • 60: At least 750 million.
    • 70: At least 1.6 billion.
    • 80: At least 3.2 billion.
    • 90: At least 5.9 billion.

 

 

 

 

 

 

 

English words in hexadecimal

Here’s a standard joke involving representing numbers in different bases.

Q: If only DEAD people understand hexadecimal, then how many people understand hexadecimal?

A: 57,005.

The joke, of course, is that DEAD can be considered a number written in base 16, using the usual convention A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. In other words, DEAD can be converted to decimal as follows:

DEAD_{\small sixteen} = 13 \times 16^3 + 14 \times 16^2 + 10 \times 16 + 13 = 57,005.

After I heard this joke, I wondered just how many English words can be formed using only the letters A, B, C, D, E, and F so that I could make a subtle joke on a test. To increase the length of my list, I also allowed words that included the letters O (close enough to a 0), I (close enough to 1), and/or S (close enough to 5). However, I eliminated words that start with O (since a numeral normally doesn’t start with 0) and/or end in S (the plural version of these words are easily formed).

So I wrote a small program to search the dictionary that I have on my computer. The unabridged list follows, with words beginning with a capital letter (such as names or places) listed at the bottom. I emphasize that this list is unabridged, as there are several words on this list that I wouldn’t place on a test for obvious reasons: I would never ask my class to convert the base-10 numeral 721,077 into hexadecimal just so they can obtain the answer of B00B5.

a

abaci

abase

abased

abbé

abed

abide

abided

abode

aboded

abscessed

abscissa

abscissae

acacia

accede

acceded

accessed

ace

aced

acid

acidic

acidified

ad

add

added

ado

adobe

aid

aide

aided

aside

assessed

b

baa

baaed

babe

babied

bad

bade

baobab

base

based

basic

bassi

basso

be

bead

beaded

bed

bedded

bedside

bee

beef

beefed

beside

biased

biassed

bib

bid

bide

bided

boa

bob

bobbed

bode

boded

bodice

boo

boob

boobed

booed

bossed

c

cab

cabbed

cabbie

caboose

cacao

cad

caddied

café

cascade

cascaded

case

cased

cassia

cease

ceased

cede

ceded

cicada

cicadae

cob

cobbed

cocci

cocoa

cod

coda

codded

code

coded

codified

coed

coffee

coif

coifed

coiffed

coo

cooed

d

dB

dab

dabbed

dad

dado

dead

deaf

deb

debase

debased

decade

decaf

decease

deceased

decide

decided

decode

decoded

deed

deeded

deface

defaced

defied

deice

deiced

deified

dice

diced

did

die

died

diocese

diode

disc

disco

discoed

disease

diseased

dissed

do

doc

dodo

doe

doff

doffed

doodad

dose

dosed

e

ease

eased

ebb

ebbed

eddied

edifice

edified

efface

effaced

f

fa

facade

face

faced

fad

fade

faded

fed

fee

feed

fiasco

fib

fibbed

fie

fief

fife

fob

fobbed

foci

foe

food

i

ice

iced

id

idea

if

sac

sad

safe

said

sassed

scab

scabbed

scad

scoff

scoffed

sea

seabed

seafood

seaside

secede

seceded

see

seed

seeded

sic

side

sided

so

sob

sobbed

sod

soda

sodded

sofa

A

Abbasid

Abe

Ac

Acadia

Ada

Addie

Aida

Asia

Assad

Assisi

B

Ba

Basie

Be

Bede

Beebe

Bessie

Bi

Bib

Bic

Bob

Bobbi

Bobbie

Boccaccio

Boise

Bose

C

Ca

Case

Casio

Cassie

Cd

Cf

Ci

Cid

Co

Cobb

D

Dacca

Dada

Debbie

Dec

Decca

Dee

Defoe

Di

Dido

Doe

E

Eco

Ed

Edda

Eddie

Effie

Essie

F

Fe

Feb

Fed

Fido

I

Iaccoca

Ibo

Ida

Io

Isaac

Issac

Combinatorics and Jason’s Deli: Index

I’m doing something that I should have done a long time ago: collecting a series of posts into one single post. The following links comprised my series on an advertisement that I saw in Jason’s Deli.

Part 1: The advertisement for the Jason’s Deli salad bar.

Part 2: Correct calculation of the number of salad bar combinations.

Part 3: Incorrect calculation of how long it would take to eat this many combinations.