DisciplinedPrep
Two integers A and B are such that A = \(2^{65}\) and B = (\(2^{64}+2^{63}+2^{62}+...+2^0\)). Find the relation between A and B.
A. A and B are equal
B. B is greater than A by 1
C. A is greater than B by 1
D. B is \(2^{64}\) greater than A
E. A is \(2^{64}\) greater than B
Great question!
In my solution I'll use the fact that \(k + k = 2k\)
So, for example, \(2^3 + 2^3 = 2(2^3) = 2^1(2^3) = 2^4\)
Let's start by examining the following sum: \(1+2^0+2^1+2^2+2^3+2^4\)
Add the first two values to get: \(2+2^1+2^2+2^3+2^4\)
Rewrite as follows: \(2^1+2^1+2^2+2^3+2^4\)
Add the first two values to get: \((2)(2^1)+2^2+2^3+2^4\)
Rewrite as: \(2^2+2^2+2^3+2^4\)
Add the first two values to get: \((2)(2^2)+2^3+2^4\)
Rewrite as: \(2^3+2^3+2^4\)
Add the first two values to get: \((2)(2^3)+2^4\)
Rewrite as: \(2^4+2^4\)
Add the first two values to get: \((2)(2^4)\)
Rewrite as: \(2^5\)
So, \(1+2^0+2^1+2^2+2^3+2^4=2^5\)
If you spot of the pattern, you'll recognize that
\(1+2^0+2^1+2^2+2^3+2^4+.....+2^{64}+2^{65}=2^{66}\)Important: You'll see that the
left side of the
above equation is
1 GREATER THAN the value of B
You'll also see that the
right side of the
above equation equals the value of A
So we can rewrite the
above equation as follows:
\(1+B=A\)Answer: C