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

 Palindromic and Tautonymic III (Posted on 2010-03-23)
Make a list of distinct positive integers that are obtained by assigning a different base ten digit from 1 to 9 to each of the capital letters in this expression.

(A+B)*C + (D–E)/F + (GH)*I

What are the respective minimum and maximum positive palindromes from amongst the elements that correspond to the foregoing list?

As a bonus, what are the respective minimum and maximum positive tautonymic numbers that are included in the list? How about the respective maximum and minimum prime numbers?

 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.)
 computer solution | Comment 5 of 11 |

Overall the values extend from 24 to 939,524,151, with 13,253 different values altogether, and so too voluminous to list here.

For palindromes, the lowest is 33:

` A B  C  D E  F  G H  I(2+6)*3+(9-4)/5+(1^7)*8                 =33(2+6)*3+(9-5)/4+(1^7)*8                 =33(4+5)*3+(2-8)/6+(1^9)*7                 =33(4+5)*3+(6-8)/2+(1^9)*7                 =33(4+9)*2+(8-3)/5+(1^7)*6                 =33(4+9)*2+(8-5)/3+(1^7)*6                 =33(5+4)*3+(2-8)/6+(1^9)*7                 =33(5+4)*3+(6-8)/2+(1^9)*7                 =33(5+7)*2+(9-3)/6+(1^4)*8                 =33(5+7)*2+(9-6)/3+(1^4)*8                 =33(5+8)*2+(7-3)/4+(1^9)*6                 =33(5+8)*2+(7-4)/3+(1^9)*6                 =33(5+9)*2+(3-7)/4+(1^8)*6                 =33(5+9)*2+(4-7)/3+(1^8)*6                 =33(6+2)*3+(9-4)/5+(1^7)*8                 =33(6+2)*3+(9-5)/4+(1^7)*8                 =33(6+7)*2+(4-9)/5+(1^3)*8                 =33(6+7)*2+(5-9)/4+(1^3)*8                 =33(6+9)*2+(3-8)/5+(1^7)*4                 =33(6+9)*2+(5-8)/3+(1^7)*4                 =33(7+5)*2+(9-3)/6+(1^4)*8                 =33(7+5)*2+(9-6)/3+(1^4)*8                 =33(7+6)*2+(4-9)/5+(1^3)*8                 =33(7+6)*2+(5-9)/4+(1^3)*8                 =33(7+8)*2+(3-9)/6+(1^5)*4                 =33(7+8)*2+(6-9)/3+(1^5)*4                 =33(8+5)*2+(7-3)/4+(1^9)*6                 =33(8+5)*2+(7-4)/3+(1^9)*6                 =33(8+7)*2+(3-9)/6+(1^5)*4                 =33(8+7)*2+(6-9)/3+(1^5)*4                 =33(9+4)*2+(8-3)/5+(1^7)*6                 =33(9+4)*2+(8-5)/3+(1^7)*6                 =33(9+5)*2+(3-7)/4+(1^8)*6                 =33(9+5)*2+(4-7)/3+(1^8)*6                 =33(9+6)*2+(3-8)/5+(1^7)*4                 =33(9+6)*2+(5-8)/3+(1^7)*4                 =33`

or if that's too simple a palindrome, then 101:

(those with A>B have been eliminated from this list, for brevity; just reverse them for the alternative.)

