All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Sum Power Digit Determination (Posted on 2014-07-12) Difficulty: 3 of 5
Determine the last digit of:

12 + 23 + 34 + 45 + .......+ 20142015

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
DEFDBL A-Z
FOR n = 1 TO 2014
    t = t + modpow(n, n + 1, 10000)
NEXT
PRINT t MOD 10000
_clipboard$=str$(t mod 10000)

FUNCTION modpow (b, p, m)
answ = 1
FOR i = 1 TO p
    answ = (answ * b) MOD m
NEXT
modpow = answ
END FUNCTION


finds 
 
 4311
 
as the last four digits of the number, so the last digit is a 1

  Posted by Charlie on 2014-07-12 12:30:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information