49
\$\begingroup\$

Output this 1364-digit base-10 number:

10346063175382775954983214965288942351853612536382034663905935101461222060548195774084941504127779027795484711048746289269095513027910438498906751225648197766590064457965461314130149942152545074712074006545797623075756579902190433531325851645586375231773037880535184421903026638874897489950008250798014478066014893203193926076357920163707042852616942733354325378261468425502224936203089956427521668102778596882443702230532724374828028933960643144327285227754985461570358500265135333500954075465441985256254776102064625494398779453723330206306859677410408807692326906168737018862161148707729611012076342295413323680430446529763872458887191437347994063250920466184003173586602441075384748222102267773145003624260992372156354624662289026123081819214885321984526331716887191378907363723962768881646531494039722207338471537744184950666337656928147552391544567298663655079621129011773598162469141317639170063853667739680653118979048627652462235681893246541359880812508588104345141359691398313598202577424145658860334913269759048622492214169304247816441675958725602279911468750380291607080058491441201347157459047314438815796116358356171983789000270540329047696182295315977628397256525031861796294929740163865774776146472541890007191451515587790900275580657982495983198842069735835409348390389014043245596652434869311982404102985853034513631928339140603461069829946906350

This number is the entire text of the singularly elegant puzzle Ginormous by Derek Kisman from the 2005 MIT Mystery Hunt. It encodes a single-word message in a clever multilayered way for solvers to figure out without any instructions. You might want to try solving the puzzle before reading further.

How was this number produced? We reverse the steps from the puzzle solution. Since the solution performs repeated prime factorization, we produce the number by repeatedly multiplying specific primes derived from the previous step.

  1. Start with the solution word UNSHARPENED and convert it to a list of numbers with A=1, ... Z=26 to get [21, 14, 19, 8, 1, 18, 16, 5, 14, 5, 4].

  2. Convert each number to a 5-digit prime where:

    • the first two digits count up from 13
    • the third and fourth digits are the numbers from the previous step, with a leading zero for one-digit numbers
    • the last digit is the smallest one to make the whole 5-digit number prime

    This gives:

    13217
    14143
    15193
    16087
    17011
    18181
    19163
    20051
    21143
    22051
    23041
    

    Find their product 58322536285290033985886806240808836417438318459.

  3. Take the digits, 5, 8, 3, ... and count up from 0 skipping that many values in between.

    • Skip 5 numbers after 0 to get 6
    • Skip 8 numbers after 6 to get 15
    • Skip 3 numbers after 15 to get 19
    • ... and so on

    This gives you:

    [6, 15, 19, 22, 25, 31, 35, 42, 45, 54, 60, 63, 73, 74, 75, 79, 83, 93, 102, 108, 117, 126, 133, 142, 143, 150, 153, 158, 159, 168, 169, 178, 187, 191, 198, 203, 205, 213, 218, 222, 231, 235, 237, 246, 251, 257, 267]
    

    Take the respective \$n\$'th highest-primes (the 6th prime is 13, the 15th prime is 47, ...) and multiply them

    13 * 47 * 67 * 79 * 97 * 127 * 149 * 181 * 197 * 251 * 281 * 307 * 367 * 373 * 379 * 401 * 431 * 487 * 557 * 593 * 643 * 701 * 751 * 821 * 823 * 863 * 883 * 929 * 937 * 997 * 1009 * 1061 * 1117 * 1153 * 1213 * 1237 * 1259 * 1303 * 1361 * 1399 * 1453 * 1483 * 1489 * 1559 * 1597 * 1621 * 1709
    

    to get:

    142994592871080776665367377010330975609342911590947493672510923980226345650368095529497306323265234451588273628492018413579702589
    
  4. Finally, take the digits 1, 4, 2, ..., 8, 9 and put them as powers of successive primes in the factorization \$2^1 3^4 5^2 \cdots 719^8 727^9\$ to get the final number:

    10346063175382775954983214965288942351853612536382034663905935101461222060548195774084941504127779027795484711048746289269095513027910438498906751225648197766590064457965461314130149942152545074712074006545797623075756579902190433531325851645586375231773037880535184421903026638874897489950008250798014478066014893203193926076357920163707042852616942733354325378261468425502224936203089956427521668102778596882443702230532724374828028933960643144327285227754985461570358500265135333500954075465441985256254776102064625494398779453723330206306859677410408807692326906168737018862161148707729611012076342295413323680430446529763872458887191437347994063250920466184003173586602441075384748222102267773145003624260992372156354624662289026123081819214885321984526331716887191378907363723962768881646531494039722207338471537744184950666337656928147552391544567298663655079621129011773598162469141317639170063853667739680653118979048627652462235681893246541359880812508588104345141359691398313598202577424145658860334913269759048622492214169304247816441675958725602279911468750380291607080058491441201347157459047314438815796116358356171983789000270540329047696182295315977628397256525031861796294929740163865774776146472541890007191451515587790900275580657982495983198842069735835409348390389014043245596652434869311982404102985853034513631928339140603461069829946906350
    
\$\endgroup\$
1
  • 18
    \$\begingroup\$ I think it‘ll be really interesting to see whether compression or the described method will win is various different golfing languages \$\endgroup\$ Feb 7, 2021 at 20:19

25 Answers 25

19
\$\begingroup\$

Jelly,  32  30 bytes

“Œɱl»O_96×⁵Ėḅȷ+12ȷÆnPD‘ÄÆNPDÆẸ

Try it online!

How?

“Œɱl»O_96×⁵Ėḅȷ+12ȷÆnPD‘ÄÆNPDÆẸ - Link: no arguments
“Œɱl»                          - dictionary word      "unsharpened"
     O                         - ordinals             [117,110,115,104,97,114,112,101,110,101,100]
      _96                      - minus 96             [21,14,19,8,1,18,16,5,14,5,4]
         ×⁵                    - times ten            [210,140,190,80,10,180,160,50,140,50,40]
           Ė                   - enumerate            [[1,210],[2,140],[3,190],[4,80],[5,10],[6,180],[7,160],[8,50],[9,140],[10,50],[11,40]]
            ḅȷ                 - from base 1000       [1210,2140,3190,4080,5010,6180,7160,8050,9140,10050,11040]
              +12ȷ             - add 12000            [13210,14140,15190,16080,17010,18180,19160,20050,21140,22050,23040]
                  Æn           - next prime above     [13217,14143,15193,16087,17011,18181,19163,20051,21143,22051,23041]
                    P          - product              58322536285290033985886806240808836417438318459
                     D         - digits               [5,8,3,2,2,5,3,6,2,8,5,2,9,0,0,3,3,9,8,5,8,8,6,8,0,6,2,4,0,8,0,8,8,3,6,4,1,7,4,3,8,3,1,8,4,5,9]
                      ‘        - increment            [6,9,4,3,3,6,4,7,3,9,6,3,10,1,1,4,4,10,9,6,9,9,7,9,1,7,3,5,1,9,1,9,9,4,7,5,2,8,5,4,9,4,2,9,5,6,10]
                       Ä       - cumulative sums      [6,15,19,22,25,31,35,42,45,54,60,63,73,74,75,79,83,93,102,108,117,126,133,142,143,150,153,158,159,168,169,178,187,191,198,203,205,213,218,222,231,235,237,246,251,257,267]
                        ÆN     - nth prime            [13,47,67,79,97,127,149,181,197,251,281,307,367,373,379,401,431,487,557,593,643,701,751,821,823,863,883,929,937,997,1009,1061,1117,1153,1213,1237,1259,1303,1361,1399,1453,1483,1489,1559,1597,1621,1709]
                          P    - product              142994592871080776665367377010330975609342911590947493672510923980226345650368095529497306323265234451588273628492018413579702589
                           D   - digits               [1,4,2,9,9,4,5,9,2,8,7,1,0,8,0,7,7,6,6,6,5,3,6,7,3,7,7,0,1,0,3,3,0,9,7,5,6,0,9,3,4,2,9,1,1,5,9,0,9,4,7,4,9,3,6,7,2,5,1,0,9,2,3,9,8,0,2,2,6,3,4,5,6,5,0,3,6,8,0,9,5,5,2,9,4,9,7,3,0,6,3,2,3,2,6,5,2,3,4,4,5,1,5,8,8,2,7,3,6,2,8,4,9,2,0,1,8,4,1,3,5,7,9,7,0,2,5,8,9]
                            ÆẸ - prime exponentiate   (answer)
