• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login
Forum — Daily Challenge
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login

Don't understand the explanation of "sum of the factors In 5!"

Module 5 Day 5 Challenge Part 2
2
2
27
Loading More Posts
  • 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.
  • A
    amusingminnow M0 M1 M2 M3 M4 M5
    last edited by amusingminnow Jul 3, 2021, 2:28 PM Jul 3, 2021, 2:15 PM

    Why does 2^0+2^1+2^2+2^3=2^4-1 ?

    Q 1 Reply Last reply Jul 6, 2021, 8:45 PM Reply Quote 1
    • Q
      quacker88 MOD @amusingminnow
      last edited by quacker88 Jul 6, 2021, 8:45 PM Jul 6, 2021, 8:45 PM

      @amusingminnow Great question! This is a pattern that works for all powers of two, actually.

      Let's add them one at a time and see if there's anything you notice:
      20=12^0=\boxed{1}20=1​
      20+21=32^0+2^1=\boxed{3}20+21=3​
      20+21+22=72^0+2^1+2^2=\boxed{7}20+21+22=7​
      20+21+22+23=152^0+2^1+2^2+2^3=\boxed{15}20+21+22+23=15​
      20+21+22+23+24=312^0+2^1+2^2+2^3+2^4=\boxed{31}20+21+22+23+24=31​
      What's special about all of the answers is that they're all 111 less than the next power of 222!

      Knowing this is super helpful, it saves us from having to do a ton of addition. For example, we can use this shortcut when doing 20+21+22+...+292^0+2^1+2^2+...+2^920+21+22+...+29, because we know that this is equal to the next power of 2,2,2, which is 210=10242^{10}=1024210=1024, minus 111!

      So 20+21+22+...+29=10232^0+2^1+2^2+...+2^9=102320+21+22+...+29=1023.

      If you really want to get into the nitty gritty of why this works, you have to factor. Let's use 24−12^4-124−1.
      Remember difference of squares? We can use that here!
      24−1=(22−1)(22+1)2^4-1=(2^2-1)(2^2+1)24−1=(22−1)(22+1)
      And since 22−12^2-122−1 is a difference of two squares also, we can keep going.
      24−1=(22−1)(22+1)=(2−1)(2+1)(22+1)2^4-1=(2^2-1)(2^2+1)=(2-1)(2+1)(2^2+1)24−1=(22−1)(22+1)=(2−1)(2+1)(22+1).
      Well, (2−1)(2-1)(2−1) is just 111, so the expression is equal to (2+1)(22+1)(2+1)(2^2+1)(2+1)(22+1). Expand (2+1)(22+1)(2+1)(2^2+1)(2+1)(22+1), and you'll get 23+22+2+1=23+22+21+202^3+2^2+2+1=2^3+2^2+2^1+2^023+22+2+1=23+22+21+20.

      So,
      23+22+21+20=24−12^3+2^2+2^1+2^0=2^4-123+22+21+20=24−1.
      You can use factoring to prove this for all of the powers of 222 🙂

      1 Reply Last reply Reply Quote 1

      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post
      Daily Challenge | Terms | COPPA