[Question]
  [
# This is the PPCG Prime
**624 digits long**
```
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777111111111111111111111111111111111111111111111111111111111111111111111111111111188888888118888888811188888811188888811188111118818811111881881111881881111881188111118818811111881881111111881111111188888888118888888811881111111881118888188111111118811111111881111111881111881188111111118811111111881111881881111881188111111118811111111188888811188888811111111111111111111111111111111111111111111111111111111111111111111111111111111333333333333333333333333333333333333333
```
  
 
If we split every 39 digits we get
```
777777777777777777777777777777777777777
777777777777777777777777777777777777777
777777777777777777777777777777777777777
777777777777777777777777777777777777777
111111111111111111111111111111111111111
111111111111111111111111111111111111111
188888888118888888811188888811188888811
188111118818811111881881111881881111881
188111118818811111881881111111881111111
188888888118888888811881111111881118888
188111111118811111111881111111881111881
188111111118811111111881111881881111881
188111111118811111111188888811188888811
111111111111111111111111111111111111111
111111111111111111111111111111111111111
333333333333333333333333333333333333333
```
**Your task is to output the PPCG-Prime**
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). The shortest code in bytes wins.
If you input the PPCG-Prime in the Mathematica function below, you get this result
```
ArrayPlot@Partition[IntegerDigits@#,39]&   
```
[![enter image description here](https://i.stack.imgur.com/yeMat.jpg)](https://i.stack.imgur.com/yeMat.jpg)
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~55~~ ~~54~~ ~~52~~ ~~47~~ 46 bytes
```
‚Äú=√∑¬°v‚Å∫ ãi·πÇYR¬§"bƒ∞…≤}√ë1·πÜ‚Å¥·∫†V‚Åπy»•G·∫á‚Äô‚Äú¬øm≈ª‚Äúp‚ÄôDx39jBo88V
```
There are more convoluted approaches in the revision history, but this simple one beats them all.
[Try it online!](https://tio.run/##y0rNyan8//9Rwxzbw9sPLSx71LjrVHfmw51NkUGHliglHdlwclPt4YmGD3e2PWrc8nDXgrBHjTsrTyx1f7ir/VHDTKC2Q/tzj@4G0gVArkuFsWWWU76FRdj//wA "Jelly ‚Äì Try It Online")
### How it works
```
‚Äú=√∑¬°v‚Å∫ ãi·πÇYR¬§"bƒ∞…≤}√ë1·πÜ‚Å¥·∫†V‚Åπy»•G·∫á‚Äô
```
This is a numeric literal, encoded in bijective base 250, where the digits are taken from Jelly's code page. The chain's (left) argument and the return value are set to the encoded integer,  
**n := 0x21871c77d7d7af6fafafeff0c37f72ff7fbfbdbfdfef5edfeff8e3**.
```
‚Äú¬øm≈ª‚Äúp‚Äô
```
A similar literal to the above one, but the second `‚Äú` separates two encoded integers. The return value is replaced with the encoded array, **[777711, 113]**.
```
Dx39
```
`D` converts the return value to decimal (**[[7, 7, 7, 7, 1, 1], [1, 1, 3]]**), then `x39` repeats each individual integer/digit in the result **39** times. This yields a pair of arrays, which contains the digits before and after the 7-character high text, respectively. Let's call this array **A**.
```
jB
```
First, `B` converts the (left) argument **n** to binary. This yields the digits that form the 7-character high text, where each **88** has been replaced by **0**.
Then, `j` joins the array **A**, using the binary array as separator.
```
o88
```
This performs logical OR with **88**, replacing each **0** with **88**.
```
V
```
We have the correct digits now, but in an array of **7**'s, **1**'s, **88**'s, and **3**'s. `V` implicitly turns this array into a string and then evals it, yielding a single integer.
[Answer]
# [Bubblegum](https://esolangs.org/wiki/Bubblegum), 51 bytes
```
00000000: 331f c4c0 90ba c002 0a90 5986 d818 50d5  3.........Y...P.
00000010: 282c 3406 6e65 5036 1e4b 9195 8109 649d  (,4.neP6.K....d.
00000020: 5858 1896 4279 68b2 f895 61fa 94ca c098  XX..Byh...a.....
00000030: 3800 00                                  8..
```
[Try it online!](https://tio.run/##hY@tEsIwEIQ9T7ESwWQuf8cdEoupLDJJWxCAq@DpQwqtZufO7X6zm@ecH@NtftZKq07w3k4ooRCUckIhcqCkhKjCGMQKIg0R8GbTtX1ndj@CbQwnrsAHYvDIsfk9w44hQ61GiCUFBx2A/SGY19ixuSycYWO4xogSBVaUEdyx@SU7TNLibKcEDWXppgL0vTHn973l07fNyvDLFiFCu78SY2r9AA "Bubblegum ‚Äì Try It Online")
[Answer]
# [SOGL V0.12](https://github.com/dzaima/SOGL), ~~52~~ 51 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
‚â°=vƒÅ‚Å∑H‚Üï‚ÜïjŒ•_Œù‚Üë‚àÜ‚à´‚ñ≤pŒño	‚ÄòŒ∏Œ¥≈æŒüwd‚ï¨2n?q[‚Äò¬≤Œö7n‚å°"Œ±¬º‚ñ†‚ï§ƒ£‚Öû¬π‚Äò¬πH‚àë
```
ties bubblegum!  
note that this answer contains a tab
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JXUyMjYxJTNEdiV1MDEwMSV1MjA3N0gldTIxOTUldTIxOTVqJXUwM0E1XyV1MDM5RCV1MjE5MSV1MjIwNiV1MjIyQiV1MjVCMnAldTAzOTZvJTA5JXUyMDE4JXUwM0I4JXUwM0I0JXUwMTdFJXUwMzlGd2QldTI1NkMybiUzRnElNUIldTIwMTglQjIldTAzOUE3biV1MjMyMSUyMiV1MDNCMSVCQyV1MjVBMCV1MjU2NCV1MDEyMyV1MjE1RSVCOSV1MjAxOCVCOUgldTIyMTE_)
Tries to save bytes by reusing the same string for both of the `P`s.
Explanation:
```
...‚Äò...‚Äò¬≤Œö7n‚å°"..‚Äò¬πH‚àë  compressed strings replaced with ellipses to shorten the width
...‚Äò                  pushes "1111111188888188888888111118811111881111188111118881118818111811111111188888188888888111118811111881111188118118888818818881811118111" - CG
    ...‚Äò              pushes "1111111888888888888881118118111811811181181118118111811811188881111881" - P
        ¬≤             join with itself - double the P
         Œö            reverse add - prepend the PP to CG
          7n          split to line lengths of 7
            ‚å°         for each
             "..‚Äò       push "311≈ó117777" with ≈ó replaced with the ToS - current item looping over
                 ¬π    wrap the results tn an array
                  H   rotate it counter-clockwise
                   ‚àë  join to a single string
```
The numbers there are saved as from the original starting at the bottom left, going up, then 1 right & down, then up, ect.
A 52 byte plain compression version:
```
#‚Öì‚Üí9E‚ñ†Œù‚ñ∫1&‚ÖùŒ∏‚Öû%√∏√∏Œº‚ÜêN‚ïê]y)u‚Öù‚Üì$A‚óã‚ñë(ZF16Œ¶‚ÖìMƒç‚ñìd‚ÖõHŒπ‚Äº‚àëœÖnŒ∑‚ñ≤Z‚Äò
```
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JTIzJXUyMTUzJXUyMTkyOUUldTI1QTAldTAzOUQldTI1QkExJTI2JXUyMTVEJXUwM0I4JXUyMTVFJTI1JUY4JUY4JXUwM0JDJXUyMTkwTiV1MjU1MCU1RHklMjl1JXUyMTVEJXUyMTkzJTI0QSV1MjVDQiV1MjU5MSUyOFpGMTYldTAzQTYldTIxNTNNJXUwMTBEJXUyNTkzZCV1MjE1QkgldTAzQjkldTIwM0MldTIyMTEldTAzQzVuJXUwM0I3JXUyNUIyWiV1MjAxOA__)
[Answer]
# CJam, ASCII, 61
```
Hs78f*~_@"'hfv;HH`>O4RU(_o^.U)9q&-1iadr`4tk"90b2b88fe|1$'339*
```
[Try it online](http://cjam.aditsu.net/#code=Hs78f*~_%40%22'hfv%3BHH%60%3EO4RU(_o%5E.U)9q%26-1iadr%604tk%2290b2b88fe%7C1%24'339*)
Append `]s39/N*` for nice wrapping.
**Explanation:**
```
Hs         generate "17" (H=17)
78f*       repeat each character 78 times, getting an array of 2 strings
~_         dump the 2 strings on the stack, and duplicate the '7's
@          move the '1's to the top of the stack (first 6 lines done so far)
"‚Ä¶"90b     convert that string from base 90 (treating characters as numbers)
2b         convert the resulting number to base 2,
            obtaining a bit map for the "PPCG" part, with 1 for "1" and 0 for "88"
88fe|      replace (boolean OR) all the zeros with 88
1$         copy the string of 78 '1's
'339*      repeat '3' 39 times
```
[Answer]
# Mathematica, 107 bytes
```
Uncompress@"1:eJxTTMoP8ixgYmAwH8TAkLrAAgqQWYbYGFDVGCxkBh5lCDNwWIqqDCyGrAGDhWEpFmXY3IaiDItPqQqMiQMA+yaAoA=="
```
  
[Try it online!](https://tio.run/##BcHRCoIwFADQXxFfe4oIJBh423IZGROstccpU4dN3RyoX7/OMdL3ykivGxnaCEXhPTaTmZ1aljQ@XtRjq6piYoneOmFgvScVDE8H0NmSi1rQjHwo3oZrf/5h8lp5bi3BO3VASc9vc2a@4pRLTXLPbGkLXRZw2CVMgFAcmNOjj9I2/AE "Wolfram Language (Mathematica) ‚Äì Try It Online")
[Answer]
# C, ~~519~~ ~~427~~ ~~414~~ ~~396~~ 377 bytes
Thanks to Tas, Felix Palmen and Lynn.
```
#define p(n,l)for(i=40*l;i;)putchar(--i%40?n+48:10);
f(i){p(7,4)p(1,2)puts("188888888118888888811188888811188888811\n188111118818811111881881111881881111881\n188111118818811111881881111111881111111\n188888888118888888811881111111881118888\n188111111118811111111881111111881111881\n188111111118811111111881111881881111881\n188111111118811111111188888811188888811");p(1,2)p(3,1)}
```
For your interest, here is a longer, easier-to-read version:
```
#define p(n,l) for(i=40*l;i;) putchar(--i%40?n+48:10);
f(i) {
    p(7,4)
    p(1,2)
    puts("188888888118888888811188888811188888811\n\
       188111118818811111881881111881881111881\n\
       188111118818811111881881111111881111111\n\
       188888888118888888811881111111881118888\n\
       188111111118811111111881111111881111881\n\
       188111111118811111111881111881881111881\n\
       188111111118811111111188888811188888811");
    p(1,2)
    p(3,1)
}
```
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 165 bytes
```
n->{for(int i=0;++i<566;)System.out.print(i<157?7:i>526?3:i<236|i>446||new java.math.BigInteger("vnku5g6l0zenpa1kydel5rxw162k4fk4xapa154o",36).testBit(446-i)?1:88);}
```
[Try it online!](https://tio.run/##LY/LbsIwEEX3fIXFKhHFIpAYREKQ6KqLqguWVRfGmHQSZxzFYx4Fvj0NtKuRzr06V1PKoxzbRmO5r7rG7wwopox0jr1LQHYdMPZPHUnqz9HCntV9FmypBSw@v5hsCxc@q4yVvY97AsMPHhWBRf5q0flat9nHrtSKcqbYqsNxfj3YNgAkBqtJOhpBlgiRhtuLI11z64k3vZ8CyKJkvp4vIU@mYj1bQjadiRvkcSxuN9Snv8la0jffQPGGpAvdBsMjVj4phJn8aGxkVF322iTt@RSJaRUfqvgse5rEdvgyEyEn7WgDFPTSMYTraLlYhOm9S58/KS6V0g0F6I0JH@w@uHe/ "Java (OpenJDK 8) ‚Äì Try It Online")
## Credits
* -10 bytes thanks to aditsu!
[Answer]
# Javascript (ES6), ~~187~~ 181 bytes
-6 bytes thanks to @JustinMariner
```
r=s=>s[0].repeat(39),a=r`7`,b=r`1`,i="8888881",c=188+i,d=11+i,j="188111",e=j+1188,f=j+188,g=j+111,h=g+1,k=r`3`
z=>"aaaabbccdd1eeff1eeghccgj8888hhgf1hhff1hhdd1bbk".replace(/./g,eval)
```
Super simple approach; it could probably be golfed some more.
**Explanation**
```
r=s=>s[0].repeat(39),                               // helper function to repeat character
a=r`7`,b=r`1`,i="8888881",c=188+i,d=11+i,j="188111",// Set the variables (a-k) to different
e=j+1188,f=j+188,g=j+111,h=g+1,k=r`3`               // parts of the prime       
_=>"aaaabbccdd1eeff1eeghccgj8888hhgf1hhff1hhdd1bbk" // Replace all letters in the string
    .replace(/./g,eval)                             // with the value of the variable
```
**Example code snippet** (with some helper code to add line breaks in the output)
```
r=s=>s[0].repeat(39),a=r`7`,b=r`1`,i="8888881",c=188+i,d=11+i,j="188111",e=j+1188,f=j+188,g=j+111,h=g+1,k=r`3`
z=_=>"aaaabbccdd1eeff1eeghccgj8888hhgf1hhff1hhdd1bbk".replace(/./g,eval)
o.innerText=z().replace(/.{39}/g,"$&\n")
```
```
<pre id=o>
```
[Answer]
# [Retina](https://github.com/m-ender/retina), 129 bytes
```
h155b78i7b1i7b2i5b2i5b2!4!!4!""1!4!!4!!6#i7b1i7b1!6!2i3b##!6"1##""1#!8i5b2i5b79d38
#
!7
"
!3!
!
i1b
\d+
$*
+`(\D)1
$1$1
1
T`l`d
```
[Try it online!](https://tio.run/##LYs7CsMwFAT7vcXqqUji6lnRJ32O4NKFLBSIIKQIvr8isGEHtpj5vfb23XrHW70vMbVYdDA3f8A7x4zR4zDIaSgD5@aKCINRkaEI05nFR3UJAkYY0BFE04K1TrA3TPmyPq8Kq1ahwJI/ufb@Bw "Retina ‚Äì Try It Online")
[Answer]
# Batch, ~~364~~ ~~335~~ 333 bytes
```
@set a=888888&set b=1111111111111&set e=1881111&set d=1%e%&set f=333333333&for /L %%x in (1,1,156) do @cd|set/p=7
@echo %b%%b%%b%%b%%b%%b%1%a%8811%a%88111%a%111%a%1%d%188%e%188%e%88%e%88%d%188%e%188%e%1%d%1111%a%8811%a%88%d%111881118888%e%11%d%11%d%1%d%88%d%11%d%11%d%88%e%88%d%11%d%11111%a%111%a%%b%%b%%b%%b%%b%%b%11%f%%f%%f%%f%333
```
[Answer]
# Ruby, 109 bytes
The script calls `Zlib.inflate` to decompress the number. It needs at least Ruby 1.9.3. It contains unprintable bytes, so I can't paste it here.
I paste the output of `vis prime-inflate.rb`:
```
require'zlib'
puts Zlib.inflate DATA.read
__END__
x\M-Z37\^_\M-<\M-@\M^P\M-:\M-@\^B
\M^PY\M^F\M-X\^XP\M-U\^X,d\^F\^^e\^H3pX\M^J\M-*\^L,\M^F\M-,\^A\M^C\M^Ea)\^Ve\M-X\M-\\M^F\M-"\^L\M^KO\M-)
\M^L\M^I\^C\^@\^P\M-p~\M-!
```
If you have unvis(1), run `unvis prime-inflate.vis > prime-inflate.rb` to restore the 109-byte script. Or you can decode the Base64, below, with `ruby -e 'print *STDIN.read.unpack(?m)' < prime-inflate.b64 > prime-inflate.rb`.
```
cmVxdWlyZSd6bGliJwpwdXRzIFpsaWIuaW5mbGF0ZSBEQVRBLnJlYWQKX19F
TkRfXwp42jM3H7zAkLrAAgqQWYbYGFDVGCxkBh5lCDNwWIqqDCyGrAGDhWEp
FmXY3IaiDItPqQqMiQMAEPB+oQ==
```
I call `Zlib.inflate` so I don't need to design and golf my own decompression algorithm. I use `DATA` with `__END__` because the compressed string isn't valid UTF-8. Ruby code must be valid ASCII (in Ruby 1.9.x) or UTF-8 (from Ruby 2.0) or have a magic comment `#coding:binary` to change the encoding, but Ruby doesn't check the encoding after `__END__`.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 269 267 bytes
function, uses simple RLE.
```
x[]={39,79,80,156};k;f(i){for(char*c="d7b1882188316831683128512811285128112841281128412821285128112851281128712881882188212871283148112881288128712841282128812881284128112841282128812891683168c1a3";i=*c++;++c)for(i=i<97?i-48:x[i-97];i--;++k%39||puts(""))putchar(*c);}
```
[Try it online!](https://tio.run/##bY/dCsIwDIXfpSC02wq23WxrLT7I2MWMTMvwh6kw2Pbss5UKQ7z4OEkOOSRATwDz3JeVHYTOpM7UOmPFZjKtabAjQ3PrMJzrLgGLjvLAlOIewTYRrgoPW2i@UP7Hlx4Vc3jsBcs/norIxf539psbZjreAawWyDibQJqaNAUSznbW7bTcO5qrbV86qmVlHKXeb1dCj@P99XxghAjxRXgRJ0DMNF9qd8X@cRyaNw "C (gcc) ‚Äì Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 112 bytes
```
print'7'*156+'1'*78+bin(int('JAOKI5B0O6K9IWDU8P76KDLR0VZMNWQ2WB9D8BOS8',36))[2:].replace('0','88')+'1'*80+'3'*39
```
[Try it online!](https://tio.run/##K6gsycjPM/r/v6AoM69E3Vxdy9DUTFvdUF3L3EI7KTNPAyiqoe7l6O/taepk4G/mbekZ7hJqEWBu5u3iE2QQFuXrFx5oFO5k6WLh5B9soa5jbKapGW1kFatXlFqQk5icqqFuoK6jbmGhrgk21cJAW91YXcvY8v9/AA "Python 2 ‚Äì Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 224 bytes
```
f(i,j,c){for(i=0;c="wwdfFdfFDfFDfFDFDDFFDDFFDddDDFdDDddDDddDDDdDDDDffDffDFDDDFDfdDDDDFDDDdDDDdDDFdDDDDFDDDdDDFFDdDFDDDdDDDDdfDdfD"[i/2]>>i++%2*4&15;c-6?putchar(c-4?c+48:49):printf("88"))for(j=0;j++<c%2*38;)putchar(c+48);}
```
[Try it online!](https://tio.run/##PY7RCoJAEEUf@gL/QIRit1UqszA39WXxJ6IHmWVqhUzE6EH8dptNEe5h4M69w0DwABhHZMavfOA9vltm0r2E1Pt@HY0FSU0qlComtKZB6BllUYhWlCDw7xTzao4vhj2xLJVGK2fl3cwuvGeZEWIdbqPN4SQhOOfNp4Nn2TIIohxEFCfRhSdNa@oOmRfHHuf254p@roS4AlWPseRLixpcDiPF3Vdpasbd3kXGpTuMPw "C (gcc) ‚Äì Try It Online")
Contains some unprintables, the string literal is `"ww\x11dfFdfFDfFDfFDFDDFFDDFFDddDDFdDDddDDddDDDdDDDDffDffDFDDDFDfdDDDDFDDDdDDDdDDFdDDDDFDDDdDDFFDdDFDDDdDDDDdfDdfD\x11\x03"`.
[Answer]
# [6502 machine code](https://en.wikibooks.org/wiki/6502_Assembly) (C64), 142 122 bytes
```
00 C0 A9 27 85 FB A2 00 86 FC A2 04 CA 10 01 60 BC 70 C0 BD 74 C0 20 D2 FF C6
FB D0 0B 48 A9 27 85 FB A9 0D 20 D2 FF 68 88 D0 EB E0 02 D0 DD 48 A5 FC 4A A8
B9 4A C0 90 04 4A 4A 4A 4A 29 0F F0 08 E6 FC A8 68 49 09 D0 CD 68 D0 C0 28 38
36 36 52 12 52 12 42 12 42 22 52 12 52 12 72 82 28 28 72 32 14 82 82 72 42 22
82 82 42 12 42 22 82 92 36 06 27 50 4F 9C 33 31 31 37
```
**[Online demo](https://vice.janicek.co/c64/#%7B%22controlPort2%22:%22joystick%22,%22primaryControlPort%22:2,%22keys%22:%7B%22SPACE%22:%22%22,%22RETURN%22:%22%22,%22F1%22:%22%22,%22F3%22:%22%22,%22F5%22:%22%22,%22F7%22:%22%22%7D,%22files%22:%7B%22ppcgprime.prg%22:%22data:;base64,AMCpJ4X7ogCG/KIEyhABYLxwwL10wCDS/8b70AtIqSeF+6kNINL/aIjQ6+AC0N1IpfxKqLlKwJAESkpKSikP8Ajm/KhoSQnQzWjQwCg4NjZSElISQhJCIlISUhJygigocjIUgoJyQiKCgkISQiKCkjYGJ1BPnDMxMTc=%22%7D,%22vice%22:%7B%22-autostart%22:%22ppcgprime.prg%22%7D%7D)**
**Usage:** `sys49152`
* -20 bytes with better implementation of same method and data tables for large blocks as well.
---
### Explanation
This also uses the lengths of the `1` and `8` sequences in the middle part; as they're all shorter than 16, two of them are encoded per byte.
Commented disassembly listing:
```
         00 C0        .WORD $C000       ; load address
.C:c000  A9 27        LDA #$27          ; counter for newlines (39)
.C:c002  85 FB        STA $FB
.C:c004  A2 00        LDX #$00          ; index for run-length data
.C:c006  86 FC        STX $FC
.C:c008  A2 04        LDX #$04          ; index for "blocks" (counting down)
.C:c00a   .blockloop:
.C:c00a  CA           DEX
.C:c00b  10 01        BPL .continue     ; block index underflow -> done
.C:c00d  60           RTS
.C:c00e   .continue:
.C:c00e  BC 70 C0     LDY .lseqlens,X   ; load length of next block to Y
.C:c011  BD 74 C0     LDA .chars,X      ; load character of next block to A
.C:c014   .outloop:
.C:c014  20 D2 FF     JSR $FFD2         ; output character
.C:c017  C6 FB        DEC $FB           ; decrement newline counter
.C:c019  D0 0B        BNE .skipnl
.C:c01b  48           PHA               ; newline needed -> save accu
.C:c01c  A9 27        LDA #$27          ; restore newline counter
.C:c01e  85 FB        STA $FB
.C:c020  A9 0D        LDA #$0D          ; load newline character
.C:c022  20 D2 FF     JSR $FFD2         ; output character
.C:c025  68           PLA               ; restore accu
.C:c026   .skipnl:
.C:c026  88           DEY               ; decrement repeat counter
.C:c027  D0 EB        BNE .outloop      ; repeat until 0
.C:c029  E0 02        CPX #$02          ; check for block index of text part
.C:c02b  D0 DD        BNE .blockloop    ; not in text part -> repeat
.C:c02d   .textpart:
.C:c02d  48           PHA               ; save accu
.C:c02e  A5 FC        LDA $FC           ; load index for run-length data
.C:c030  4A           LSR A             ; and shift right
.C:c031  A8           TAY               ; -> to Y register
.C:c032  B9 4A C0     LDA .seqlens,Y    ; load run-length data
.C:c035  90 04        BCC .lownibble    ; carry clear from shift -> low nibble
.C:c037  4A           LSR A             ; shift high nibble into low nibble
.C:c038  4A           LSR A
.C:c039  4A           LSR A
.C:c03a  4A           LSR A
.C:c03b   .lownibble:
.C:c03b  29 0F        AND #$0F          ; mask low nibble
.C:c03d  F0 08        BEQ .textdone     ; run-length zero? then text block done
.C:c03f  E6 FC        INC $FC           ; increment index for run-length data
.C:c041  A8           TAY               ; run-length to y-register
.C:c042  68           PLA               ; restore accu
.C:c043  49 09        EOR #$09          ; toggle between '8' and '1'
.C:c045  D0 CD        BNE .outloop      ; and back to output loop
.C:c047   .textdone:
.C:c047  68           PLA               ; restore accu
.C:c048  D0 C0        BNE .blockloop    ; back to loop for next block
.C:c04a   .seqlens:
.C:c04a  28 38 36 36  .BYTE $28,$38,$36,$36
.C:c04e  52 12 52 12  .BYTE $52,$12,$52,$12
.C:c052  42 12 42 22  .BYTE $42,$12,$42,$22
.C:c056  52 12 52 12  .BYTE $52,$12,$52,$12
.C:c05a  72 82 28 28  .BYTE $52,$82,$28,$28
.C:c05e  72 32 14 82  .BYTE $72,$32,$14,$82
.C:c062  82 72 42 22  .BYTE $82,$72,$42,$22
.C:c066  82 82 42 12  .BYTE $82,$82,$42,$12
.C:c06a  42 22 82 92  .BYTE $42,$22,$82,$92
.C:c06e  36 06        .BYTE $36,$06
.C:c070   .lseqlens:
.C:c070  27 50 4F 9C  .BYTE $27,$50,$4F,$9C
.C:c074   .chars:
.C:c074  33 31 31 37  .BYTE "3117"
```
[Answer]
# [R](https://www.r-project.org/), ~~178~~ 165 bytes
*-10 bytes thanks to [Dominic van Essen](https://codegolf.stackexchange.com/users/95126)*
```
`?`=c
w=8?2?8?2
x=5?2?1?2
y=2?4?2?2?2
z=4?2?1?y
cat(rep(7?0:76%%2*7+1?3,156?79?8?2?8?3?6?3?6?3?2?x?x?z?x?x?7?2?8?w?2?7?2?3?4?1?2?w?7?y?w?z?8?2?9?6?3?6?80?39),sep="")
```
[Try it online!](https://tio.run/##LU3RCoMwEHvvZwiCbj7YVls7OPIrDvFd3EDbn69ZJyEhd0dye84zZlnUIRMMSHXKSKfpohgM9IRKMpRtVMv72@zr1nj0L@/q2jz8U8N2enTwAf8aC3fT4CRSUV9uB/XnLMv5hrNHpKaSDXdy6mFD233WTaqqzfkC "R ‚Äì Try It Online")
A run-length-decoding solution with a few optimizations thanks to [this tip](https://codegolf.stackexchange.com/a/171855/16766).
[Answer]
# x86-16 machine code, IBM PC DOS, ~~117~~ ~~108~~ 107 bytes
Binary:
```
00000000: be14 01b1 53ac d404 bb67 01d7 cd29 fecc  ....S....g...)..
00000010: 75fa e2f1 c3ff b7fd 4122 0922 0d1a 0d1a  u.......A"."....
00000020: 0d0a 150a 050a 150a 050a 110a 050a 110a  ................
00000030: 090a 150a 050a 150a 050a 1d0a 2122 0922  ............!"."
00000040: 090a 1d0a 0d12 050a 210a 210a 1d0a 110a  ........!.!.....
00000050: 090a 210a 210a 110a 050a 110a 090a 210a  ..!.!.........!.
00000060: 251a 0d1a fd45 9c33 3138 37              %....E.3187
```
Listing:
```
BE 011E         MOV  SI, OFFSET DAT     ; RLE table 
BB 0171         MOV  BX, OFFSET CHR     ; character table 
B1 53           MOV  CL, 83             ; data length 
            BYTE_LOOP: 
AC              LODSB                   ; AL = byte
D4 04           AAM  4                  ; Unpack AL = char index, AH = run length 
D7              XLAT                    ; AL = ASCII char 
            RLE_LOOP:
CD 29           INT  29H                ; write char to console 
FE CC           DEC  AH                 ; decrement length counter 
75 FA           JNZ  RLE_LOOP           ; loop until end of run 
E2 EC           LOOP BYTE_LOOP          ; loop until end of bytes
            DAT:
C3              RET                     ; return to DOS (and first byte of DAT)
                DB  0FFH,0B7H,0FDH,41H,22H,09H,22H,0DH,1AH,0DH
                DB  1AH,0DH,0AH,15H,0AH,05H,0AH,15H,0AH,05H,0AH,11H
                DB  0AH,05H,0AH,11H,0AH,09H,0AH,15H,0AH,05H,0AH,15H
                DB  0AH,05H,0AH,1DH,0AH,21H,22H,09H,22H,09H,0AH,1DH
                DB  0AH,0DH,12H,05H,0AH,21H,0AH,21H,0AH,1DH,0AH,11H
                DB  0AH,09H,0AH,21H,0AH,21H,0AH,11H,0AH,05H,0AH,11H
                DB  0AH,09H,0AH,21H,0AH,25H,1AH,0DH,1AH,0FDH,45H,9CH
            CHR: 
                DB  '3','8','1','7'
```
Uses a form of RLE to encode the lengths for each run of numbers. Since there's only four possible numbers, these are encoded using 2 bits of each byte and the remaining 6 bits for the length of the run. This compresses the 624 byte input down to 83. For example:
```
Run       Len    Num   Hex
888888 -> 000110 10  = 0x1A
777    -> 000011 00  = 0x0C
1111   -> 000100 01  = 0x11
```
A standalone PC DOS executable COM program. Output to console (in delightful MDA amber today):
[![enter image description here](https://i.stack.imgur.com/70e9Z.png)](https://i.stack.imgur.com/70e9Z.png)
Or formatted with line breaks:
[![enter image description here](https://i.stack.imgur.com/pHfHM.png)](https://i.stack.imgur.com/pHfHM.png)
*-8 bytes thanks to @gastropner for the excellent idea to use `AAM` to unpack the byte instead of bit shifting!*
*-1 byte thanks to @gastropner adjusting data to start with a `0xC3` (`RET` opcode)!*
[Answer]
# JavaScript (ES6), 183 bytes (possibly 182?)
```
x=>"7"[r="repeat"](156)+(o="1"[r](78))+"...".replace(/./g,x=>x.charCodeAt().toString(2).padStart(8,0).replace(/0/g,8))+1+o+"3"[r](39)
```
Where `...` is a string of 34 characters. Many of these are ASCII control characters or weird possibly invalid ones like `0x80`, but if I save it to a file on my laptop it will produce the correct output (with a `console.log` of course). Oddly it seems to work with a raw null byte too, but as I'm not sure if I'm right about that I've just used a `\0`. The string looks something like:
```
"\x80`\x1C\x0E\x07>O\x93√â√¶|\x9F'√≥√º\x03\x00√è√ß\t√æ\x7F\x9F√è3√º√ø<\x9Eg√π√ø\x03\x81"
```
For now this is a 1-2 bytes behind the current answer (was ahead until I remembered to add `x=>` >:|), but I worked pretty hard on it and I'm sure it's possible to find a couple of bytes to golf somewhere.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 86 bytes
```
L·∫ã@1,8≈º·∏£L·∫ã/‚Ç¨F
7·∫ã156;1·∫ã78¬§¬©;‚Äú¬Ω·∫∏^o‚Äú2F·∫í‚Å∂ƒ°b»•‚Äú¬°E‚Å∑¬£c·πø‚Äút¬°…ó·∏ã‚Äú¬£F¬¢X»•‚Äú¬°Mc·πæb»•‚Äú¬¨3·π¨o‚ÄôD√á‚Ç¨F¬§;¬Æ;3r·∫ã39¬§·∏å
```
[Try it online!](https://tio.run/##y0rNyan8/9/n4a5uB0Mdi6N7Hu5YDOLoP2pa48ZlDmQZmppZGwJpc4tDSw6ttH7UMOfQ3oe7dsTlA1lGbg93TXrUuO3IwqQTS0EyC10fNW4/tDj54c79QG7JoYUnpz/c0Q2SWex2aFEEVJEvUH4fVMca44c71wDNmulyuB1k56El1ofWWRsXAW00tjy05OGOnv///wMA "Jelly ‚Äì Try It Online")
-12 bytes thanks to user202729
[Answer]
# [Python 2](https://docs.python.org/2/), ~~309~~ ~~158~~ ~~155~~ ~~136~~ 135 bytes
```
x='1'*78
s='7'*156+x
a=1
for c in str(int('109PDKEZ3U32K97KJQVELW8GKXCD42EGEYK715B6HPMPL0H8RU',36)):s+=`a`*int(c);a^=9
print s+x+'3'*39
```
[Try it online!](https://tio.run/##Fcy7DoIwFADQvV/R7ULrQKlQqumiNBCLCZrgazAQEiMLEMqAX191PMsZP/N76EPnFgUMiEiQVSCAsCimC2oUQ69hwi3uemznyev62QMWyDI1@sErHhopzOF00cU1ycxtn65Dnem7ESzaxXl5LIsgT84VrHjs@xtLVd3U5J@0/rZ5KonG6Sds6UKBA@HSuS8 "Python 2 ‚Äì Try It Online")
# [Python 2](https://docs.python.org/2/), 137 bytes
```
s='7'*156
a=1
for c in'90'*8+str(int('PL6PU5TXIC24LCKIQY50C2LPAIC9TVZEVQGTMM63IHGBBUV1XSA6',36))+'09'*8:s+=`a`*int(c);a^=9
print s+'3'*39
```
[Try it online!](https://tio.run/##FcwxDoIwFADQnVOwfdo6FCrVajpAY7AREohA0MFASIwsQCiLp684vuXN3/UzjYG1RsIBsB9yp5O@854Wt3eHEQQFfCRmXbxhXD3IU55XYdloFexTddPFI6QqSPNIK1HWz0tdJGWWcaavSRxXtd/cIw47xhEiQMVWnQyRbdfi/9ajc/eSwpmXTa4hwAAzYe0P "Python 2 ‚Äì Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 85 bytes
```
‚Äù7·∫ã‚Äú…ì‚Äô80‚Äú¬°»Æ‚Å∂L√ë…ìƒ†‚Å∂-‚Ç¨√òƒ°¬∞$¬§·πõ·ªç·∏≥∆ì∆í·π≠‚ÅΩ@^·∏•‚Å∑Of·∫°<e¬Ω·πÜ≈º;,R·πò¬∂·πÄ·∏ä+`‚Å∏‚±Æ·∏Éƒø√æ·πõ9.w∆ë¬°k·∏üU·∫égLL¬µ‚Äô·∏Éƒñ≈í·πô·ªã‚Åæ1839‚Äù3·∫ã
```
[Try it online!](https://tio.run/##FY7NCgFRGEBfxs5PNAsjFh5gSilb2QyFvezmUhYmakyJEFPsEAn3zhjqzph4jO97kevancXpdJp6u90VAo1VFlwTjeXXRmOupiVx53NEctMC62uHG0lJ7O2DWejwU4xvgS3AGwG9RHY0AXZA4herQHdI7qU6uE5B5z6wwfuRT5SBzfgNmAF0GK8hoXg@Au2Hr@ApK7lUJ7K40wK6roA7bmgav8qFvzB9y/IcPBPJM6MqOXmpyEshfg "Jelly ‚Äì Try It Online")
Based on Dennis's approach to the Trinity Hall challenge, minus the symmetry, plus the leading `7`s and trailing `3`s.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 164 bytes
```
$a='136361616151315131531532513151315215436365213213315454521532545453153254541616';6..2|%{$a=$a-replace$_,(11,88,22,34,3332)[$_-2]};'7'*156+'1'*78+$a+'1'*78+'3'*39
```
[Try it online!](https://tio.run/##PYzBCsIwEER/JrKapoXdSdNI8UtESpCAh4ClPXhQvz0mSmVm4c0yzHx/xGW9xZRyVuFEDAfHVT3jd9XyT8K9rZ0CKC4fWyTfTiVsVEdodF0nr92zTKvQLnFO4RrVZPbMxnsjYmANADmc1dTK5T3SQJp71xCTHnyjwkYE0jjm/AE "PowerShell ‚Äì Try It Online")
String multiplication, concatenation, and replacements. PowerShell doesn't have base 36 or similar, so large-number compression options are limited. There might be a better way to "compress" the middle part -- I'm still checking on that.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 89 (17+71+1) bytes
First you export the number to a GZIP file. This file, named "o" with no extension will be exactly 71 bytes, which counts towards the total. By default, it will go to your `$TemporaryDirectory`. Omitting digits for readability.
```
Export["o",777777...,"GZIP"]
```
Then
```
"o"~Import~"GZIP"
```
will reconstruct the number. The file name is one byte so that's where the +1 comes from.
[Try it online!](https://tio.run/##y00syUjNTSzJTE7871pRkF9UEq2Ur6RjPoiBIXWBBRQgswyxMaCqMVjIDDzKEGbgsBRVGVgMWQMGC8NSLMqwuQ1FGRafUhUYEwd0lNyjPAOUYq250hRsFf4Dk2CdZy4oNdZBJP4HFGXmlSg4pFkrgFkObpk5qU6VJanO@aVAHlD9fwA "Wolfram Language (Mathematica) ‚Äì Try It Online")
[Answer]
# [Befunge-93](https://github.com/catseye/Befunge-93), 500 bytes
```
v F         >20g1-20p
>"3"20g10g`#^_>52*"F"20p30g10g`#v_"^!1"21p30p84*2+1p
^                       p03-1g03<
^>"81118888888811888888881>!"30p84*2+1p52*
^^"8888811188888811"*25"188111118"<>">#7"21p30p57*5p
>*"188111188188111188188111118818"^ $>:#,_@
^25"18811111881881111188188111111"<
>"8888811888888881"25*"1111111881"^
^"88811881111111881118888"*25"188"<
>"1188111111188111111118811111111"^
^"11881"*52"188111111118811111111"<
>"11111881"52*"188111188188111188"^
^"1118811111111188888811188888811"<
```
[Try it online!](https://tio.run/##bVFBDoMgELzzCh17ojVhsaSmMaSnPmNtmlhvDZf6fUsR1Gj3QIZhmB2WZ/f6vPtuHIfsnqWyWvVUauWERYXfRvWPgltrtMTdE66K3NCCc4Imz7j6LPWRnODsfzlVldSrqhFsURNRHWuFbI7FybcTzIgaSmJIbUCB8iQaC1tcYgZzkcbHluncrxsQEDg72Gtxam@C12b1HhEaP4ZtTmjje1DSgkXISfMtmiOnuMFnK9ig4DM5SqPxXzP5xMa/L9m/Nfqsbs3TW8bYjOMX "Befunge-93 ‚Äì Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~188~~ ~~187~~ ~~185~~ ~~181~~ ~~176~~ 156 bytes
-1 thanks to JonathanFrech.
-2 -4 thanks to ceilingcat.
```
x;r(d,n){for(;n--;)printf("%d",d);}f(i){r(7,156);r(1,79);for(i=38;i--;r(1,x%10))x="PS10*,),00*,/00=+/ff0/)-)-*,),)-)-SSgf"[i]-20,r(8,x/10);r(1,80);r(3,39);}
```
[Try it online!](https://tio.run/##HY7BCsIwEER/RQKFXd2QjUUbCf0HoUfxIC0pORgleAiUfnvd9LIDj5nZGfU8jttWfIaJEi7hk8EnrT1@c0y/AKqZFE3o1wARlwwd2csVxW6pu6Gv/ti3zkfJVFgay4ilV/fB8pGQWK5h7k8mBDaoUVdadRjmoB7xqc9MGRwVI9G9xO3aUisf1k12HN6vmEDmQQV/ "C (gcc) ‚Äì Try It Online")
[Answer]
# [Knight](https://github.com/knight-lang/knight-lang), 113 bytes
```
;=s*"1"311;=p;=l',kr`\J&J&A&A/J&J&\kke\:8ee\A/eeA&A/er`'76;Wl=sSs=p+p/=t-Al;=lSlF1""9 9F*"8"%t 9O++*"7"156s*"3"39
```
[Try it online!](https://tio.run/##rVhtd9rGEv5sfsVaOUZaELUk3DZBCA5J7Rz3OnZqkpsPhiZYCFsnsuBIomlv7P71dGZ2V1oBTm9f/EHy7s7LMy87MyLs3IThlydxGibredTPi3m8/OZ20NB3kvi6thUWv62iDaIsTm9qW0V8J2jm0SJOI5YkLFmmN/QoN9@cv33F3Go5fnPJvGr539ElO6qWJ@cv2NNqefmWuRXxydlYoz1/e6aRvj1/NRr/x8o5s@DR/N39lpdnozEoFUfh7Sxr8ZJYpwGcin0wOKpOzo/f4VEKR2jLPfzX79fPUTydwz/3VpJwWNUInl9cnBEFPIZgVQ9M0XRfvhSHwFqC@2WWrCPOr9IpbzQINkQgmt0Fl8bxxYn1xQ/yluEaXdf1g5UfJKb9Mfsw@bH5Y3PUHB3ie/LxYzTpPY2iyegwinA3yj6Y33/nv0uCfJwHq/bqMCg6owS4x8mJaxjP2LOTlvHUOCjYs4t2u2V8b7jffgd6ukb32RcOeg2/AVFezbI8sjj73NiL04LFfmMPdgmxzVqLdRrCDmJmIayLu5Wdr9Irbxp8dmznwW8AGwsEPbwdIP50GyeRBRYCoSUMtZkxKSbpZDHJ2OeHq6nFe08MTkr34gWzpD9YEDDzicmZEKF292F3ksJ2uy12QMlelOSRvvEgFTMrzufxTVwodlCDCF27BCneLeY6rM1aEmK7zVmHmY4JshBSzFkWFessFVl/z0QUWb/PjnhpZZwny09RZoUgVulj9/dMYQhpFZJh700uzY13mBIHrg3eDcrtDRB4uQAEJCQDknS@XlkYDCZ91GGw4pJN6JuYZqXcMIW3gQqgltrZ4SGDEgD/A4TVLC9YcRuBzFlWALF0aEt5CCMRopI9hQorwJ@hgqfLRYQ0qzGLnClgCZWt@Xq1QldyFX@1oztWzxRwqCYQZaikW6WQcVCAMMckVOGGNyYbUinqyY0T3MBi1MMihOmssoTql7DNwmuAUGdJsgytI8d2OVqE23UjhNBLzfGvzRICSVZsLrLJy7cL/ej4@YsPP@2f/XChGVGT4G1L2K@JeHk6foy3u80r4L40S@SnjyA/qvPWSR6wpmTrFN3mU62DorHMLVVTKAshv4o4ZHR6vV5ceUdTCUI4v0l3rtSer6BdFQsLSMGqgySZG@oyDwZwG20UsikAMrMUIJqG0F@j6zO3WzcSLcf8GDKjyNaRAXlR7mOawP5iBvcVD4x0nSRG5QK0E02X5R6d8f75cpnAwXXdAY@aWln1NXtaf90gHeX1JkqMWbFM/1WMkInFMkksHarNHBuq7t@AnG5Bxmb1avT63MaWJfIMlqdXruM4U@pssFSrPP5f9L5g@PIbVYZq1qIHYGXjw6NnN3BV58Oig80PX/T0xKsLBCenZ8cttoB65e@VmS31YSkMZys7iVJqlJqvLNlVhM/gzj3mjE1GbATYRxbLDGomtVzob33yhQ@FPcbDshiEd6uNCJCT4mlVF9BN8RTV5J/iIry1WjS6sPrsAj5i8i/EXmGOzB5DLYIgQIfi7AOFkTfJKClejly1lOU@tbyKgma6IsP2QWPd1ZR/rtIM5gwqt0LxJSiuy85m6dziTefXBfxVhK@BEIQKF91ERQLzmdWkUDYxQNil5nHK/XhhWRRObL7hbYZQbEhTzkWUA8ffCRVeiEvpOxb6qDtRLZD@UMzoIlk2K5DPK2sEeXnyojpBTt3BJc0HoMFcgOwLVstVlFqaXtvIDGrWACq4E60LsjHwnKOntC/buyVmggUgn6NNMBRBwto4MQE5dG9aoQ5QrZLLgk3WDmjqwPsKlFx6G@SQLvI0SmgFzNOnhsqLlSU/gSXRrzAx4V3fsnO/FnOawPexjm0Rnm0lB2hJ6n7RyH8we3Ik25HGZd2T7cc4X99dwziCDYirDoSfF9UMt1UMFeuYvrisgxwZ61dhmxncCbOIrhfqKDcqUnWAzSWapVLsY/1LNiw9AqqfCy9cVF7AewEhlE4T8ay5jjWbeHrV6SDpVAyaE5ps9xSsg29aOeCxYMWZummZBn9d5Cr6ZU6I4UsAapeAqEpCtcSCjKmlhUfMs3v1aItPP6SGEZupXPJEzHECpcsgAkBUuI2XPFBWenx3qoazQr3kGOi2Kzdx9T/K4jAe2vQuZImQdnW2slPLdhyW63gFU6uKzg4vbDbnHX5obflBxHWXF@52mNYimkAXQgzQgSwqkIE5gc8mJPI7HZInHUUNczPQwqNF7fYfftUxh7sdc/BVpoPdTD@TN2sGiVme9jzdSl@6XXg9YB1308vEAhFw4bp1XLhqbo3J@5tcfSiXu3iCAFkITo/JHacMBQXAGzgyBh6nIaYVUFwamxeFDrXm1Se/bNRYvF@1KxjUL@CQ6XnW1z2OrD3xKwowC4Ihq00ktGkz7eKhDEdwquruiZKDtPsBFDYN8uCfQx78C5AHCvL@DsyBxCwhDx@HLLTugIzHQ1Yj8EoKT9Xk/V04q0VpnkpmXUAJr1ndKLRlV7kZ6pwyDUv@@/@HX@avJqbk982eTu3r888mbVBd5PrxX56M1bhUjcZIt1cbj8tbRDQocRrUuLUbhhxI0W6XbALyOzBP/LKhzy4165jeDiXbaX0QRFKNf@j1uppbXoohNNCadluvadtDdypHWbu8C93ajDQWjt4Q6m9WUW9XFe3ysrV4JfcRbf5Jj0Vg@MZQhOU8WXZYvd16YCFqbbvYd6nniPwXh/Qiira8CaB9Hi1m66QAy9TQEqdwGM/pR4lZWEQZNJjQxDEGdzh75LMIhdHcKn/ieqAP07tZnFocf@mgbxP8cd1ySHH9I@Dhyx8 "C (gcc) ‚Äì Try It Online")
This one was fun to golf. Not sure if it is *optimal*, but cool nonetheless. Came up with it myself, I see others had similar ideas. üòÖ
One challenge in Knight is that only printable ASCII, tab, newline, and CR is allowed. All other characters are UB (although generally supported).
So basically, this uses a lookup table containing indices of `8`s and the length.
It is specifically encoded as \$9 + \text{len} + 9 \times \Delta\text{pos}\$.
Specifically, it was generated by this C program (string literal snipped)
```
#include <stdio.h>
#include <string.h>
int main()
{
    // the range containing all the 8s
    char str[] = "8888888811888888...*snip*";
    char acc[40] = {0};
    // Start at -3 to make our first index in ASCII range. We start at 79, so this is free.
    int pos = -3, i = 0;
    // loop through all the 8s using a strtok loop
    for (const char *s = strtok(str, "1"); s != NULL; s = strtok(NULL,"1"))
    {
        // 9 + len + 9 * offset from last index
        acc[i] += strlen(s) + 9;
        acc[i++] += (s - str - pos) * 9;
        // update position
        pos = s - str;
    }
    // print
    puts(acc);
}
```
So, with that out of the way, here is the program ungolfed:
```
# Create the base string with all 1's
# This is string repetition, not arithmetic.
; = str * "1" 311
# Position to start inserting.
# The first 8 is at index 79, but we start early to make
# the first character in the LUT in ASCII range.
; = pos 76
# magic lookup table
; = lut ',kr`\J&J&A&A/J&J&\kke\:8ee\A/eeA&A/er`'
# For all chars in lut
; WHILE lut {
    # Get codepoint of the front of lut and subtract 9
    ; = chr - ASCII(lut) 9
    # Pop first char from lut
    ; = lut SUBSTITUTE(lut 0 1 "")
    # Extract delta and length
    ; = delta / chr 9
    ; = length % chr 9
    # Advance position
    ; = pos + pos delta
    # Inject <length> 8's into str
    : = str SUBSTITUTE(str pos 0 (* "8" length))
}
# Add leading 7's and trailing 3's
; = str + (* "7" 156) str
; = str + str (* "3" 39)
# print
: OUTPUT(str)
```
[Answer]
# [Scratch](https://scratch.mit.edu/), 396 bytes
[Try it online!](https://scratch.mit.edu/projects/624890265/)
There's probably room for optimization.
```
define(n)(t
repeat(t
set[P v]to(join(P)(n
when gf clicked
set[P v]to(
[7][156
[1][78
[1888888881][2
[1][2
[888888111][2
repeat(2
[8][2
[1][5
[881][1
end
repeat (2
[8][2
[1][4
[881][1
end
[1][1
repeat(2
[8][2
[1][5
[881][1
end
[881111111][2
[1888888881][2
[188][1
[1][7
[8811188881][1
[8][2
[1111111188][2
[1][7
[8811118811][1
[8811111111][2
[881111881][2
[1881111111][2
[118888881][2
[1][79
[3][39
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `s`, 66 bytes
```
7113Sf¬ª¬´u2F¬ªS4/‚åä*2 18f38·∫ãf¬ª.‚ü©o2d‚â•s¬æT¬¢(‚ÇÄP‚üái≈Ä‚Çç#(‚á©t‚ÅΩ ‚â†·πó¬≤¬Ωu&‚Åº‚àëH¬ªfZ√∏d·πÖ·πÄ
```
[Try it online!](https://vyxal.pythonanywhere.com/#WyJzIiwiIiwiNzExM1NmwrvCq3UyRsK7UzQv4oyKKjIgMThmMzjhuotmwrsu4p+pbzJk4omlc8K+VMKiKOKCgFDin4dpxYDigo0jKOKHqXTigb0g4omg4bmXwrLCvXUm4oG84oiRSMK7ZlrDuGThuYXhuYAiLCIiLCIiXQ==)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~244~~ ~~128~~ 120 bytes
*-8 bytes thanks to @JonathanFrech*
```
s='1'*78
print'7'*156+s+bin(int("8zlghh9gqo74zwzntkcjmoou35vvlbg1cmasrm6ny1iafcvw568sj",36))[2:].replace(*'08')+s+'3'*39
```
[Try it online!](https://tio.run/##DczBDoIgGADge4/h5RdsLSQB23qS1kGZAaZAQjh9efL6HT6/Re1snXN4AAHMxckvxkbggEnDqlD1xpYHlIXYJ6V1q76O3/Z1t/Ejx9m5H21SmnpF5NyFZWZ2I6Z7y7Q2TISxOFOG0LO@vy7L4KdODiWGqwB0zEAB0zbnPw "Python 2 ‚Äì Try It Online")
[Answer]
# [///](https://esolangs.org/wiki////), 180 bytes
```
/~/\/\///P/IH~O/1G~N/1J~M/AA~L/77~J/IB~I/88~H/11~A/LLLLLL~B/HHH1~C/333333333~D/BB~E/III~F/H1I~G/F1/MMMMMMADDDDDBHEPEP1EH1EGOPGIOIO1PGPGJJ1EPEPJIFINNNIONN1IOIONNHEH1EDDDDDBH1CCCC333
```
[Try it online!](https://tio.run/##Nc2xDsIwDATQTzpZDO2atGnsiDr5ABYGJAa27vfroang3Xi27vg8j/fr6B3E4wzQYMoKyXRI4Y4QeMc0scAiDfNMhQgD7hdGqKpwwe2PK2Jkgplxg4oxYxPsl7AOUVNLTZJKyrVlq1al5ZZLkVEU28zdrbrL6Nx1nP5eZTmdO71/AQ "/// ‚Äì Try It Online")
]