Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • 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 - number theory

Puzzle time - number theory

Scheduled Pinned Locked Moved General Discussion
13 Posts 4 Posters 88 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.
  • KlausK Offline
    KlausK Offline
    Klaus
    wrote on last edited by
    #1

    What are the last two digits of 123^789^456 ?

    (^ is exponentiation).

    jon-nycJ 1 Reply Last reply
    • KlausK Klaus

      What are the last two digits of 123^789^456 ?

      (^ is exponentiation).

      jon-nycJ Online
      jon-nycJ Online
      jon-nyc
      wrote on last edited by
      #2

      Euler’s theorem tells me that powers of 23 mod 100 cycle with period 20.

      So 123^(789 * 456) = 23 ^ (9*16) = 23^144 = 23^4.

      So 41

      Interpret those equal signs as congruence signs.

      "You never know what worse luck your bad luck has saved you from."
      -Cormac McCarthy

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

        You are on the right track with Euler's theorem, but exponentiation is in mathematical convention a right associative operation, so it's 123^789^456 = 123^(789^456).

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

          It's still 41. Just do it in 2 stages.

          23^9 yields 63. Euler's theorem tells us period 20 again.

          so 63^9

          last 2 digits are 41.

          Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?

          "You never know what worse luck your bad luck has saved you from."
          -Cormac McCarthy

          KlausK 1 Reply Last reply
          • George KG Offline
            George KG Offline
            George K
            wrote on last edited by
            #5

            You guys need to set up a subforum where you can circle-jerk discuss these things, LOL.

            "Now look here, you Baltic gas passer... " - Mik, 6/14/08

            The saying, "Lite is just one damn thing after another," is a gross understatement. The damn things overlap.

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

              The puzzles are a bit much. jon loves them, I accept that, but I'm not sure they need to be shared everywhere. And I'm definitely not sure of the motivation. These are IQ tests, just by the bye.

              Education is extremely important.

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

                I have a great solution, let’s put the words ‘puzzle time’ in the title from now on so the 4-5 people who show interest can open the thread and others will know not to.

                "You never know what worse luck your bad luck has saved you from."
                -Cormac McCarthy

                George KG 1 Reply Last reply
                • jon-nycJ jon-nyc

                  I have a great solution, let’s put the words ‘puzzle time’ in the title from now on so the 4-5 people who show interest can open the thread and others will know not to.

                  George KG Offline
                  George KG Offline
                  George K
                  wrote on last edited by
                  #8

                  @jon-nyc said in Puzzle time - number theory:

                  I have a great solution, let’s put the words ‘puzzle time’ in the title

                  alt text

                  (I got the sarcasm...)

                  "Now look here, you Baltic gas passer... " - Mik, 6/14/08

                  The saying, "Lite is just one damn thing after another," is a gross understatement. The damn things overlap.

                  1 Reply Last reply
                  • jon-nycJ jon-nyc

                    It's still 41. Just do it in 2 stages.

                    23^9 yields 63. Euler's theorem tells us period 20 again.

                    so 63^9

                    last 2 digits are 41.

                    Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?

                    KlausK Offline
                    KlausK Offline
                    Klaus
                    wrote on last edited by
                    #9

                    @jon-nyc said in Puzzle time - number theory:

                    It's still 41. Just do it in 2 stages.

                    23^9 yields 63. Euler's theorem tells us period 20 again.

                    so 63^9

                    last 2 digits are 41.

                    Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?

                    No, that's not correct. You have to "nest" two applications of Euler's theorem to account for the nested exponentials.

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

                      But the answer is right.

                      It’s just a coincidence that I got 41 both times, right?

                      "You never know what worse luck your bad luck has saved you from."
                      -Cormac McCarthy

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

                        The answer is 23.

                        You want "mod 100" for the result.

                        Phi(100) is 40.

                        Phi(40) is 16.

                        Now:
                        456 = 28 * 16+8, so 456 = 8 (mod 16)
                        789 = 19 * 40+29, so 789 = 29 (mod 40)
                        123 = 100 * 1 + 23, so 123 = 23 (mod 100)

                        Hence, according to Euler:
                        123^789^456 mod 100 = 23^29^8 mod 100.

                        Now, since 29 = -11 (mod 40): (with all = mod 100):

                        23^29^8 = 23^(-11)^8 = 23^(-11^2)^4 = 23^121^4
                        and, since 121 = 1 (mod 40),
                        23^121^4 = 23^1^4 = 23.

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

                          Oh well.

                          I thought about attacking this with a binomial expansion, treating this like (a+b)^n with a=100 and b=23.

                          Doing the expansion even with a very high n wouldn’t be a big deal, since all the terms with an a in them could be ignored.

                          But still that left me with 23^789 which still required Euler to address.

                          "You never know what worse luck your bad luck has saved you from."
                          -Cormac McCarthy

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

                            But it does offer a nice proof that the last two digits of a number are sufficient to determine the last two numbers of a power of that number.

                            "You never know what worse luck your bad luck has saved you from."
                            -Cormac McCarthy

                            1 Reply Last reply
                            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