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.)
 computer solution | Comment 1 of 6

valid\$ = "0125689"

PRINT
FOR i = 1 TO 19000
s\$ = LTRIM\$(STR\$(i))
found = 1
FOR j = 1 TO LEN(s\$)
IF INSTR(valid\$, MID\$(s\$, j, 1)) = 0 THEN found = 0
NEXT
IF RIGHT\$(s\$, 1) = "0" THEN found = 0
IF found THEN
ct = ct + 1
IF ct < 15 OR ct = 100 OR ct = 1000 OR i = 888 THEN PRINT ct, i:
END IF
NEXT

finds

`n            a(n)1             12             23             54             65             86             97             118             129             1510            1611            1812            1913            2114            22100           226245           8881000          5286`

So:

a. 226
b. 5286
c. 245

The proscription on terminal zero prevents easy use of an isomorphism with base-7 numbers, where we'd just assign the valid digits to the successive base-7 digits and use base-conversion algorithms.

 Posted by Charlie on 2014-04-11 15:47:31

 Search: Search body:
Forums (0)