\$\endgroup\$
11
\$\begingroup\$

JavaScript (Node.js), 149 bytes

d=>(F=n=>[...n+''].map(h=v=>(g=k=>x%--k?g(k):k>1)(++x)||!d&&v--?h(v):p*=x**BigInt(d?v:1),p=x=1n)&&p)(d=F(0xA3745E1D28D1E3702D3F5F1E336A3F1A64F7F7Bn))

Try it online!

How?

The result of the 2nd step is hard-coded as a BigInt in hexadecimal:

0xA3745E1D28D1E3702D3F5F1E336A3F1A64F7F7Bn

The 3rd and 4th steps are similar enough to be processed with the same helper function F, whose exact behavior depends on the flag d.

d =>
  // 4th step: invoke F with d truthy
  F(
    d =
      // 3rd step: invoke F with d falsy (undefined)
      F(0xA3745E1D28D1E3702D3F5F1E336A3F1A64F7F7Bn)
  )

Where F is defined as follows:

F = n =>             // F is a helper function taking a BigInt n
  [...n + '']        // turn n into a list of digits
  .map(h = v =>      // h is a recursive callback; for each digit v:
    ( g = k =>       //   g is a recursive function taking a divisor k:
      x % --k ?      //     decrement k; if k is not a divisor of x:
        g(k)         //       do recursive calls until it is
      :              //     else:
        k > 1        //       return true if k > 1, i.e. x is composite
    )(++x)           //   initial call to g with k = x incremented
    ||               //   if x is composite
    !d && v-- ?      //   or d is not set and v is not equal to 0:
      h(v)           //     do a recursive call to h
    :                //   else:
      p *=           //     multiply p by
        x ** BigInt( //     the prime x raised to the power of
          d ? v : 1  //     either v if d is set, or 1 otherwise
        ),           //
    p = x = 1n       //   start with p = x = 1
  ) && p             // end of map(); return p
\$\endgroup\$
1
  • 1
    \$\begingroup\$ I am currently speechless and in awe. \$\endgroup\$
    – dgo
    Feb 10, 2021 at 17:19
9
\$\begingroup\$

Python 2, 1370 bytes

print 10346063175382775954983214965288942351853612536382034663905935101461222060548195774084941504127779027795484711048746289269095513027910438498906751225648197766590064457965461314130149942152545074712074006545797623075756579902190433531325851645586375231773037880535184421903026638874897489950008250798014478066014893203193926076357920163707042852616942733354325378261468425502224936203089956427521668102778596882443702230532724374828028933960643144327285227754985461570358500265135333500954075465441985256254776102064625494398779453723330206306859677410408807692326906168737018862161148707729611012076342295413323680430446529763872458887191437347994063250920466184003173586602441075384748222102267773145003624260992372156354624662289026123081819214885321984526331716887191378907363723962768881646531494039722207338471537744184950666337656928147552391544567298663655079621129011773598162469141317639170063853667739680653118979048627652462235681893246541359880812508588104345141359691398313598202577424145658860334913269759048622492214169304247816441675958725602279911468750380291607080058491441201347157459047314438815796116358356171983789000270540329047696182295315977628397256525031861796294929740163865774776146472541890007191451515587790900275580657982495983198842069735835409348390389014043245596652434869311982404102985853034513631928339140603461069829946906350

Try it online!

\$\endgroup\$
14
  • 6
    \$\begingroup\$ Welcome to the site. Couple of points... 1. In Python 3 print is a function so you need brackets round the value which makes it 1371 (you could switch to Python 2 to avoid this). 2. Generally the idea of Kolmogorov complexity challenges is to find a way that is actually shorter than the text in the challenge. 3. Don't give up! You are welcome to make changes to your answer and improve it after you have posted. \$\endgroup\$
    – ElPedro
    Feb 7, 2021 at 19:52
  • 16
    \$\begingroup\$ To the downvoters. Why? This is a new member who has obviously taken our comments on board and made some effort to improve their answer. "Seth is a new contributor. Be nice, and check out our Code of Conduct." A downvote for a new member for a technically correct answer does not fit in with that for me. \$\endgroup\$
    – ElPedro
    Feb 7, 2021 at 20:49
  • 11
    \$\begingroup\$ @ElPedro I didn’t downvote, but I can see why someone more critical might. This is a valid answer, but it’s also a fairly boring one. There are many different ways to approach this challenge, and, as with most kolmos, simply printing the expected output is the most boring method. That‘s not to say that this is bad per se, simply that it could be more interesting \$\endgroup\$ Feb 7, 2021 at 20:52
  • 6
    \$\begingroup\$ @ElPedro this answer has four times as many upvotes as the shortest 2 answers - because it's a "new contributor" and a "technically correct answer". Can you come up with a more boring answer? Is this answer 4 times better than those 2 Jelly answers? \$\endgroup\$ Feb 8, 2021 at 4:01
  • 7
    \$\begingroup\$ I down voted. I don't believe this user has made an effort to write a short function. Printing the required number is not interesting, not short and not educational. \$\endgroup\$ Feb 9, 2021 at 6:51
8
\$\begingroup\$

Jelly, 33 bytes

13r23×ȷ
“Œɱl»ØaiⱮ⁵×¢+ÆnPD‘ÄÆNPDÆẸ

Try it online!

Full program, outputting to standard output.

Explanation

So, it turns out that at least in Jelly, it makes sense to go all the way through the process right from the start, rather than encoding the steps one at a time.

13r23×ȷ
  r       inclusive range from
13 23     13 to 23
     ×ȷ   multiply each element by 1000 (giving 13000, 14000, … 23000)

 

“Œɱl»ØaiⱮ⁵×¢+ÆnPD‘ÄÆNPDÆẸ
“Œɱl»                       "unsharpened" (specified via dictionary index)
       i                    take 1-based index of
        Ɱ                     each letter
     Øa                       in the lowercase alphabet

          ×                 multiply each of those indexes by
         ⁵                    10
            +               add {corresponding elements of}
           ¢                  the constant computed on the preceding line
             Æn             take the next prime {above each element}
               P            take the product

                D           express as decimal digits
                 ‘          increment each digit
                  Ä         take cumulative sum
                   ÆN       take the nth prime {for each element n}
                     P      take the product

                      D     express as decimal digits
                       ÆẸ   interpret as exponents of consecutive primes

Yes, turns out step 4 is actually a Jelly builtin!

It's obvious that calculating steps 3 and 4, rather than hardcoding the result, gives savings; likewise for most of step 2 (the rule for encoding the offsets of 13000, 14000, etc. is fairly verbose but much smaller than the offsets themselves). My second-best attempt hardcodes the output just after the ⁵× (the numbers are all under 250 so can be written as a byte each), but it's still slightly more verbose than starting from the start:

“Ż⁼ȦP½Ṇɦ2⁼2(‘   [210, 140, 190, 80, 10, 180, 160, 50, 140, 50, 40]
“Œɱl»ØaiⱮ⁵×     alphabet indexes of "unsharpened", times 10

(Another possibility would be to use base conversion, but this ends up even longer because there's no terse way to specify the base, and you still need to spend two bytes for the multiplication by 10.)

\$\endgroup\$
8
\$\begingroup\$

Python 3.8, 207 \$\cdots\$ 192 188 bytes

Saved 3 5 bytes thanks to user202729!!!
Saved a byte thanks to the man himself Arnauld!!!
Saved 4 bytes thanks to att!!!
Saved 4 bytes thanks to ovs!!!

from math import*
p=[n for n in range(2,1710)if perm(n-1)**2%n];i=s=1
for n in str(int("S87MGJSI5MYQMC8O1HDMTTI1EE4FWB",36)):i-=~int(n);s*=p[i]
print(prod(p.pop(0)**int(b)for b in str(s)))

Try it online!

Prints the ginormous number by computing it starting with a slightly altered version of the huge number from the \$2^{\text{nd}}\$ step.

\$\endgroup\$
4
  • \$\begingroup\$ i-=~int(n) saves a byte \$\endgroup\$
    – Arnauld
    Feb 8, 2021 at 1:22
  • \$\begingroup\$ @Arnauld Nice one - thanks! :D \$\endgroup\$
    – Noodle9
    Feb 8, 2021 at 1:26
  • 2
    \$\begingroup\$ The large integer is one byte shorter in base 36: int("S87MGJSI5MYQMC8O1HDMTTI1EE4FWB",36). And prod(p.pop(0)**int(b)for b in str(s)) saves two more bytes. And perm(n-1)**2%n instead of perm(n-1)%n>n-2. \$\endgroup\$
    – ovs
    Feb 8, 2021 at 10:51
  • \$\begingroup\$ @ovs Wow, brilliant stuff - thanks! :D \$\endgroup\$
    – Noodle9
    Feb 8, 2021 at 13:05
7
\$\begingroup\$

Python 2, 151 bytes

This is two bytes shorter than my previous answer, thanks to an insight from @xnor.

x=r=n=2
for c in"!NwXv\erA$xV}G_sTJBDRPR;V\!=[u,4bzroe_:\0Ik X4;d.d":n=n<<7|ord(c)
while n:
 x+=1
 if~-2**x%x<2:r*=x**(n%10);n/=10
print r

Try it online!

Due to Python's verbosity, it seems best to directly use the number from the end of step 3, instead of computing it. Fermat's primality test can be used to calculate the primes. For some pseudoprime numbers (namely 561, 645, 341) the test fails, in which 0 is used as the exponent instead.

Python 2, 158 153 bytes

-2 bytes thanks to @ovs
-3 bytes thanks to @Sisyphus

a=b=r=n=1
for c in"c!U!u5uk^CvmInk~)3Ii0@45x:ja'eh?tMSmwPDQK%a":n=n*129+ord(c)
while n:
 if a%b:r*=b**(n%10);n/=10
 a*=b*b;b+=1
print r

Try it online!

Primes are found using Wilson's theroem.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ -2 bytes by using a while loop instead of exec. \$\endgroup\$
    – ovs
    Feb 7, 2021 at 23:26
  • 1
    \$\begingroup\$ 153 following on from ovs: Try it online!, or 152 in Python 3 due to byte literals: Try it online! \$\endgroup\$
    – Sisyphus
    Feb 8, 2021 at 0:05
  • \$\begingroup\$ Maybe it could save bytes to use a pseudoprimality test like ~-2**b%b<2 and modify n to include zero digits at the pseudoprime positions? \$\endgroup\$
    – xnor
    Feb 10, 2021 at 1:01
  • \$\begingroup\$ @xnor That's a promising idea. I'll see if I can come up with something that's shorter. \$\endgroup\$ Feb 10, 2021 at 1:26
  • \$\begingroup\$ Can you remove a byte by replacing \0 with a literal null byte? \$\endgroup\$ Feb 10, 2021 at 2:45
6
\$\begingroup\$

05AB1E, 36 bytes

Only the first step is hardcoded. Thanks to Kevin Cruijssen for helping with this!

∞<Ø•BIº£¡P°•₂вā12+т*+T*ÅNPS>ηO<ØPSmP

Try it online!

Commented:

             # step 1:
•BIº£¡P°•    # compressed integer 3044554559124550
         ₂в  # convert to base 26 digits
             # [21, 14, 19, 8, 1, 18, 16, 5, 14, 5, 4]

             # step 2:
ā            # get a range from 1 in the same length as the result from step 1
 12+         # add 12 to each value
    т*       # multiply by 100
      +      # add element-wise to the result of the first step
       T*    # multiply each value by 10
         ÅN  # find the next prime
           P # take the product

             # step 3:
S            # split into digits 
 >           # increment each digits
  ηO         # take the sum of each prefix of this list
    <        # decrement every sum
     Ø       # take the 0-based nth prime
      P      # take the product of the primes

             # step 4:
∞            # push infinite list [1, 2, 3, ...]
 <           # decrement each value
  Ø          # take the 0-based nth prime
   ...       # this list of primes is at the bottom of the stack during all other steps
      S      # split the result of the third step into digits
       m     # raise each prime to a digit power
        P    # take the product

05AB1E, 36 bytes

The first 2.5 steps are hardcoded.

∞<Ø•1‘;67₃в©¾ΛM„ØΩüñïΩ'ÿ•.¥āÌÌ+ØPSmP

Try it online!

Commented:

∞                       # push infinite list: [1, 2, 3, ...]
 <                      # decrement each value
  Ø                     # for each number, get the 0-based nth prime: [2, 3, 5, ...]
                        # this prime list will be needed in the last step
   •1...ÿ•              # large compressed integer
          .¥            # take the cumulative sum of the digits
            ā           # push a range of the same length: [1, 2, ..., length]
             ÌÌ         # add 4 to each value: [4, 5, ..., length+4]
               +        # add this element-wise to the cumulative sums
                        # this results in the list from step 3
                Ø       # take the nth primes (0-based)
                 P      # take their product
                  S     # split into digits
                   m    # for each digit, raise a corresponding prime to this power
                    P   # take the product
\$\endgroup\$
7
  • 1
    \$\begingroup\$ Nice answer! Since I was curious: it's 43 bytes if we implement all steps to the letter and 569 bytes if we simply compress the output-number. \$\endgroup\$ Feb 8, 2021 at 10:27
  • 1
    \$\begingroup\$ @KevinCruijssen You can save a few bytes on the second step, but this is still longer than just hardcoding it: 40 bytes \$\endgroup\$
    – ovs
    Feb 8, 2021 at 10:34
  • 1
    \$\begingroup\$ Ah, >ā12+т*+T*ÅN is indeed better than ε>T‰JN13+ì0«ÅN}. :) The compressed string .•GYj₂,+§• vs dictionary string ’un¦ãened’ are the same length, though. But hard-coding the first few steps as compressed integer is indeed shorter, which isn't too surprising. \$\endgroup\$ Feb 8, 2021 at 10:38
  • 1
    \$\begingroup\$ @KevinCruijssen but compressing the alphabet indices instead of the word gets quite close to the current answer at 37 bytes (I was able to save another byte in step 3 by using ηO instead of .¥¦) \$\endgroup\$
    – ovs
    Feb 8, 2021 at 10:43
  • 1
    \$\begingroup\$ You can golf another byte in that 37 byte version by using a base-26 compressed list instead of base-22 to tie with your current answer as alternative: try it online. :) \$\endgroup\$ Feb 8, 2021 at 11:35
6
\$\begingroup\$

This first attempt is mildly golfed, but represents an authentic implementation of the spec. The final number is split into multiple lines, each terminated by \ (as per normal bc output). If this is not acceptable, I can add a few more bytes to make it all one line.

