Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

The New Coffee Room

  1. TNCR
  2. General Discussion
  3. Puzzle time - factorials

Puzzle time - factorials

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 65 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jon-nycJ Online
    jon-nycJ Online
    jon-nyc
    wrote on last edited by
    #1

    Consider the following product of factorials: 100! x 99! x 98! x . . . x 2! x 1!.

    Call each of the 100 factorials K! a "term" (e.g 78! is a term). Can you remove one term and leave a perfect square?

    The whole reason we call them illegal aliens is because they’re subject to our laws.

    1 Reply Last reply
    • KlausK Offline
      KlausK Offline
      Klaus
      wrote on last edited by
      #2

      The "obvious" thing (writing a computer program that tries out all 100 possible solutions) wouldn't work? Or would it merely not be "elegant"?

      1 Reply Last reply
      • KlausK Offline
        KlausK Offline
        Klaus
        wrote on last edited by
        #3

        :::

        OK, so according to my three lines of code, you have to remove 50!.

        But I guess the more interesting challenge is to see that without brute force.

        I guess the key is that there are many squares in these products, since (n+1)!n! = (n!^2)(n+1).

        So we could write the product as something like

        (1!^2*2) * (3!^2 * 4) * (5!^2 * 6) * ... * (99!^2 * 100)

        Hmm...

        :::

        1 Reply Last reply
        • HoraceH Offline
          HoraceH Offline
          Horace
          wrote on last edited by
          #4

          Spoiler? More like a factoiler.

          Education is extremely important.

          1 Reply Last reply
          • jon-nycJ Online
            jon-nycJ Online
            jon-nyc
            wrote on last edited by jon-nyc
            #5

            :::

            I first noticed that primes above 50 appear an even number of times, and at least the higher primes below 50 appeared an odd number of times. Therefore I figured it had to be 48, 50, or 52. I then figured of the three 50 was the most likely answer and confirmed it with code.

            Then I thought there must be an easier way.

            So if you think of this as 100*(99!)^2 * 98*(97!)^2... 2*(1!)^2 you can reduce it to
            (some huge perfect square) * 100 * 98 * 96... * 2

            Then you pull out a 2 from each factor and get 2^50*(50!). So yeah, exclude the 50! and you have a perfect square.

            :::

            The whole reason we call them illegal aliens is because they’re subject to our laws.

            1 Reply Last reply

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups