Base Encoding
A standard technique for compressing numbers is to express them in a big base and encode the digits as characters. E.g. if you encode the number in base 256, it would have only 277 digits:
[12 24 156 48 101 149 235 32 96 92 20 203 202 164 144 71 193 127 112 77 141 79 210 183 98 155 16 151 65 198 26 236 83 221 220 129 169 254 43 124 245 25 176 182 167 124 95 191 77 25 233 139 190 7 135 2 149 90 163 163 106 193 220 253 109 129 57 219 91 157 218 18 223 11 171 113 209 173 207 123 110 220 79 139 176 143 171 7 30 35 231 151 172 83 120 114 119 47 217 227 50 105 236 91 161 226 112 16 170 57 162 147 36 89 26 9 122 164 15 15 243 108 30 14 233 139 103 137 82 169 2 57 54 71 154 136 23 203 137 10 219 153 24 168 42 218 165 125 185 183 241 91 193 85 195 71 186 18 98 34 196 78 6 193 252 8 177 94 5 24 137 183 127 129 9 77 149 73 148 193 62 220 146 33 130 21 209 153 229 105 100 188 87 235 203 104 207 161 20 17 102 150 252 120 242 222 233 248 114 217 142 31 196 42 161 173 0 244 9 213 178 152 122 170 136 230 135 132 245 69 9 196 231 147 8 175 48 98 101 23 162 144 190 200 62 226 61 27 200 15 232 12 105 187 184 4 121 252 171 240 230 94 161 151 131 209 205 130 193 9 4 155 92 48 59 130 93]
Or expressed as a string
"0eë `\ËʤGÁpMOÒ·bAÆìSÝÜ©þ+|õ°¶§|_¿Mé¾Z££jÁÜým9Û[Úß«qÑÏ{nÜO°«#ç¬Sxrw/Ùã2iì[¡âpª9¢$Y z¤ólégR©96GË
Û¨*Ú¥}¹·ñ[ÁUÃGºb\"ÄNÁü±^· MIÁ>Ü!Ñåid¼WëËhÏ¡füxòÞéørÙÄ*¡ô Õ²zªæõE Äç¯0be¢¾È>â=Èèi»¸yü«ðæ^¡ÑÍÁ \0;]"
(Plus some unprintable characters which are stripped by SE.)
Of course, that's still too long for your 255 character allowance. If you're actually talking about characters though (as opposed to bytes), you can go into Unicode and use a much bigger base. How about 216? That's only 139 digits:
[12 6300 12389 38379 8288 23572 52170 42128 18369 32624 19853 20434 46946 39696 38721 50714 60499 56796 33193 65067 31989 6576 46759 31839 48973 6633 35774 1927 661 23203 41834 49628 64877 33081 56155 40410 4831 2987 29137 44495 31598 56399 35760 36779 1822 9191 38828 21368 29303 12249 58162 27116 23457 57968 4266 14754 37668 22810 2426 41999 4083 27678 3817 35687 35154 43266 14646 18330 34839 52105 2779 39192 43050 55973 32185 47089 23489 21955 18362 4706 8900 19974 49660 2225 24069 6281 46975 33033 19861 18836 49470 56466 8578 5585 39397 26980 48215 60363 26831 41236 4454 38652 30962 57065 63602 55694 8132 10913 44288 62473 54706 39034 43656 59015 34037 17673 50407 37640 44848 25189 6050 37054 51262 57917 7112 4072 3177 48056 1145 64683 61670 24225 38787 53709 33473 2308 39772 12347 33373]
(I can't include the actual string here, because it contains some CJK characters that are banned by SE.)
Now that seems more doable. You just need to be able to decode it in 116 characters. If you can't, Unicode has a lot more than 216 characters, so you could try using an even larger base.
base64 (or higher) encoding – Luis Mendo – 2016-01-25T22:00:01.527
2Are you sure that the actual number from your challenge doesn't have some property that makes it easier to compress that may be lost due to the reshuffling? I don't think Luis's suggestions is gonna cut it. Even in base 256, this still has 277 digits. Of course you said you've got "255 characters", so I guess in principle you could use a much bigger base like 2^16, and go into Unicode. – Martin Ender – 2016-01-25T22:08:21.150
4This is asking for the shortest code to produce a number, which is absolutely asking for golfing advice. My concern is the source is uncredited -- the challenge should be linked if possible so we have attribution and can check it's OK to give outside help. – xnor – 2016-01-25T22:15:13.583
I have 255 chars to use, and I need to describe the same number. The description is meant to be run through eval() to produce the original number: is it acceptable for you to read the number from an external resource, such as a web page? – Luis Mendo – 2016-01-26T17:07:33.230
@LuisMendo No, it has to be self contained. Additionally, it can only use chars that are legal in a filename. – Christian Sonne – 2016-01-26T19:01:41.023
I'm with @MartinBüttner on suspecting the original number has some property that makes it easier to represent than an arbitrary integer. – Sparr – 2016-01-26T23:33:18.647
Can you clarify "arithmetic expression"? Your elaboration mentions using eval(). Without further limitation, eval() allows loops and other constructs. If you truly mean to restrict this to only arithmetic, can we get a list of legal operations? – Sparr – 2016-01-26T23:34:17.133
the viability of certain approaches changes in different languages. python wants infix expressions, which means it needs parentheses. the same expressions in prefix or postfix can do without parentheses which makes a big difference to some approaches. you've tagged the question as python, but it would still be a good question without that restriction. – Sparr – 2016-01-31T02:40:43.947