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

 Upside down (OEIS A045573) (Posted on 2014-04-11)
Some numbers remain numbers when turned upside down (using digits 0125689, with no final 0's): 1, 2, 5, 6, 8, 9, 11, 12, … etc

IF a1=1, a2=2, a3=5,... a8=12,…, etc

a.Evaluate a100
b. Evaluate a1000
c. If an= 888, what is n?

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 Direct Basic solution | Comment 2 of 6 |
The last digit can take any of 6 values.  The remaining digits can take any of 7.

To get a(x),
1) express x as 6b + d, where d = x mod 6
2) then convert b to base 7, and append d
3) map the digits 0123456 to 0123689

For instance, x = 1,000,000 = 6*166,666 + 4
166,666 base 7 = 1262623
and 12626234 translates to 12929236,
so a(1,000,000) = 12,929,236

To go in the reverse direction, just reverse the process.
For example, a(x) = 888,888
This maps to 666666
Take all but the last digit (66666)
Convert to base 7 giving 16,806
Multiply by six and add the last digit: 6*16,806 + 6 = 100842,
so a(100,842) = 888,888

 Posted by Steve Herman on 2014-04-11 21:06:06

 Search: Search body:
Forums (0)