Bash + common linux utils, 241

m()(paste -sd* -|bc)
r=primes
printf 1$($r 1 1800|sed -nf <(for p in $(printf UNSHARPENED|od -An -w1 -td1|awk '{print 1000*NR+11360+$1*10}');do
$r $p|sed 1q
done|m|sed s/./\&+1+p/g|dc|sed s/$/p/)|m|sed 'N;s/\\\n//;s/./*%s^&/g') $($r 1 728)|m

Try it online!


The above gives some good starting points to get golfing. Here we skip straight to step 3:

Bash + common linux utils, 186

m()(paste -sd* -|bc)
printf 1$(primes 1 1800|sed -nf <(sed s/./\&+1+p/g<<<58322536285290033985886806240808836417438318459|dc|sed s/$/p/)|m|sed 'N;s/\\\n//;s/./*%s^&/g') $(primes 1 728)|m

Try it online!


Skipping to step 4 is a little longer:

Bash + common linux utils, 191

printf 1$(sed s/./*%s^\&/g<<<142994592871080776665367377010330975609342911590947493672510923980226345650368095529497306323265234451588273628492018413579702589) $(primes 1 728)|paste -sd* -|bc

Try it online!


But the best seems to be representing the step 4 input as hex, and splitting (to work around dc/bc output length limits):

Bash + common linux utils, 177

printf 1$(dc<<<16i15B99C0EC8211C220ED814252AE350B502C02270461072F62C9A4CCn8CDAF145DAB65AE8478B533CCF0F1E3364D943BA2D9FFA4E913Dn|sed s/./*%s^\&/g) $(primes 1 728)|paste -sd* -|bc

Try it online!

\$\endgroup\$
2
  • \$\begingroup\$ What package is primes from? \$\endgroup\$
    – qwr
    Feb 10, 2021 at 8:18
  • 1
    \$\begingroup\$ @qwr primes comes from the bsdgames package. \$\endgroup\$ Feb 10, 2021 at 16:21
6
\$\begingroup\$

PowerShell, 345 325 bytes

-20 bytes thanks to mazzy!!

This is a bit of a silly answer just for the fun of it. It could probably definitely be golfed further, but I got tired of fiddling with the numbers. This is derived from the prime factorization of the 1264-digit number. Effectively, I factorized the number, then broke the factors into groups based on how many times they occur in the factorization, then multiplied those groups into the largest numbers PowerShell will parse to cut down on '*' characters. Not terribly exciting, but I was curious how far this method would cut the number down.

"$(echo 19805596543926073442 78873566720902235*18013318998359734663 593140350139852859*8104731785668783073 6644372255178073982360301 1353238597766773*12805823735079030233 6662348615646027385791148837 13372864637471*7423896006336743 14127919992957378413027 74874566303993533*2096862721178836784989|%{"[bigint]$_*"*++$i})1"|iex

Try it online!

\$\endgroup\$
6
  • \$\begingroup\$ somehow not the longest answer here, lol. \$\endgroup\$
    – Razetime
    Feb 11, 2021 at 13:10
  • \$\begingroup\$ @Razetime I was just as surprised as you are, lol. \$\endgroup\$ Feb 11, 2021 at 13:17
  • \$\begingroup\$ Zaelin, impressive approach. and you can save some bytes :) 325 bytes \$\endgroup\$
    – mazzy
    Feb 13, 2021 at 9:34
  • \$\begingroup\$ and 274 bytes fro PS7 "$(echo 112DB9D1F456AF862 111A19A14BD819ECF526C1BCD398EFD 39DD766B3D820D44E8616DE6270C4DB 57F002446038043FFDAED 35666F52ECE377C05B4C230C4722D 1586F732259F38F995FD7325 140C97667318C03C0CB46E1F9 2FDE0469CAAA3C2C1E3 761D6CCCEBCD50E94AAC9BEE7A16D5A9|%{("0x$_"+"n*")*++$i})1"|iex \$\endgroup\$
    – mazzy
    Feb 13, 2021 at 11:39
  • \$\begingroup\$ WOW how in earth you were able to factorize this huge number? \$\endgroup\$
    – Wasif
    Apr 8, 2021 at 15:40
5
\$\begingroup\$

J, 83 bytes

*/(p:@i.@#^x:)"."0":*/p:<:+/\1x+"."0":4*/@p:((1e3*12+#\)+10*_64x+3&u:)'UNSHARPENED'

Try it online!

This is just a straightforward translation of the steps in reverse.

\$\endgroup\$
5
\$\begingroup\$

Husk, 54 53 bytes

Πz`^İpdΠm!İptGo→+0dΠz(`ḟİp≥*10+*100)→½ḣ23mo-96c¨unẇṗ±

Try it online!

Uses the complete method as described.

Step 1: mo-96c¨unẇṗ± Subtract 96 from the character values of each letter in the compressed string ¨unẇṗ± = 'unsharpened'.

Step 2: Πz(`ḟİp≥*10+*100)…13 23 Zip previous list with 13...23 by multiplying arg2 by 100, adding arg1, multiplying by 10, and getting the first prime greater-or-equal to this; then take the product.

Step 3: Πm!İptGo→+0d Get decimal digits, and scan (sequentially apply function to each element and previous result, keeping intermediate results) by adding and incrementing; then get the primes at these indices and take the product.

Step 4: Πz`^İpd Get decimal digits, zip with list of primes by taking exponent; then take the product.

\$\endgroup\$
5
\$\begingroup\$

Haskell, 139 bytes

t.zipWith(^)p.f.f$fromEnum<$>"آ\\maXyZ]k^d"
f=map(read.pure).show.t.map(p!!).scanl1((+).(+1))
p=[x|x<-[2..],mod(-t[1..x-1])x==1]
t=product

Try it online! (the code above times out on TIO, so the link points to a slightly more efficient version).

How?

♣ Preliminaries

t=product defines an alias for product (the builtin name is so long that even using it twice saves bytes). p=[x|x<-[2..],mod(-t[1..x-1])x==1] is the list of all prime numbers, courtesy of xnor's well known trick based on Wilson's theorem.

♣ Steps 1-2

f$fromEnum<$>"آ\\maXyZ]k^d"
f=map(read.pure).show.t.map(p!!).scanl1((+).(+1))

We start from the unicode string "آ\\maXyZ]k^d" (actually all the characters but the first are printable ASCII characters), and we extract their code points in a list of integers thanks to (fromEnum<$>). The result is the following list.

[1570,92,109,97,88,121,90,93,107,94,100]

What's special about this list? Let's see what happens when we pass it to the function f.

  • scanl1((+).(+1))\$\implies\$[1570,1663,1773,1871,1960,2082,2173,2267,2375,2470,2571]. Nope, still very mysterious.
  • map(p!!)\$\implies\$[13217,14143,15193,16087,17011,18181,19163,20051,21143,22051,23041]. Ah-ah! Indexing into the list of primes yields exactly the prime numbers described in step 2.
  • t\$\implies\$58322536285290033985886806240808836417438318459. We take the product.
  • map(read.pure).show\$\implies\$[5,8,3,2,...,8,4,5,9]. Finally, we get a list of the individual digits.

This is definitely not the shortest way of obtaining this list. For instance, simply encoding the product in hexadecimal and then extracting the digits would require fewer bytes. However, having already defined the function f, performing step 3 is trivial.

♣ Step 3

f

Don't believe it? Let's try applying f once more, this time starting from [5,8,3,2,...,8,4,5,9].

  • scanl1((+).(+1))\$\implies\$[5,14,18,21,...,245,250,256,266]. As described in the problem statement, we count up from 0, skipping 5 numbers, then 8 numbers, and so on. This list is different from the one described in the statement (each number is decremented by one) since our list of primes is 0-indexed.
  • map(p!!)\$\implies\$[13,47,67,79,...,1559,1597,1621,1709]. We index into the list of primes.
  • map(read.pure).show.t\$\implies\$[1,4,2,9,...,2,5,8,9]. Just as before, we compute the product and we split it into individual digits.

♣ Step 4

t.zipWith(^)p

Step 4 is relatively boring. We raise each prime to the corresponding digit (zipWith(^)p) and we take the product (t).

♣ Output

As expected, the output is

10346063175382775954983214965288942351853612536382034663905935101461222060548195774084941504127779027795484711048746289269095513027910438498906751225648197766590064457965461314130149942152545074712074006545797623075756579902190433531325851645586375231773037880535184421903026638874897489950008250798014478066014893203193926076357920163707042852616942733354325378261468425502224936203089956427521668102778596882443702230532724374828028933960643144327285227754985461570358500265135333500954075465441985256254776102064625494398779453723330206306859677410408807692326906168737018862161148707729611012076342295413323680430446529763872458887191437347994063250920466184003173586602441075384748222102267773145003624260992372156354624662289026123081819214885321984526331716887191378907363723962768881646531494039722207338471537744184950666337656928147552391544567298663655079621129011773598162469141317639170063853667739680653118979048627652462235681893246541359880812508588104345141359691398313598202577424145658860334913269759048622492214169304247816441675958725602279911468750380291607080058491441201347157459047314438815796116358356171983789000270540329047696182295315977628397256525031861796294929740163865774776146472541890007191451515587790900275580657982495983198842069735835409348390389014043245596652434869311982404102985853034513631928339140603461069829946906350
\$\endgroup\$
4
\$\begingroup\$

Charcoal, 99 83 64 bytes

≔…²⊗φθF⁴²≔⁻θ×θ⁺²ιθIΠEIΠE⁴⁷§θ⁺κΣ…”)¶↘…⊘¤|⟧≦?Lν~⊘θ¿nê₂ηYx”⊕κX§θκIι

Try it online! Link is to verbose version of code. Would take 570 bytes as a compressed string literal. Explanation:

≔…²⊗φθF⁴²≔⁻θ×θ⁺²ιθ

Find all the primes below 2000 by multiplying the range from 2 to 2000 by all integers from 2 to 43 and taking the set difference.

IΠEIΠE⁴⁷§θ⁺κΣ…”)¶↘…⊘¤|⟧≦?Lν~⊘θ¿nê₂ηYx”⊕κX§θκIι

