[Question]
  [
# Scenario
One of your friends is struggling on a homework assignment. He needs a simple program which prints the first 404 natural numbers:
```
1 2 3 4 5 6 7 8 9 10 11 ... 401 402 403 404
```
Your challenge is simple: write this program for him.
However, your connection is terrible, so 1 random character is lost every time you send the program. To prevent this from breaking your program, you must make it so that removing **any single character** will have **no effect:** the program works, regardless. (The original program must also work.)
Because the connection is too poor to send large files, **your code must be as short as possible.**
TL:DR - make a radiation hardened program to output the numbers 1 to 404
---
## Rules/Details
* The output may be a list of integers in any reasonable format (separated by spaces, newlines, commas, etc). However, your **output must be consistent** and not change when the program is modified.
* Command line flags that contain logic, execute actual code, generate the number list, and so on, are banned.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest submission (in bytes) wins!
  
[Answer]
# JavaScript, 228 bytes
```
etInterval=stInterval=seInterval=setnterval=setIterval=setInerval=setIntrval=setInteval=setInteral=setIntervl=setInterva=top=>4
setInterval
`405>(i=this.i?i:1)?alert(i++):0`///`
setInterval
`405>(i=this.i?i:1)?alert(i++):0`///`
```
### Explanation
Evaluating code in a `setInterval` allows the program to continue even if there is an error. We make sure that the code passed will error out if any single character is removed. Template string syntax can be abused to call `setInterval` with a constant string without parentheses. Luckily, even if the template string is on the next line it still parses as a function call with such syntax.
The first issue we run into is that `setInterval` is a function, and thus if a character is removed and the program tries to call `setInteval` instead, it errors out. Of course, since there are two indentical invocations of the `setInterval`, we don't have to worry about it actually functioning correctly as long as we avoid the error. So, the first line defines every possible "misspelling" of `setInterval` to a valid function.
The first line works by assigning all of these "misspellings" to the function `top=>4`. Note the ES6 syntax, this simply takes a paramater named "top" and returns 4. Why "top"? Well, the first line must never throw an error even if a character is removed. If an `=` is removed to make `top>4`, this boolean expression will be valid since `top` is predefined in browsers, simply yielding `false`. If the 4 is removed, the function body simply becomes the first `setInterval` segment, and the second runs unharmed.
Now, all that is left to worry about is if a ` is removed.
If removed from the beginning, `setInterval` simply does nothing, evaluating to itself as its own expression. Then, the rest of the second line simply runs a single iteration of the loop, letting the other `setInterval` fragment finish the job. If removed from the end, the remaining backtick is picked up from the end of the comment.
The newlines are placed so that removal one will not affect program behavior, but they prevent errors in the case of some character removals such as the leading backtick.
[Answer]
# Pyth - 16 bytes
The basic idea behind this is that when you take a digit off of `404`, it only makes the number smaller, so we just have to get the maximum of two `404`'s to ensure we have the right number. Obviously, there are a bunch more redundancies.
```
SSsetSS[404  404
```
Explanation:
```
SS                       First one does 1-index range, second one sorts, which is no-op 
 s                       If the e is there, this is no-op, if only t is there, it sums a one element list, which is the item
  et                     e picks last element in list, and if e is gone, then t gets you the list without the first element which is good enough when combined with s
   SS                    Sorting twice is no-op
    [                    Start list, this can't be two element because if we get rid of initial 4, the 0 becomes third element which neeeds to be captured
     404                 One of the 404's
     <space><space>404   Need two spaces for redundancy, because 404404 *is* bigger than 404
```
[Try it online here](http://pyth.herokuapp.com/?code=SSsetSS%5B404++404&debug=0).
[Answer]
## [Befunge-98](https://github.com/catseye/FBBI), 37 bytes
```
20020xx##;;11++::''ee44**``kk@@::..;;
```
[Try it online!](https://tio.run/nexus/befunge-98#@29kYGBkUFGhrGxtbWiorW1lpa6emmpioqWVkJCd7eBgZaWnZ239/z8A "Befunge-98 – TIO Nexus")
### Explanation
Making radiation-hardened code in Befunge-98 isn't *too* bad, because you can set the "delta" (i.e. the step size of the instruction pointer) manually with `x`. So if set the delta to `(2,0)`, from then on every other character is skipped and we can simply double up all commands. The tricky thing is getting `2 0` on top of the stack in a reliable way. We'll actually need `0 2 0` for the rest the program to work correctly, but we'll that for free. Here is how we do this:
```
20020xx
```
Note that each digit pushes itself, so in the full program, there will be a start `2 0` which we'll simply ignore.
Consequently, dropping either the first or second character from the program is irrelevant because we won't use those digits anyway. Likewise, removing the third character is identical to removing the second, so we don't need to worry about that either. 
Let's consider what happens in the other two cases. Dropping the fourth character:
```
2000xx
```
Note the delta is set to `(0,0)`. But this doesn't move the instruction pointer at all, so the same `x` is executed again immediately and this time pops the `(2,0)` and all is well (there are implicit zeros at the bottom of the stack for our later purposes).
Let's drop the fifth character instead:
```
2002xx
```
Now the delta gets set to `(0,2)`. However, there is still no horizontal movement, so the IP wraps immediately back to `x` and again, the correct delta gets set.
From this point onward we can basically ignore the character duplication as well as this initial part because it will always be skipped:
```
...#;1+:'e4*`k@:.;
```
The `;` is a sort of comment command which skips everything until the next `;` is encountered. However, we jump over the first `;` with `#` so only the part between the `;` will be executed from that point onward.
```
1+    Increment the top of the stack.
:     Duplicate it.
'e    Push 101.
4*    Multiply by 4 to get 404.
`     Greater-than check. Pushes 1 once the top
      reaches 405, otherwise 0.
k@    Terminate the program that many times.
:.    Print a copy of the top of the stack (and a space).
```
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), 12 bytes
Code:
```
XX440044ÔÔŸŸ
```
Normal code explanation:
```
X             # Pushes the number 1.
 X            # Pushes the number 1 again.
  440044      # Pushes the number 440044.
        Ô     # Connected uniquify.
         Ô    # Connected uniquify.
          Ÿ   # Inclusive range of the top two elements.
           Ÿ  # Inclusive range on the array, which leaves it intact.
```
This leads to the following golfed code: `X404Ÿ`, which is what we want to achieve.
The number **404** is generated by any of these variants:
```
440044ÔÔ
40044ÔÔ
44044ÔÔ
44004ÔÔ
440044Ô
```
The inclusive range works as following on two numbers:
```
`1 5Ÿ`             ->    [1, 2, 3, 4, 5]
[1, 5]Ÿ            ->    [1, 2, 3, 4, 5]
[1, 2, 3, 4, 5]Ÿ   ->    [1, 2, 3, 4, 5]
```
Which always makes the second `Ÿ` a **no-op**.
Uses the **CP-1252** encoding. [Try it online!](http://05ab1e.tryitonline.net/#code=WFg0NDAwNDTDlMOUxbjFuA&input=)
[Answer]
# [><>](http://esolangs.org/wiki/Fish), ~~103~~ ~~60~~ 51 bytes
```
               vv
;?=*4o" e"n:ll<<
;?=*4o" e"n:ll<<
```
[Tested here.](https://fishlanguage.com/playground)
Uses the same tactic as [this program](https://codegolf.stackexchange.com/a/11394/34718). If a character is deleted in the first line, the 2nd line will still be run. If a character in the 2nd line is deleted, the `v` will move execution to the 3rd line, since the 2nd line is a character shorter. A deletion in the 3rd line has no effect on program control, as it is only execution after a deletion in line 2.
The program will also work in the event that a line break is deleted:
**Case 1:**
The 2nd line will be run.
```
               vv;?=*4o" e"n:ll<<
;?=*4o" e"n:ll<<
```
**Case 2:**
Both lines become one line with twice the instructions.
```
               vv
;?=*4o" e"n:ll<<;?=*4o" e"n:ll<<
```
**Explanation:**
The core of the program is the following. Note that a `1` is pushed on the stack already by the first line.
```
ll:n        Push length of the stack twice, duplicate, print as number
"e "o       Push 101, 32, output 32 as space
4*          101 * 4 is 404
=?;         Pop twice, if equal, halt
            (Execution wraps around)
```
[Answer]
# [><>](http://esolangs.org/wiki/Fish), ~~42 38~~ 34 bytes
[Try it Online!](http://fish.tryitonline.net/#code=PDw7Pz0qNG8iIGUibG5sbC8KIDs_PSo0byIgZSJsbmxsPA&input=)
Thanks to [@Martin Ender](https://codegolf.stackexchange.com/users/8478/martin-ender) and [@Teal Pelican](https://codegolf.stackexchange.com/users/62009/teal-pelican) for shaving off 8 bytes!
```
<<;?=*4o" e"lnll/
 ;?=*4o" e"lnll<
```
Similar to [mbomb007's answer](https://codegolf.stackexchange.com/a/103103/62574), but only uses 2 lines.
Instead of counting up from 1 to 404 using a single memory value, I continuously pushed the length of the stack. This made it so that I didn't need to put anything on the stack before the loop started, making things a lot easier.
### The original code
The `<`s turn the IP around, and the `/` is a no-op, as the IP wraps around and continues along it's normal path. Thus, the relevant code is:
```
          lnll   Prints the size of the stack + 1 and pushes the stack size twice
     o" e"       Prints a space and pushes 101
   *4            Multiplies to get 404
;?=              If the number we just printed was 404, end the program
```
And this repeats.
### The deletion
The big key here is the mirror `/`. It doesn't do anything if the second line is modified - only wraps back around to itself and is essentially a no-op. But if a character from the first line is removed, the line will shift down, so that the mirror hits the arrow `<`, leading into an identical, unmodified loop.
The only other significant deletion would be the `\n` character. This is also accounted for, as it produces this code:
```
<<;?=*4o" e"lnll/ ;?)*4o" e"lnll<
```
Now, we have just appended a copy of the original loop `;?=*4o" e"lnll` to itself. As this is a loop, it makes no difference to the execution, and runs as if nothing had changed.
[Answer]
# [A Pear Tree](http://esolangs.org/wiki/A_Pear_Tree), 34 bytes
The program contains control characters, so here's an `xxd` dump:
```
00000000: 7072 696e 7420 312e 2e34 3034 2327 108a  print 1..404#'..
00000010: af70 7269 6e74 2031 2e2e 3430 3423 2710  .print 1..404#'.
00000020: 8aaf                                     ..
```
A Pear Tree is basically a Perl derivative, with some "interesting" features. I threw it together as a joke (so that I could say that my polyglot printed `a partridge` in A Pear Tree; in fact, almost all programs do). However, it's Turing-complete, and actually kind-of good at this sort of challenge.
The feature that we mostly care about here is that A Pear Tree will only run a program if some substring of the code has a CRC-32 of `00000000`. The code gets rotated to put the substring in question at the start. As it happens, the two (identical) halves of the code each have the CRC-32 in question (due to that suspicious-looking binary comment at the end), so if you delete a character from the source (breaking the CRC), the other half gets rotated to the start and the `#` sign near the end will comment the damaged half out, in addition to the binary junk.
Another feature makes the program slightly smaller: although A Pear Tree is mostly interpreted as Perl, it has some minor changes to make it work more like Python. One that's relevant here is that unlike Perl's `print` statement (which just runs the numbers together), A Pear Tree's `print` statement separates arguments with spaces and prints a final newline. That gives us nicely space-separated output, meaning that we don't have to waste bytes on formatting. (Note that you'll have to give the program no input; if the language receives input, it assumes by default that it's supposed to do something with it.)
Of course, this can't compete with actual golfing languages (nor would I expect it to), but I thought people might find it interesting.
[Answer]
# [Befunge 98](https://github.com/catseye/Funge-98/blob/master/doc/funge98.markdown#Quickref), 34 bytes
[Try it Online!](https://tio.run/nexus/befunge-98#@29jo2flkJ2gZZKqbqVtGM3FZYTMt4mLy/r/HwA)
```
<<.:@k`*4e':+1[
2.:@k`*4e':+1<^^j
```
This works very similarly to my [><> answer](https://codegolf.stackexchange.com/a/103116/62574), but instead of the mirror `/`, I use the turn left operation `[` and then reverse the IP direction, which is functionally equivalent to a mirror in this case.
### The original code
```
<<                 Reverses code direction, sending IP to right
               [   Turns the IP left, into the ^, which reverses it.
                   It then hits this again, turning left to go West. (No-op)
            :+1    Adds 1 to the sum
        *4e'       Pushes 404
     @k`           Ends the program if (sum > 404)
   .:              Prints the sum
```
### The deletion
If something in the second line is deleted, it will shift over, and not affect the top at all.
If anything in the first line is deleted, the `[` will send the IP into the `<`, which starts an identical loop (with the exception of `2j^^` which avoids the `^`s used in tandem with the `[`)
Because there are 2 new lines, it makes no difference to the code if one is deleted (thanks to [@masterX244](https://codegolf.stackexchange.com/users/10801/masterx244) for this!)
[Answer]
# Befunge-93, ~~54~~ 51 bytes
Thanks to [Mistah Figgins](/users/62574/mistah-figgins) for saving me 3 bytes.
```
111111111111111vv
+1_@#-*4"e":.:<<
+1_@#-*4"e":.:<<
```
[Try it online!](http://befunge.tryitonline.net/#code=MTExMTExMTExMTExMTExdnYKKzFfQCMtKjQiZSI6Ljo8PAorMV9AIy0qNCJlIjouOjw8&input=)
This is essentially the same trick as was used in the [Fault-Tolerant Hello World](/a/11394/62101) challenge. The first line starts by making sure there is a 1 on the top of the stack for the start of the sequence, and then one of the `v` arrows at the end of the line redirects the code path to the start of the main routine on line 2, executing from right to left.
Removing a character from the first line will just shift the `v` arrows across by one, but that still allows the code to redirect to the second line successfully. Removing a character from the second line causes the `<` arrow at the end of the line to shift out of the path of the `v` above it, so the code path will be redirected to the backup routine on line 3.
Removing the first line break does no harm, because that just moves the third line into place to replace the second line. And removing anything after the end of the second line will have no effect, because that's just the backup code.
[Answer]
# JavaScript + HTML + Stack Snippets, ~~167~~ ~~158~~ 154 bytes
Abusing the fact that JavaScript in Stack Snippets gets placed in a web page inside a `<script>` element.
```
or(x="",i=405,d=document;--i;)d[i]||(x=d[i]=i+' '+x);d.write(x)</script></script><script>for(x="",i=405,d=document;--i;)d[i]||(x=d[i]=i+' '+x);d.write(x)
```
[Answer]
# [Actually](https://github.com/Mego/Seriously), 18 bytes
```
:404::404kMkMMRRSS
```
Actually is a stack based golfing language.
Explanation of the commands involved (as they work in the above context):
```
Numbers are indicated by round brackets () and lists by square brackets []
:         - pushes the longest string of characters in '0123456789+-.ij' as a numeric
k         - pop all the elements on the stack into a list [l] and push [l]
M         - pop [l], push max([l])
            pop (a), push (a)
R         - pop [l], push reverse([l])
            pop (a), push range([1,a])
S         - pop [a], push sorted([a])
```
[Answer]
# [Zsh](https://www.zsh.org/), 26 bytes
```
>404
>404
seq  ???||seq *
```
[Try it online!](https://tio.run/##qyrO@P/fzsTAhAtMcBWnFioo2Nvb19SAWFr//wMA "Zsh – Try It Online")
[Verify all mutations!](https://tio.run/##HU/LbsJADLznK0YCCUoDIjS0IGhz7qmH9lZVYmGdsNI@yHpT2hK@Pd0g2aOxbM/Yf3zsBuAaimFdiOmN0PoXAt9CK4mDM0ZYmWLfBDiLj9c3qAD6URwYIoaFsoH8yVNElM4jHAnvdaO8J42Td5UXxihbQQtbNaKiZHCTM9HG8jluxUFF3OvvuN6hFErH@RTscCYwhd4zuNjQTDiSp4Tr8d2tTBJ@HnUv@TxPbpAw1UBRFG3bs0k3SvqjFMaXbDYbDvh6d/EGkw3FDzHkzyxV0@wrEnWfpZG1Ri65MW3l6YRpjTKXcrVeyXw1z5/ytZQik4dyLpYLsX9YPO432@12WFy7fw)
Explanation:
* `>404`: create the file `404`. This command is repeated twice because if one has had a byte removed, we need the other to still work. Ordinarily with `>` you wouldn't need the newline between them, but in the case the second `>` is removed, `>404404` wouldn't create `404`
* `???`: find a 3-character file name in the current directory (this will always find `404` because of the redundancy above)
* `seq`: count up to that
* `||`: if that fails (happens if `seq` or `???` is mangled):
	+ `*`: find a filename
	+ `seq`: count up to it
* The second newline before the first `seq` is necessary because otherwise `>404seq` would create two files, and then `seq *` would try to range between `404` and `404seq`, which isn't a number
* The second space in `seq ???` is necessary because `seq???` would fail to match, and for some reason the bit after the `||` doesn't get executed either (it's possibly a bug in zsh)
* If any of the two `|`s are missing, the first `seq` is piped to the second; the second ignores its input, but still outputs as normal.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), ~~11~~ 9 bytes
*-2 thanks to A username*
```
⁺ed404∴ɾƛ
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=&code=%E2%81%BAed404%E2%88%B4%C9%BE%C6%9B&inputs=&header=&footer=)
```
⁺ed404∴ɾƛ
⁺e          # Push 202
  d         # Double ^ to get 404
   404      # Push 404 again
      ∴     # Take the maximum
               # If bytes are removed from either of the 404s, this ensures the intact one is pushed
               # If ∴ is removed, 404 is still at the top of the stack so it doesn't matter
       ɾ    # range(1, n+1)
        ƛ   # Map
               # If it's a number (ɾ removed), range(1, n+1) is used
               # Otherwise (it's a range), nothing happens here
```
[Answer]
# [Gol><>](https://github.com/Sp3000/Golfish), 26 bytes
```
<<;|N:PF*4e`/
<;|N:PF*4e`/
```
[Try it online!](https://tio.run/##S8/PScsszvj/38bGusbPKsBNyyQ1QZ8LmfP/PwA "Gol><> – Try It Online")
This is pretty simple, but there wasn't a Gol><> answer yet, and it scores pretty well.
[Answer]
# [Klein](https://github.com/Wheatwizard/Klein) 000, 32 bytes
```
<<@?+-*4"e":+1:/
<@?+-*4"e":+1:/
```
[Try it online!](https://tio.run/##y85Jzcz7/9/GxsFeW1fLRClVyUrb0EqfC43///9/AwMDAA "Klein – Try It Online")
# [Klein](https://github.com/Wheatwizard/Klein) XXX, 54 bytes
```
>>>             \\
..\:+1:@?+-*4"e"<
\..:+1:@?+-*4"e"<
```
[Try it online!](https://tio.run/##y85Jzcz7/9/Ozk4BGcTEcOnpxVhpG1o52GvrapkopSrZcMXo6aGK/P//38jAEAA "Klein – Try It Online")
Shamelessly reusing strategies from my [fault tolerant "Hello world" solution](https://codegolf.stackexchange.com/a/215215/56656).
]