FF. Hostile Flowers

This is a beautiful puzzle that appears in many different forms.

Arp and Bif are playing with a line of 100 flowers. Each flower is originally open. When an open flower is touched it closes, and when a closed flower is touched, it opens. First they touch every flower in the line, then they touch every other flower in the line, then they touch every third flower, etc. 

When done, which flowers are open, which flowers are closed?

5 Comments »

  1. 0x616c said,

    March 5, 2009 at 3:01 am

    Nice!
    [spoiler]
    Any flower whose number is a perfect square is closed.

    Not a proof, but to quickly verify:
    ruby -e ‘a=100;b=Array.new(a+1,1);1.upto(a){|c|c.step(a,c){|d|b[d]^=1}};1.upto(a){|e|print”flower #{e} is “;puts 1==b[e]?”open”:”closed”}’
    [/spoiler]

  2. avgbody said,

    March 6, 2009 at 12:49 pm

    [spoiler] With the hint of looking at the first 10, it seems to be that the square numbers are the ones left closed. [/spoiler]

  3. strauss said,

    March 8, 2009 at 1:45 am

    The real issue here is:

    [spoiler] What characterizes numbers with an odd number of divisors? [/spoiler]

    This can be thought of as:

    [spoiler] If p is a prime, then how many factors does p^n have?[/spoiler]
    [spoiler] If A and B are relatively prime, then the number of factors of A times the number of factors of B = the number of factors of A B (why? Try it out for 2^3 3^3 to see what’s going on) [/spoiler]

  4. dfollett76 said,

    March 8, 2009 at 12:08 pm

    I’ve spent some time thinking about this before and came up with the wrong answer, this time I tried making an excel spreadsheet that simulated the process and got it right. The key was this function =IF($A3/D$2-INT($A3/D$2)=0,IF(C3=0,1,0),C3)

    in this example A3 was the flower number, D2 was the number of the trial (i.e. 3 if every third locker was being opened) ad C3 was the lockers current state.

  5. Philo said,

    March 12, 2009 at 7:29 pm

    The problem appears to be stated incorrectly (given your solution). ¬†You need to start with all the flowers closed to wind up with closed perfect squares, at least, if you’re going to begin by touching them all once.

RSS feed for comments on this post · TrackBack URL

Leave a Comment

You must be logged in to post a comment.

The Math Factor Podcast Website


Quality Math Talk Since 2004, on the web and on KUAF 91.3 FM


A production of the University of Arkansas, Fayetteville, Ark USA


Download a great math factor poster to print and share!

Got an idea? Want to do a guest post? Tell us about it!

Heya! Do us a favor and link here from your site!