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

Home > Just Math
Units Digit Determination (Posted on 2015-01-07) Difficulty: 3 of 5
N is a 9-digit duodecimal (base 12) palindrome such that:

The first two digits of N are not consecutive, and:
The sixth and seventh digits of N are not consecutive

What is the units digit of the sum of all possible values of N?

How about N being a 9-digit hexadecimal (base 16) palindrome instead?

*** N is of course positive and does not contain any leading zero.

See The Solution Submitted by K Sengupta    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Adding up those 9-digit numbers | Comment 2 of 3 |
(In reply to Simple analysis (spoiler?) by Steve Herman)

   10   for A=1 to 11
   20   for B=0 to 11
   30    if abs(A-B)>1 then
   40      :for C=0 to 11
   50      :for D=0 to 11
   60      :if abs(C-D)>1 then
   70        :for E=0 to 11
   80          :N=A*(12^8+1)
   90          :N=N+B*(12^7+12)
  100          :N=N+C*(12^6+12^2)
  110          :N=N+D*(12^5+12^3)
  120          :N=N+E*12^4
  130          :Tot=Tot+N
  140        :next
  144       :endif
  145      :next
  146      :next
  150   next B
  160   next A
  200   print Tot
  300   N=Tot
  305   S$=" "
  310   while N>0
  320      D=N @ 12:N=N\12
  330      S$=str(D)+S$
  340   wend
  360   print S$

finds the total in decimal is 371289194344200. Its duodecimal digits are, from left/major to right/units:

3 5 7 8 6 3 11 11 11 4 8 1 10 0

The units digit is zero.

For part 2:

   10   for A=1 to 15
   20   for B=0 to 15
   30    if abs(A-B)>1 then
   40      :for C=0 to 15
   50      :for D=0 to 15
   60      :if abs(C-D)>1 then
   70        :for E=0 to 15
   80          :N=A*(16^8+1)
   90          :N=N+B*(16^7+16)
  100          :N=N+C*(16^6+16^2)
  110          :N=N+D*(16^5+16^3)
  120          :N=N+E*16^4
  130          :Tot=Tot+N
  140        :next
  144       :endif
  145      :next
  146      :next
  150   next B
  160   next A
  200   print Tot
  300   N=Tot
  305   S$=" "
  310   while N>0
  320      D=N @ 16:N=N\16
  330      S$=str(D)+S$
  340   wend
  360   print S$
  
 finds
 
The total in decimal is 24130586557079520. The hex digits are 5 5 11 10 10 3 15 15 15 4 13 15 14 0. The units digit is zero.
 
One looks for a reason that both answers for the units digits are zero, that is that the total is divisible by the base. Trying the sum 1+2+3+4+5+6+7+8+9+10+11 = 66 only assures us the first total (base 12) is divisible by 66, but that itself is not divisible by 12.

Steve found the reason.
 
 

  Posted by Charlie on 2015-01-07 15:12:43
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