`(2+6)*9+(8-3)/5+(4^1)*7                =101(2+6)*9+(8-3)/5+(7^1)*4                =101(2+6)*9+(8-5)/3+(4^1)*7                =101(2+6)*9+(8-5)/3+(7^1)*4                =101(3+5)*9+(8-2)/6+(4^1)*7                =101(3+5)*9+(8-2)/6+(7^1)*4                =101(3+5)*9+(8-6)/2+(4^1)*7                =101(3+5)*9+(8-6)/2+(7^1)*4                =101(3+8)*6+(2-7)/5+(4^1)*9                =101(3+8)*6+(2-7)/5+(9^1)*4                =101(3+8)*6+(5-7)/2+(4^1)*9                =101(3+8)*6+(5-7)/2+(9^1)*4                =101(3+9)*8+(2-7)/5+(1^4)*6                =101(3+9)*8+(5-7)/2+(1^4)*6                =101(3+9)*8+(7-2)/5+(1^6)*4                =101(3+9)*8+(7-5)/2+(1^6)*4                =101(4+5)*9+(2-8)/6+(3^1)*7                =101(4+5)*9+(2-8)/6+(7^1)*3                =101(4+5)*9+(6-8)/2+(3^1)*7                =101(4+5)*9+(6-8)/2+(7^1)*3                =101(4+6)*3+(2-7)/5+(8^1)*9                =101(4+6)*3+(2-7)/5+(9^1)*8                =101(4+6)*3+(5-7)/2+(8^1)*9                =101(4+6)*3+(5-7)/2+(9^1)*8                =101(4+7)*9+(2-8)/6+(1^5)*3                =101(4+7)*9+(6-8)/2+(1^5)*3                =101(4+9)*6+(2-7)/5+(3^1)*8                =101(4+9)*6+(2-7)/5+(8^1)*3                =101(4+9)*6+(5-7)/2+(3^1)*8                =101(4+9)*6+(5-7)/2+(8^1)*3                =101(5+6)*4+(9-1)/8+(2^3)*7                =101(5+6)*4+(9-8)/1+(2^3)*7                =101(5+6)*8+(9-2)/7+(3^1)*4                =101(5+6)*8+(9-2)/7+(4^1)*3                =101(5+6)*8+(9-7)/2+(3^1)*4                =101(5+6)*8+(9-7)/2+(4^1)*3                =101(5+6)*9+(2-8)/3+(1^7)*4                =101(5+6)*9+(3-7)/2+(1^8)*4                =101(5+7)*4+(1-9)/8+(3^2)*6                =101(5+7)*4+(8-9)/1+(3^2)*6                =101(5+7)*6+(3-9)/2+(4^1)*8                =101(5+7)*6+(3-9)/2+(8^1)*4                =101(5+7)*6+(8-4)/2+(3^1)*9                =101(5+7)*6+(8-4)/2+(9^1)*3                =101(5+7)*8+(9-3)/6+(1^2)*4                =101(5+7)*8+(9-6)/3+(1^2)*4                =101(5+8)*3+(2-6)/4+(7^1)*9                =101(5+8)*3+(2-6)/4+(9^1)*7                =101(5+8)*3+(4-6)/2+(7^1)*9                =101(5+8)*3+(4-6)/2+(9^1)*7                =101(5+8)*7+(6-2)/4+(1^3)*9                =101(5+8)*7+(6-4)/2+(1^3)*9                =101(5+9)*6+(7-3)/4+(2^1)*8                =101(5+9)*6+(7-3)/4+(8^1)*2                =101(5+9)*6+(7-4)/3+(2^1)*8                =101(5+9)*6+(7-4)/3+(8^1)*2                =101(5+9)*7+(2-8)/6+(1^3)*4                =101(5+9)*7+(6-8)/2+(1^3)*4                =101(6+8)*5+(9-3)/2+(4^1)*7                =101(6+8)*5+(9-3)/2+(7^1)*4                =101(6+8)*7+(2-5)/3+(1^9)*4                =101(6+8)*7+(3-5)/2+(1^9)*4                =101(6+8)*7+(9-4)/5+(1^3)*2                =101(6+8)*7+(9-5)/4+(1^3)*2                =101(6+9)*4+(8-1)/7+(2^3)*5                =101(6+9)*4+(8-7)/1+(2^3)*5                =101(6+9)*5+(2-8)/3+(4^1)*7                =101(6+9)*5+(2-8)/3+(7^1)*4                =101(7+8)*5+(2-6)/4+(3^1)*9                =101(7+8)*5+(2-6)/4+(9^1)*3                =101(7+8)*5+(4-6)/2+(3^1)*9                =101(7+8)*5+(4-6)/2+(9^1)*3                =101(7+9)*4+(8-3)/5+(6^2)*1                =101(7+9)*4+(8-5)/3+(6^2)*1                =101(7+9)*6+(5-2)/3+(1^8)*4                =101(7+9)*6+(5-3)/2+(1^8)*4                =101(7+9)*6+(8-3)/5+(1^2)*4                =101(7+9)*6+(8-4)/2+(1^5)*3                =101(7+9)*6+(8-5)/3+(1^2)*4                =101`