Add the digital sum of each nontrivial prefix of the compressed string literal to the current index and use that to index into the primes. Cast the product of those primes to string. For all of this string's digits, take the prime at that index and raise it to the power of that digit. Print the final product.

Previous 99 80-byte solution also performed steps 1 and 2. (I also tried step 4 only, but that took 103 84 bytes.)

≔…²⊗φθF⁴²≔⁻θ×θ⁺²ιθ≔IΠEUNSHARPENED⌊ΦEχ⁺λ⁺×⁺¹³κφ×⊕⌕αιχ⬤θ﹪λνηIΠEIΠEη§θ⁺κΣ…η⊕κX§θκIι

Try it online! Link is to verbose version of code. Explanation:

≔…²⊗φθF⁴²≔⁻θ×θ⁺²ιθ

Find all the primes below 2000 by multiplying the range from 2 to 2000 by all integers from 2 to 43 and taking the set difference.

≔IΠEUNSHARPENED⌊ΦEχ⁺λ⁺×⁺¹³κφ×⊕⌕αιχ⬤θ﹪λνη

Take the word UNSHARPENED and look up the 1-indexed letter values, multiply by 10, add 1000 times the 0-indexed position, and add the range 13000..13009. Filter out any elements of that range that are divisible by any prime below 2000, and take the minimum of the remainder. Multiply these together and cast the result to string.

IΠEIΠEη§θ⁺κΣ…η⊕κX§θκIι

For all the digits in the string, add the digital sum so far to the current index and use that to index into the primes. Cast the product of those primes to string. For all of this new string's digits, take the prime at that index and raise it to the power of that digit. Print the final product.

\$\endgroup\$
4
\$\begingroup\$

Wolfram Language (Mathematica), 110 108 107 bytes

d=1##&@@(j=0;k=##2;Prime[j+=+k#+1]^k^#&)/@IntegerDigits@#&
Print@d@d[36^^16yk3y2kcq6hc87t5gstghaesn1uqnv,1]

Try it online!

Starts from the result of step 2, 16yk3y2kcq6hc87t5gstghaesn1uqnv in base 36.

d performs both steps 3 and 4, depending on the presence or absence of a 1 as the second argument:

d=1##&@@(           (* product of: *)
j=0;                (* (reset the counter) *)
---
(with 1: k=1)
 Prime[j+=#+1]^1^#& (*  primes, skipping over n at a time, *)
---
(without 1: k=Sequence[])
 Prime[j+=0#+1]^#&  (*  successive primes to the power of n *)
---
)/@IntegerDigits@#& (* for each digit n of the first argument *)
\$\endgroup\$
4
\$\begingroup\$

C# (Visual C# Interactive Compiler), 301 bytes

using C=System.Numerics.BigInteger;int i=-1,j,d=0;C u=new C(1);var z=Enumerable.Range(2,2000).Where(x=>{for(j=2;x%j>0&j++<x;);return x<j;}).ToList();var g="58322536285290033985886806240808836417438318459".Aggregate(u,(a,o)=>a*z[i+=o-47])+"";Write(z.Take(129).Aggregate(u,(a,b)=>a*C.Pow(b,g[d++]-48)));

Try it online!

Saved a byte thanks to ceilingcat

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Suggest for(j=2;x%j>0&j++<x;); instead of j=2;while(x%j>0&j++<x); \$\endgroup\$
    – ceilingcat
    Feb 14, 2021 at 17:55
3
\$\begingroup\$

05AB1E, 40 bytes

•3^—Ð7η¨Á∊δ¿x₅т«n¹L°;₄•11вÅ»+}ØPSDgÅpsmP

Try it online!

•...•11вÅ»+}ØPSDgÅpsmP  # trimmed program
                     P  # push the product of...
                        # (implicit) each element of...
                 Åp     # the first...
                g       # length of...
             P D        # the product of...
            Ø           # the primes with indices in...
        Å»              # cumulative...
          +             # sums...
        Å»              # to the right of...
       в                # list of base...
     11                 # literal...
       в                # digits of...
•...•                   # 4693500063420580072723276169489497775909790306646...
                 Åp     # primes...
                    m   # to the power of...
                        # (implicit) each element of...
              S         # digits of...
             P     s    # the product of...
            Ø           # the primes with indices in...
        Å»              # cumulative...
          +             # sums...
        Å»              # to the right of...
       в                # list of base...
     11                 # literal...
       в                # digits of...
•...•                   # 4693500063420580072723276169489497775909790306646
           }            # end cumulative operations
                        # implicit output
\$\endgroup\$
2
\$\begingroup\$

Jelly, 39 bytes

ØaiⱮ“Œɱl»DŻ-.ịƊ€J+12Ɗ;"$V×⁵ÆnPD‘ÄÆNPDÆẸ

Try it online!

A direct translation of the specification. Compressing the output as a base-250 integer is 571 bytes:

Try it online!

-6 bytes (indirectly) thanks to ais523's answer

\$\endgroup\$
1
  • \$\begingroup\$ Fair enough. 1325 less than what we were discussing earlier. I'm not even going to try to compete. \$\endgroup\$
    – ElPedro
    Feb 7, 2021 at 21:16
