Subscribe via feed.

## 777777^333333

Posted by Chris on June 25, 2013 – 10:54 am

What is the last digit of 777777333333?

Although I’ve only used 7’s and 3’s, you should be able to generalise the 777777 and 333333 to get the same result.

This post is under “Mathemagic” and has 4 respond so far.

### 4 Responds so far- Add one»

1. 1. bob Said：

7. number of sevens doesn’t matter, number threes doesn’t matter as long as there are at least 2 threes. one 3, ends in a 3, two threes, ends in a 7, and everything on ends in a seven.

2. 2. Chris Said：

Hi bob. There’s an even more general answer, but what you’ve said is correct.

3. 3. Chuck H. Said：

If I start with 777777^333333, I can rewrite this as (111111^333333)*(7^333333). Any integer ending in 1 raised to a positive integer power will have 1 in the last digit. Thus, the numbers of sevens and threes will have no effect on that part.

Seven raised to a power follows a modulus of 4 pattern:
7^0 = 1
7^1 = 7
7^2 = 49 (9)
7^3 = 343 (3)
7^4 = 2401 (1)
7^5 = 16807 (7)
…and so on. Thus the last digit will be a 1 when raised to a power divisible by 4. The last digit will be 7, 9, and 3, respectively, when raised to a power mod 4 of 1, 2, and 3.

As bob said, for at least two threes, the last digit of 77….77^33….33 is seven. In general for 77….77 raised to any positive integer power, the last digit will be 1, 7, 9, and 3 for the last two digits of the power modulus 4 of 0, 1, 2, and 3, respectively.

I hope that is general enough.

4. 4. Chris Said：

Hi Chuck. Thanks for that analysis. I hadn’t thought of the split to 111111*7. I liked that.

I’ve been a bit mean about the general answer. Both you and bob gave the answer that I was after when I started writing that part of the problem. By the time I’d finished writing that bit, I knew that a more general answer was:
(10u +7)^(4v+1). Of course, there are many ways to get a number that ends in 7. i.e. why stick with a^b. So perhaps I was being silly.

I don’t know how bob did it. The way I did it was using modulo arithmetic. Then the string of 7’s may be replaced by a single 7 as 777777 = 7 (mod 10). For the power, somewhat excessively, I employ Euler’s theorem => a^φ(m) = 1 (mod m). φ(10) = 10(1 -1/2)(1 – 1/5) = 4. Then I verify that 4 (rather than 2, as 4 = 2*2) is the smallest power. As 7^2 = 9 = -1 (mod 10) => 4 is the smallest power. So 7^(4v+1) = 7 (mod 10). Now 333333 = 333300 + 32 + 1 = 1 (mod 4), hence 777777^333333 = 7 (mod 10) as does (10u+7)^(4v+1) (mod 10)

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0