The highest is 327723:

`(6+7)*3+(9-1)/2+(4^8)*5             =327723(7+6)*3+(9-1)/2+(4^8)*5             =327723`

For tautonyms, the lowest is 1313:

`(1+7)*4+(9-3)/6+(2^8)*5               =1313(1+7)*4+(9-6)/3+(2^8)*5               =1313(1+7)*8+(3-9)/6+(5^4)*2               =1313(1+7)*8+(6-9)/3+(5^4)*2               =1313(7+1)*4+(9-3)/6+(2^8)*5               =1313(7+1)*4+(9-6)/3+(2^8)*5               =1313(7+1)*8+(3-9)/6+(5^4)*2               =1313(7+1)*8+(6-9)/3+(5^4)*2               =1313`

and the highest tautonym is 19131913:

`(1+6)*5+(8-2)/3+(9^7)*4           =19131913(2+5)*6+(3-8)/1+(9^7)*4           =19131913(5+2)*6+(3-8)/1+(9^7)*4           =19131913(6+1)*5+(8-2)/3+(9^7)*4           =19131913`
`    5   dim Used(9)    6   kill "paltaut3.txt":open "paltaut3.txt" for output as #2   10   for G=1 to 9   20     Used(G)=1   30     for H=1 to 9   40       if Used(H)=0 then   50         :Used(H)=1   60         :Gh=G^H   70     :for I=1 to 9   80       :if Used(I)=0 then   90         :Used(I)=1  100         :Ghi=Gh*I  110     :for A=1 to 9  120       :if Used(A)=0 then  130         :Used(A)=1  140     :for B=1 to 9  150       :if Used(B)=0 then  160         :Used(B)=1  170     :for C=1 to 9  180       :if Used(C)=0 then  190         :Used(C)=1  200     :for D=1 to 9  210       :if Used(D)=0 then  220         :Used(D)=1  230     :for E=1 to 9  240       :if Used(E)=0 then  250         :Used(E)=1  260     :for F=1 to 9  270       :if Used(F)=0 then  280         :Used(F)=1  290         :V=(A+B)*C+(D-E)//F+Ghi  300         :if V=int(V) then  310            :print #2,A;B;C;D;E;F;G;H;I;using(19,0),V  320            :print A;B;C;D;E;F;G;H;I;using(19,0),V  330         :endif  340         :Used(F)=0  350       :endif  360     :next  370         :Used(E)=0  380       :endif  390     :next  400         :Used(D)=0  410       :endif  420     :next  430         :Used(C)=0  440       :endif  450     :next  460         :Used(B)=0  470       :endif  480     :next  490         :Used(A)=0  500       :endif  510     :next  520         :Used(I)=0  530       :endif  540     :next  550         :Used(H)=0  560       :endif  570     next H  580     Used(G)=0  590   next G  600   close #2`
`The results were then sorted and then analysed with:`
`OPEN "paltaut3.txt" FOR INPUT AS #1`
`DO  LINE INPUT #1, l\$  l\$ = LTRIM\$(RTRIM\$(MID\$(l\$, 29)))  pal = 1  FOR i = 1 TO LEN(l\$) / 2    IF MID\$(l\$, i, 1) <> MID\$(l\$, LEN(l\$) + 1 - i, 1) THEN pal = 0: EXIT FOR  NEXT  IF pal THEN p\$ = l\$  IF LEN(l\$) MOD 2 = 0 THEN    taut = 1    FOR i = 1 TO LEN(l\$) / 2     IF MID\$(l\$, i, 1) <> MID\$(l\$, i + LEN(l\$) / 2, 1) THEN taut = 0: EXIT FOR    NEXT    IF taut THEN     IF hadTaut = 0 AND pal = 0 THEN hadTaut = 1: PRINT l\$     t\$ = l\$    END IF  END IFLOOP UNTIL EOF(1)PRINT p\$PRINT t\$`