2
\$\begingroup\$

Julia 0.4, 123 129 bytes

show(prod(big(primes(727)).^digits(parse(BigInt,"sADsqNdwRYpd0LiTS4dgSvAP9BD2FkP9a9PLVt4ZGbbmxFCrkG4TEZI1ajJfYfdCycXNu6BN",62))))

Try it online!

I'm using Julia 0.4 because primes was a built-in function in this version.
It would be nearly identical with a modern version of Julia and the package Primes.jl

Starting at step 4 but with the reversed number in base 62:

985207975314810294826372885154432562323603794925590863056543622089329015276394749095119243906579033010773763566677080178295499241
\$\endgroup\$
0
2
\$\begingroup\$

Python 3.7, 240 174 bytes

p=str(int('3ged5xs20knlms4j3eaoxfzn5wdy54rml7sjp9f2pdhuoqdmky310zhxpta29r51libwivktdzfdpr2lcn1',36))
d=0
n=W=o=1
exec('W*=n;n+=1\nif~-n==W%n:o*=n**int(p[d]);d+=1\n'*726)
print(o)

Original 240 byte answer:

p='142994592871080776665367377010330975609342911590947493672510923980226345650368095529497306323265234451588273628492018413579702589'
d=0
n=2
W=1
o=1
while n<728:
    W=W*(n-1)
    if W%n==n-1:
        o=o*n**int(p[d])
        d=d+1
    n=n+1
print(o)
\$\endgroup\$
6
  • \$\begingroup\$ Using the tips for golfing in Python I was able to knock 10% off your byte count: Try it online! \$\endgroup\$
    – Neil
    Feb 8, 2021 at 10:24
  • \$\begingroup\$ You can also change n=n+1 into n+=1, d=d+1 -> d+=1, and w=w*n -> w*=n for -3 \$\endgroup\$
    – pxeger
    Feb 8, 2021 at 10:58
  • \$\begingroup\$ if w%n==n-1 -> if~-n==w%n for -1. Also o=o*n**int(p[d]) can be o*=n**int(p[d]) for another -1 \$\endgroup\$
    – pxeger
    Feb 8, 2021 at 11:03
  • \$\begingroup\$ '142994592871080776665367377010330975609342911590947493672510923980226345650368095529497306323265234451588273628492018413579702589' -> str(int('3ged5xs20knlms4j3eaoxfzn5wdy54rml7sjp9f2pdhuoqdmky310zhxpta29r51libwivktdzfdpr2lcn1',36)) \$\endgroup\$
    – pxeger
    Feb 8, 2021 at 11:05
  • \$\begingroup\$ -4 by switching to Python 2 - Try it online! \$\endgroup\$
    – pxeger
    Feb 8, 2021 at 11:06
2
\$\begingroup\$

bc 1.07, 147 bytes

I haven't found any documentation on this version, but it seems to allow input bases of up to 36.

ibase=36
i=r=p=1
for(c=NT35WE2NF68SLMVUQIHDYNG22V9938091UQB6B4RLISCQDMPA9EPP1AVLANPVVX0J0DWW68XTA7C93PC8A1;c;p*=i*i){if(p%++i){r*=i^(c%A);c/=A}}
r

Try it online!

The primes are generated using Wilson's theorem. Ungolfed:

# all literals are in base 36
ibase = 36
# the result is calculated in r
r = 1
# i is the current prime candidate, p=factorial(i-1)^2
i = p = 1
# c is the result of step 3 with reversed digits
c = NT35WE2NF68SLMVUQIHDYNG22V9938091UQB6B4RLISCQDMPA9EPP1AVLANPVVX0J0DWW68XTA7C93PC8A1

while(c) {           # until c is 0:
    if(p % ++i){     # (increment i) if i is a prime
        r *= i^(c%A) # take i to the power of the last digit of c and multiply to r
        c /= A       # remove the last digit from c
    }
    p *= i*i         # update the squared factorial
}
r                    # print the result

\$\endgroup\$
2
\$\begingroup\$

Pyth, 95 94 bytes

*Fm^hdsedC,.fP_Z129)`i."0z–Œ9í¶&¸¨÷)j3 &龃~ƒà‘œ\BŒ,5ß@XHZ~õÎòF23U÷_e”’@ä׋߭²j½¾"36

Try it online!

Starts with the number at the end of step 3.

Explanation:

*F                               # multiply all elements of
  m                              #  map
   ^hdsed                        #   first element to the str(last element) power
                                 #  over
         C,                      #   zip
           .f   129)             #    first 129
             P_Z                 #    primes
                                 #   with
                      ."0...¾"   #    packed string
                     i        36 #    convert from base 36 to int
                    `            #    convert to string
                                 #   (i.e. each prime with each char)
\$\endgroup\$
1
\$\begingroup\$

Deadfish~, 5368 bytes

