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.

No Solution Yet Submitted by K Sengupta    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution corrected computer summation Comment 3 of 3 |
(In reply to Adding up those 9-digit numbers by Charlie)

The program previously shown ensured that not only did the first two digits, as well as digits 6 and 7 (by checking digits 3 and 4 in the palindrome), need to be non-consecutive, it also made sure the members of each pair were not equal to each other.  This has been corrected in lines 30 and 60 of the below programs.  The new totals, in decimal and then in the digits of the respective bases, follow the run command in each.

The units digit in the respective bases remains 0, but the coincidental unit-digit zero in the decimal representation no longer takes place.

   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$


run
 457090751915976
 4 3 3 2 3 2 11 11 11 8 6 5 10 0
OK

   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$


run
 27956539129767392
 6 3 5 2 5 2 15 15 15 10 10 5 14 0
OK

  Posted by Charlie on 2015-01-08 07:59:42
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 (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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