BTW, the highest without consideration of palindrome/tautonym, 939,524,151, is (5+4)*6 + (3-2)/1 + (8^9)*7

Primes:

There are 1198 primes on the list and the minimum prime is 27 and the maximum prime is 939,524,147, from

`list    1   Had=0    5   open "PALTAU~1.TXT" for input as #1   10   while not eof(1)   20    input #1,A:N=val(cutspc(A))   30    if prmdiv(N)=N then if Had=0 then print N:endif:Ct=Ct+1:Big=N:Had=1   40    if prmdiv(N)=0 then print "***";N:end   50   wend   60   print Big   70   print CtOKrun 29 939524147 1198OK`
`(3+7)*2+(9-4)*5+(1^6)*8                 =29(3+7)*2+(9-5)*4+(1^6)*8                 =29(3+8)*2+(9-4)*5+(1^7)*6                 =29(3+8)*2+(9-5)*4+(1^7)*6                 =29(4+7)*2+(3-9)*6+(1^5)*8                 =29(4+7)*2+(6-9)*3+(1^5)*8                 =29(4+7)*2+(8-3)*5+(1^9)*6                 =29(4+7)*2+(8-5)*3+(1^9)*6                 =29(5+6)*2+(3-7)*4+(1^9)*8                 =29(5+6)*2+(4-7)*3+(1^9)*8                 =29(5+7)*2+(9-3)*6+(1^8)*4                 =29(5+7)*2+(9-6)*3+(1^8)*4                 =29(5+8)*2+(3-9)*6+(1^7)*4                 =29(5+8)*2+(6-9)*3+(1^7)*4                 =29(6+5)*2+(3-7)*4+(1^9)*8                 =29(6+5)*2+(4-7)*3+(1^9)*8                 =29(6+7)*2+(3-8)*5+(1^9)*4                 =29(6+7)*2+(5-8)*3+(1^9)*4                 =29(7+3)*2+(9-4)*5+(1^6)*8                 =29(7+3)*2+(9-5)*4+(1^6)*8                 =29(7+4)*2+(3-9)*6+(1^5)*8                 =29(7+4)*2+(6-9)*3+(1^5)*8                 =29(7+4)*2+(8-3)*5+(1^9)*6                 =29(7+4)*2+(8-5)*3+(1^9)*6                 =29(7+5)*2+(9-3)*6+(1^8)*4                 =29(7+5)*2+(9-6)*3+(1^8)*4                 =29(7+6)*2+(3-8)*5+(1^9)*4                 =29(7+6)*2+(5-8)*3+(1^9)*4                 =29(8+3)*2+(9-4)*5+(1^7)*6                 =29(8+3)*2+(9-5)*4+(1^7)*6                 =29(8+5)*2+(3-9)*6+(1^7)*4                 =29(8+5)*2+(6-9)*3+(1^7)*4                 =29`
`(4+6)*5+(3-1)*2+(8^9)*7          =939524147(4+6)*5+(3-2)*1+(8^9)*7          =939524147(6+4)*5+(3-1)*2+(8^9)*7          =939524147(6+4)*5+(3-2)*1+(8^9)*7          =939524147`

 Posted by Charlie on 2010-03-23 15:33:34

 Search: Search body:
Forums (0)