{{i}ddddd}dcdciiiciciicddddddciiiiiicdddcddciiiiiicddcddciiiiicddddddciiiiiccddciiiicddddcdciiiiicdcdddddcdcdciiiciiiiicdddcdcdddciiiiiiccicdddddcddciciicddddc{i}dddcdddcddciiicdddddciciiicddciiicdddciiiiicddddddcddciiiciciiccdddciiiiiic{d}iciiiiiciiiicddddddciicddddcdciciiiciicdddddcicccddciiiiiicddddddciiiiicdciiiic{d}iiic{i}ddcddddciiccdddcddddc{i}ddcddddciiiiicdddddcdddciiiicdddddciiiicdddciciiiiiccciic{d}iciiciiiiicciicddddcdciiiicddddciiicddddddccdciiiiciiiicdcdddciicddddciiiiiicic{d}iiiciiiiciiic{d}ic{i}dcddddccddddciicdddciiciiiiiciic{d}iicdciiiicdciiiiicddddciiiiicdcic{d}iciiiiiicicddcddddcicciiicicddciiiic{d}iiic{i}ddcddccdccdciiiic{d}icciiiiiicddcciciiciicdddcdcdciicdddddciicddciiicdddciicdddciciiiciiiiiccdddddcddcdciiiicdddciiicdcicdddddc{i}dddcdddciiicddddddcicddc{i}dddcdddcddddcciiiiiicdcdciciiciicddcdcddddcicdddc{i}dddcddciicddcicdciiciicc{d}iciicdc{i}ddc{d}iciiiicdcciicddcddciicdciiiciiicdddcddddciiiiicddcicciiicddcdddciiiicddcdddcicddciiiiiiccddddcdddciiiciiiicicc{d}iiciiiiicddciicddddc{i}dddcddddccddcdc{i}ddc{d}iciiicdddciiciiiiccdddciiiiiccdcdddciiiicicddcdddciiiiciccddddcdddddccc{i}ddcddddddciiicdddddc{i}dddciicdc{d}iiciciiicciiicic{d}iiciiiiiiccddddddciciiiciiiicicddddddcdcddciiicddc{i}ddcddddddciiiiiic{d}iiiciiiicddddddc{i}dddcdcdddciiciiciic{d}iiicddciciiiiicdddciiiic{d}iiic{i}dddc{d}iiiciiiicddciiiiiicdddcdddciiiicdddddciiiiiciiicdddddcddciiiiicddddccciicdcdcdciiicddciiiicicddddddciiiicdddddciiiciiciicddddcddciiiccdddddciiccciiciiiiicddddddciiicddddcddciiicdddc{i}ddciccddddcicddcddciiiiicddcdddcdciiiiicciic{d}iiicdciiciiiiiccicdddciiiicdddciiccddddddciiccdciiiic{d}iiiciiccicdddciiiiicddcdciiiiicdddddciicdciiiicdddciiiicddddddciiiiiic{d}iiciiciiiiiicicddddddcciiiiiicdddcddddddciiiiiicddcdcddciiiccdcdciiiiicdddddciiiiiicdddcdddcciiiiiccddcdciiiiicdcdddcdciicdddddciiiiciic{d}iiiciiiciiciiicdddcdddddcciiciiiicdcddddciiciicddccciicdddddcc{i}dcddddcdcddddc{i}dddcddcdciicdcdccdddc{i}ddcdcdddcdddciiicicddddciiicdciiiccdcdddddcdciicddciiiiiicddciicddddciiicdciiiiicdddddcdciiiiiicdcdcciicdddddcicddciiiicdddddcicccdddciicddciiiiiicdddcdddciiiiiiciicdddciiiicdddciccdddcdddcdciiiicddddc{i}ddcc{d}iic{i}dddcdciiic{d}iiicicdciiiiciiic{d}iciiiiiicdddddciiiiiciicdcddddciiiic{d}iiicic{i}dddccddcddddcdciiiiicdddddcciiiciiiicdc{d}iiic{i}dddccdddddc{i}dddcdddcdddddccdcicicddc{i}dddcdcdddcicddcc{i}dddcddddcdcdddciiccdciciiiciic{d}iiciiiicdcdddciiiicciicdcdddc{i}dddcddcdcdddciiiiicdcdddddciiciciiicccdcddddddc{i}ddc{d}iiciiicdciiiicddddciciiiciiccdddddcddddciiiiiicdddcdciiicdddddc{i}dc{d}iiicddciiiiciiccdddddc{i}dddcddddcddddcciiicddciiiiiicddddciiciiicddccddddddciiciiccdddcdc{i}dddcddcddciiiiicddddciiicdddciiiicddddddcccdcdciicciiiicicccddddcddciiicicdddddcciiiciiicddddciicddciiiicddddddc{i}dcc{d}iiiciciiiicdddddcdciiiicicdddciicdciicddddciiciiccddddcciiiiiicic{d}iciiciiiicdddddcicicdddc{i}ddc{d}iiic{i}dddc{d}iiic{i}ddc{d}iiicdciiiciiiiccdddcddcdcdc{i}ddcdcddddcicdddciiiicdddccddciiiiiicddddddciiiiiciiccdcddddddc{i}ddc{d}iiciiciiiicicic{d}ic{i}dddcddddciiicdddciiiicdddddciciiiiiicdddcddddciiiiicdciiccc{d}iiiciiiiicddciicdcddcddciiiciiiiicdddddcddddciiiciiiiiicddcdddddcccddc{i}dddcddddcciiiiicddddciiicddddddciiiicddciiiiccdddccdddc{i}dddcddddciiiiicddddcdddddciiiiiicccdddcciiiicdcdciciiic{d}iiiciiiiiic{d}iiiciiiciiicddccdddciciiiiiic{d}iiciiiicdccicicicdddddc{i}dddcdcddccdddciiicdccdddddc{i}dddciicdddcddddcdccic{i}dddc{d}icicciiiiiiccddddciiciiiicdc{d}iiiciiiiicddddciiciiciiic{d}iiciiicdddciicddciiiiiicdcdddciiiiiic{d}iiciiiiiic{d}iiicciiiiiicdddciiiiicdddcddciiicciccddddciiiiiicdddciic{d}iiciiiiiicdcddcddcc{i}dddcicddciic{d}iciiiiciiiicddcddddciiiiicdcdcdddciiciicddddcciciiciciic{d}iiic{i}dddcicddddddcdciiciicdcdcdddciiciiciiiicdcc{d}iic{i}ddc{d}iiiciciiicdddddc{i}ddcdddciiicc{d}iiicdciiiicdcicicddddciiicdddciiciiciiiicdddciiic{d}iiciiciiiiiicdcdddddcddciiciiciiiicdcddddddcddciiciiiciiccdddcddciicdddciiicicicdciiiccddcddddddciiicciciiiiic{d}iiciicdciiiiciiicddcddciiiic{d}iciiiiciiiicddcddddcciiciiiiic{d}iiiccdciiicdddciiiiiciiicddddddcdddciiiicddciiciiicic{d}iiiciiiiicddccdddciiiiicicddciiiicddddciiicdcdddddciiicicddddddciicciiiiiciicc{d}iicciiiciiciicdcddcdddddciiiciiiiic{d}iiciic{i}dddc{d}iiciiiiicddddddc{i}dddc{d}iiic{i}ddc{d}iicciiiiiciiicddddciiiiic{d}iiciiiccdddcicddciciiciciiicddddddciiiiciicdddciciiiic{d}iciiiiciiicddddcddciiiccdciiiiicc{d}iiiciiiiciiciicdddcdddddcciiiiicdddciiciiicdddddciicicdddddciiiiiicddddddc{i}ddcdcdddddciiiicicic{d}iccciiciiiiic{d}iiiciiiiicdcddddciiicdc{i}dddc{d}iciiiiciiicdciiicdddcdddddc{i}dddcddddddcc{i}dddcddddcddcddciiiiciiiicddccdcddddciiiiiicdddddciiiiiicddcdddddciiicicdcdddciiicdddddciiicddc{i}dddcddcdddddciiiiiiciicdddcddddc{i}dddcdddddciiiiic{d}iiic{i}dddcddcdddcddddciciiiiicdddciiiiicddcdciiccdddciiiccdcdddddciiiciicddciiicdddddciiicdcdddc{i}dddcic{d}iccc{i}dddcddddddc{i}ddc{d}iiciiicicddddciiiicddddciiiicciiicdcciic{d}ic{i}dc{d}icciiciiiiicddcciiic{d}iiciiiiiicdciiciicdcddddddciiciiiiicddddciiiicdcdddddcddc{i}ddcdccddddcddcddciiiiiiciiicddcddddciiciiicdddddciicdcddddc{i}dcddddddciciiiicdddddciiiiiic{d}iciiiciiiiicic{d}iciciiicddddciiiicdcdciicicciiiicdddccdcdddciicdciciiiicddciiicddddddcddcc{i}ddcdcddddddciicddddciiiicdddcdciic{i}dddcdcdddciiicdddcddcdddciiicicicddddciiciiicdddcddc{i}ddc{d}iiiciiiiiicdddddcciiiiiic{d}iiciiicddddciiiiiicddddddciiiciciicdddddcdciiiiiiciiicdcddddddc{i}dddccdddddciiciiic{d}iciiiiiicdddciicdddddc
\$\endgroup\$
1
\$\begingroup\$

Vyxal, 37 bytes

»°øḊ⟩√ɾ§»₄τ₀ʀ13+₁*+₀*∆ṖΠf›¦‹ǎΠf:ẏǎ$eΠ

Try it Online! Directly implements the algorithm.

»°øḊ⟩√ɾ§»                             # Base-255 compressed integer
         ₄τ                           # Decoded from base-26 into [21, 14, 19, 8, 1, 18, 16, 5, 14, 5, 4]
           ₀ʀ                         # [0...10]
             13+                      # [13...23]
                ₁*                    # [1300, 1400...2300]
                  +                   # Added to above charcodes
                   ₀*                 # Each multiplied by 10
                     ∆Ṗ               # Next prime after each
                       Π              # Take product
                        f›¦‹          # Flatten and take cumulative sum
                            ǎΠ        # Nth prime for each, take product
                              f       # Take as a list of decimal digits
                               :ẏǎ    # Generate the corresponding list of primes
                                  $e  # Each taken to the power of the corresponding digit
                                    Π # Take their product
\$\endgroup\$
0
\$\begingroup\$

Bubblegum, 606

Generated with zopfli --i1000 --deflate -c ginormous.txt | xxd.

I honestly thought bubblegum might do a bit better than this, but here it is:

0000000: 1d4e 0711 c030 08b4 04bf 00ff c67a 6976  .N...0.......ziv
00000010: e057 1795 0a7b ccc5 8ccf ba25 5a17 63f7  .W...{.....%Z.c.
00000020: 04ba d74c c30c 1745 25bc f2d1 5dad 3480  ...L...E%...].4.
00000030: 4a59 dbe7 19d5 ead4 2e35 66e6 0a33 67ad  JY.......5f..3g.
00000040: a6bb b4a3 600f b93a bb59 98eb 1257 b757  ....`..:.Y...W.W
00000050: 1937 e03c a999 c457 15c9 73b1 d26c 35ab  .7.<...W..s..l5.
00000060: 7527 b461 b946 d3a8 5155 fc70 13b0 c6e3  u'.a.F..QU.p....
00000070: 78ee 0a7d 25d2 6cc2 eb8e ec0d c760 cfb0  x..}%.l......`..
00000080: 38bb 65ba 577a 5816 12ee 8ef6 de3e 57d5  8.e.WzX......>W.
00000090: c235 b7d5 d26c 25d5 da23 8a7d 3ca4 26f4  .5...l%..#.}<.&.
000000a0: 1caa c3a9 2961 8d74 4e18 9216 61ce 22ad  ....)a.tN...a.".
000000b0: ac60 1700 1d83 623d 8b08 6374 b25d 9859  .`....b=..ct.].Y
000000c0: 5f76 2171 0a60 9918 88a3 c516 f6c8 4b45  _v!q.`........KE
000000d0: 6ce9 75d6 c08c 756b a53d 45af ab10 37fd  l.u...uk.=E...7.
000000e0: fcab ceaa b162 a96f 0d07 d64c ba50 5160  .....b.o...L.PQ`
000000f0: 9d78 3b73 3207 245f 8395 f565 465d aadd  .x;s2.$_...eF]..
00000100: 9a1c 885c a5b3 c3a9 de0d 3add daa9 195c  ...\......:....\
00000110: baab 5113 0a38 ab49 305b 6249 316e c21d  ..Q..8.I0[bI1n..
00000120: c8bb 3b7d 2d0e 3577 aa10 ae43 29e9 5515  ..;}-.5w...C).U.
00000130: 7be8 4d0a 52d7 98ab d102 e802 3233 6cb9  {.M.R.......23l.
00000140: 8a81 90ba 0307 edd0 0a94 007b 8534 58db  ...........{.4X.
00000150: db87 d6ae 89be 9511 b2a7 f367 68ce 5e0d  ...........gh.^.
00000160: c301 2f98 ec6e 4731 5ba7 e20d 801a 7235  ../..nG1[.....r5
00000170: 6dce 48bd 3a57 1272 e21c b635 3678 6dc9  m.H.:W.r...56xm.
00000180: 19dc 268c 5d73 4137 aeba 67e8 db0e 946b  ..&.]sA7..g....k
00000190: 357b c2eb a90a d74c 6678 d97a c6bd 3757  5{.....Lfx.z..7W
000001a0: da60 6228 009d ed3d 42b1 fa09 6d6d c3b5  .`b(...=B...mm..
000001b0: deed 12e5 feeb b9e6 2d7f 080a 9e11 d472  ........-......r
000001c0: bc9b 2275 4de4 c6bf 3ea0 035a 9d63 099a  .."uM...>..Z.c..
000001d0: ed48 9df1 7907 4e01 73d7 adec b8b8 85eb  .H..y.N.s.......
000001e0: d4d4 5679 752d 35aa a969 8f9e e6b0 25ee  ..Vyu-5..i....%.
000001f0: b6e7 d21d 7ae9 f4f4 2d67 afaa 3065 15f1  ....z...-g..0e..
00000200: c0b9 f402 67b6 6f26 58de b335 5cec 4dcf  ....g.o&X..5\.M.
00000210: 05a7 c38d aac3 8d67 3493 5634 b0fa 979c  .......g4.V4....
00000220: be96 db6d efcc d53d 177b 2b9e 5be8 7ccb  ...m...=.{+.[.|.
00000230: be5d a172 f367 521d b5bc e25e b54a 84ec  .].r.gR....^.J..
00000240: 4b0c 519b 63f7 e396 ba70 eb35 8b72 33ec  K.Q.c....p.5.r3.
00000250: c392 d7aa 1495 aedc e24e b90a 5d1f       .........N..].

Try it online!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The best possible score of a generic compressor on this random (or at least random-looking) sequence of digits should be close to \$log(N)/log(2)/8\approx566\$ bytes, not to mention the header where the symbols 0 to 9 have to be somehow defined. So I guess we can't expect anything significantly better than that. \$\endgroup\$
    – Arnauld
    Feb 9, 2021 at 23:44
0
\$\begingroup\$

Python 3, 349 bytes

eval(eval('"19805596543926073442*"+"78873566720902235*18013318998359734663*"*2+"593140350139852859*8104731785668783073*"*3+"6644372255178073982360301*"*4+"1353238597766773*12805823735079030233*"*5+"6662348615646027385791148837*"*6+"13372864637471*7423896006336743*"*7+"14127919992957378413027*"*8+"74874566303993533*2096862721178836784989*"*9+"1"'))

Fork of @ZaelinGoodman's powershell solution

\$\endgroup\$
5
  • \$\begingroup\$ Your code outputs nothing, so you'll need to put it in a print function, adding 7 bytes. However, you can save 8 bytes from that by changing your code to print(eval("19805596543926073442*"+"78873566720902235*18013318998359734663*"*2+"593140350139852859*8104731785668783073*"*3+"6644372255178073982360301*"*4+"1353238597766773*12805823735079030233*"*5+"6662348615646027385791148837*"*6+"13372864637471*7423896006336743*"*7+"14127919992957378413027*"*8+"74874566303993533*2096862721178836784989*"*9+"1")), for a net loss of a byte. Even better, change to Python 2 and remove the parentheses (cont.) \$\endgroup\$
    – Makonede
    Feb 16, 2021 at 21:02
  • \$\begingroup\$ (cont.) in the print function, as it's a statement in Python 2, so you can just do print eval("19805596543926073442*"+"78873566720902235*18013318998359734663*"*2+"593140350139852859*8104731785668783073*"*3+"6644372255178073982360301*"*4+"1353238597766773*12805823735079030233*"*5+"6662348615646027385791148837*"*6+"13372864637471*7423896006336743*"*7+"14127919992957378413027*"*8+"74874566303993533*2096862721178836784989*"*9+"1") for 347 bytes. A total 2 byte loss! Well, technically, it's a 9 byte loss, as your current code needs that print fix. (cont.) \$\endgroup\$
    – Makonede
    Feb 16, 2021 at 21:04
  • \$\begingroup\$ (cont.) Try it online! \$\endgroup\$
    – Makonede
    Feb 16, 2021 at 21:04
  • \$\begingroup\$ Even better: get rid of the chunky eval function and use exponentiation instead. print 19805596543926073442*78873566720902235**2*18013318998359734663**2*593140350139852859**3*8104731785668783073**3*6644372255178073982360301**4*1353238597766773**5*12805823735079030233**5*6662348615646027385791148837**6*13372864637471**7*7423896006336743**7*14127919992957378413027**8*74874566303993533**9*2096862721178836784989**9 is 333 bytes, for a loss of 14 bytes on top of the previous improvement, totaling to 23 bytes lost! (cont.) \$\endgroup\$
    – Makonede
    Feb 16, 2021 at 21:19
  • \$\begingroup\$ (cont.) Try it online! \$\endgroup\$
    – Makonede
    Feb 16, 2021 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.