text:
How many balloons do I need in each corner?
You have a square board with a bunch of items laid out on it in one of a \$3 \times 3\$ grid of cells and you want to lift it up using balloons, but you can only attach balloons to the corners of the board. Your task is to determine the minimum number of balloons in each corner to make sure the board won't tip over in flight, but can still lift all its contents.
"Physics" Model

Each balloon can lift 0.25kg (these are very strong balloons)
The board itself weighs 1kg, so you would need 1 balloon in each corner to lift an empty board
Items in each corner cell only exert force on their respective corners (i.e. 4 balloons are needed in the corresponding corner per kg)
Items on each edge cell split their force evenly between their neighboring corners (i.e. 2 balloons on each of the two corresponding corners per kg)
Items in the center cell split their force evenly across all corners (i.e. 1 balloon is needed in each corner per kg)

Example Test Cases
1
Input:
0 0 0
0 0 0
0 0 0

Output:
1 1
1 1

2
Input:
1 2 1
2 4 2
1 2 1

Output:
17 17
17 17

3
Input:
5 0 0
0 0 2
0 1 0

Output:
21 5
 3 7

4
Input:
12  9 35
 1 32  2
 4  6 18

Output:
101 195
 63 121

5
Input:
9999 9999 9999
9999 9999 9999
9999 9999 9999

Output:
89992 89992
89992 89992

6
Input:
9999    2 9001
   0 9999 9999
9999  999 9999

Output:
50000 66006
51994 71992

Rules and Assumptions

You may assume each cell is filled with a whole number between \$0\$ and \$9999\$ kg weight worth of items
Use any convenient format for I/O
Shortest code wins!

Can we do the input and output numbers in any order if we use a flat list?

@xnor yes, as long as it's consistent

Here is a demonstration :-p

I believe some of your input and output are incorrect. #5 and #6 at least are all of by one.
9999*4,2,2,1 makes 89,991 but you forgot the +1 for the platform it's on.

@Arnauld Corrected.

Jelly, 14 bytes
3Ḷ×þ`ZU$Ƭ×µ§§‘

Try it online!
Takes input as a 3x3 matrix and outputs a list going clockwise starting from the bottom-right.
Explanation
3Ḷ×þ`ZU$Ƭ×µ§§‘     Main Link
3Ḷ                 [0, 1, 2]
  ×þ`              outer product by multiplication with itself ([0, 0, 0], [0, 1, 2], [0, 2, 4])
        Ƭ          (include the original, plus) rotate clockwise until results are no longer unique (4 results total)
     ZU$           zip and upend (clockwise rotation)
         ×         vectorized multiply with original (gets the workload distributions to each balloon)
           §§      sum results for each balloon (vectorized-sum rows in the matrix; sum the results)
              ‘    increment

Python 2, 58 57 56 bytes
lambda c,*b:[b[~i]*4-~c+b[i]*2+b[i-2]*2for i in 0,2,4,6]

Try it online!
Input: 9 numbers, representing the board in the following orders:
 6 1 8
 3 0 7
 4 5 2

Output: list of length 4, representing the balloons as follow:
1 0
2 3

Explanation
lambda c,*b: separates the 9 numbers into the center c and a list of length 8 representing the corner and edge values:
5 0 7
2 _ 6
3 4 1

The reason for this is because length 8 works nicely with negative index, as shown as follow:
                Indices    |  Indices mod 8
Edge 1 (i)     0  2  4  6  |  0  2  4  6
Edge 2 (i-2)  -2  0  2  4  |  6  0  2  4
Corner (~i)   -1 -3 -5 -7  |  7  5  3  1

-1 byte thanks to @xnor!

74 :) Really nice!

I would upvote again if I could! Good job on finding a nice index distribution that works well for you! I had golfed my Python answer but now you beat me again by 1 byte!!! :)

Nevermind, I found a 59 byter :)

Nice answer, I actually had almost the same. you can cut the parens around (0,2,4,6) in Python 2.

A clever idea with the ~i. Might it be possible to go further with i,~i,-i?

I'm trying but so far it doesn't seem possible. Let a,b,c,d be the first edges for the balloons, then the second edges must be b, c, d, a or d, a, b, c (aka shift by 1 left or right). Notice that both ~i and -i reverse the ordering of i, so -i and ~i must be the 2 edge sequences. However, the 2 sequences differ by only 1, so they cannot form the same set unless the length of the list is 4.

05AB1E, 26 25 17 14 bytes
2ÝÂ‚Dδδ*€€*OO>

-8 bytes by porting @HyperNeutrino's Jelly answer, so make sure to upvote him!!
-3 bytes thanks to @Grimmy.
I/O are both integer-matrices. The output-matrix is mirrored diagonally (i.e. if the input-matrix would be [[a,b,c],[d,e,f],[g,h,i]] the output-matrix would result in [[I,G],[C,A]]).
Try it online or verify all test cases.
Explanation:
2Ý       # Push list [0,1,2]
  Â      # Bifurcate it (short for Duplicate & Reverse copy)
   ‚     # Pair those two together: [[0,1,2],[2,1,0]]
    D    # Duplicate it
     δ   # Apply double-vectorized:
      δ  #  Inner apply double-vectorized:
       * #   Multiply:
         #    [[[[0,0,0],[0,1,2],[0,2,4]],
         #      [[0,0,0],[2,1,0],[4,2,0]]],
         #     [[[0,2,4],[0,1,2],[0,0,0]],
         #      [[4,2,0],[2,1,0],[0,0,0]]]]
€        # Map over each inner pair of matrices:
 €       #  Map over each matrix in this pair:
  *      #   Multiply each by the (implicit) input-matrix at the same indices
O        # Sum each row of the inner-most matrices
 O       # Sum those row-sums together as well
  >      # And increase each by 1 for the board itself
         # (after which the result is output implicitly)

Døí => Âø for -1 (rotate ccw instead of cw, but that's just as good)

14 with output as a matrix: 2ÝÂ)Dδδ*€€*OO>

R, 76 64 50 bytes
-12 bytes thanks to Giuseppe!
-8 bytes with outer product %*%
-6 bytes by changing the order of the output
scan()%*%matrix(c(y<-2:0%o%c(2:0,0:2),rev(y)),9)+1

Try it online!
Takes input as 9 integers, top to bottom and left to right. Output is in order (NW, SW, NE, SE).
Performs the matrix multiplication of the input vector with the matrix
4   0   0   0
2   0   2   0
0   0   4   0
2   2   0   0
1   1   1   1
0   0   2   2
0   4   0   0
0   2   0   2
0   0   0   4

which is constructed by inputting the values of the first two columns, and then combining with those columns in reverse.

70 bytes

64 bytes by building the weights matrix with a couple of shortcuts. Or 64 bytes building the matrix by base conversion and shifting the outputs around a bit.

@Giuseppe Nice, thanks!

I'm afraid a much more boring approach is possible here: https://codegolf.stackexchange.com/a/200971/66252

@user2390246 Good job! I have managed to reduce substantially the code to represent the matrix in my answer - I'm hopeful I can find a further 3 bytes to equal yours!

Python 3, 86 78 77 bytes
Saved 8 bytes thanks to xnor!!!
Saved a byte thanks to S.S. Anne!!!
lambda b:[[4*b[i][j]+2*b[1][j]+2*b[i][1]-~b[1][1]for j in(0,2)]for i in(0,2)]

Try it online!
Uses a list of lists for both input (\$3\times3\$) and output (\$2\times2\$).

It looks like you can pre-double i and j to 0 and 2.

@xnor Sweet - thanks! :-)

77 bytes

@S.S.Anne Tried a smaller refactoring that didn't save any bytes. Very nice - thanks! :-)

You really don't need those parenthesized expressions but it's better than seeing 2* everywhere. The main thing is in -~b[1][1] instead of 1+(...)+b[1][1].

@S.S.Anne Yes, just caught that too.  The double 2* is irksome but is more readable IMHO.

Python 2, 69 63 59 58 57 bytes
lambda l:[2*(2*l[i]+l[i%2]+l[i/2])-~l[8]for i in 4,5,6,7]

Try it online!
The input is in this order:
4 0 6
2 8 3
5 1 7

and output is
0 2
1 3

-1 thanks to @SurculoseSputum
I kept this solution because I started thinking about shuffling indices with it:
Python 3.8 (pre-release), 82 81 80 bytes
def f(l):*l,d=l;return[(l:=l[2:]+l[:2])and-~d+2*(l[1]+l[7]+2*l[0])for _ in'0'*4]

Try it online!
Thanks HyperNeutrino, SSAnne and Surculose Sputum for -1 each!

you have an extra space between in and '0000'

@HyperNeutrino thanks

81 bytes

easy -1 byte by using '0'*4 instead of 0000

Nevermind! Yours is 58 bytes too!

@SurculoseSputum just edited that in independently :) we are spending the minimum bytes per indexing, I think.

@xnor pointed out that we don't need parens around (4,5,6,7), which saves 1 byte.

JavaScript (ES6),  63  57 bytes
Takes input as a flat array of 9 integers. Outputs a flat array of 4 integers.
a=>[0,2,6,8].map(i=>a[i]*4+2*(a[3+i%6]+a[i>2?7:1])-~a[4])

Try it online!
How?
Below is the matrix of the item indices:
$$\pmatrix{
0&\color{red}1&2\\
\color{blue}3&4&\color{blue}5\\
6&\color{red}7&8}$$
We iterate on the indices of the corners \$i\in\{0,2,6,8\}\$.
The index of the left or right edge (\$\color{blue}3\$ or \$\color{blue}5\$) is given by:
$$H_i=3+(i\bmod6)$$
The index of the top or bottom edge (\$\color{red}1\$ or \$\color{red}7\$) is given by:
$$V_i=\cases{
1&\text{if $i\le2$}\\
7&\text{if $i>2$}
}$$

62 bytes

@Shaggy Thanks, but I was already editing to something shorter.

55 by taking input as a "spiral"

R, 47 bytes
x=scan();4*x[1:4]+2*x[5:8]+2*x[c(6:8,5)]+x[9]+1

Try it online!
Input is a vector in the order
1 6 2
5 9 7
4 8 3

And output
1 2
4 3

Charcoal, 27 bytes
Ｆ⁴«≔Ｅ³Ｅ⮌θ§μκθ⟦Ｉ⊕ΣＥθ×λΣＥκ×νμ

Try it online! Link is to verbose version of code. Outputs the four corners in order top right, top left, bottom left, bottom right as compared to the test case format. Explanation:
Ｆ⁴«

Process each corner in turn.
≔Ｅ³Ｅ⮌θ§μκθ

Rotate the board.
⟦Ｉ⊕ΣＥθ×λΣＥκ×νμ

Multiply each row and column by its coordinate, then sum the results, and increment the final total.

Python 3, 90 86 bytes
lambda a,b,c,d,e,f,g,h,i:(4*a+2*b+2*d-~e,2*b+2*f+4*c-~e,2*d+4*g+2*h-~e,2*f+2*h+4*i-~e)

Try it online!
Thanks @xnor for the -4.

Looks like you can save some bytes writing +2*x+1 as +x-~x

I just noticed there's expressions of +x+1, which could more simply be replaced with -~x

I think you messed something up there with the edit

@xnor fixed, sorry for that

APL (Dyalog Extended), 16 bytes
1+{⍉⊥2↑⍉↑⍵⍮⌽⍵}⍣2

Try it online!
An anonymous function that takes a 3x3 matrix and returns a 2x2 matrix.
How it works
1+{⍉⊥2↑⍉↑⍵⍮⌽⍵}⍣2  ⍝ Input: 3x3 matrix of numbers
  {     ↑⍵⍮⌽⍵}    ⍝ Join the input with its horizontal reverse,
                  ⍝ adding a leading length-2 axis
   ⍉   ⍉          ⍝ For each row (last axis),
     2↑           ⍝ Take the first two numbers x, y and
    ⊥             ⍝ Apply base-2, i.e. evaluate (2×x)+y
                  ⍝ (equivalent to dot product with [2 1 0])
              ⍣2  ⍝ Repeat the above twice
1+                ⍝ Increment element-wise

Excel (as CSV), 92 bytes
,,,=1+A1*4+(B1+A2)*2+B2,=1+C1*4+(B1+C2)*2+B2
,,,=1+A3*4+(B3+A2)*2+B2,=1+C3*4+(B3+C2)*2+B2
,,

To use:
 Input between ,'s, save as CSV, open in Excel.
Eg:
12,9,35,=1+A1*4+(B1+A2)*2+B2,=1+C1*4+(B1+C2)*2+B2
1,32,2,=1+A3*4+(B3+A2)*2+B2,=1+C3*4+(B3+C2)*2+B2
4,6,18

GolfScript, 73 bytes
:a;0{..2/2*:x;2%2*:y;).2%!a...x=y=4*\x=1=2*+\1=y=2*+\1=1=+)`" "+\n*+\}4*;

Just here to submit something. Cool question! stack-based languages are NOT the solution. Fuck this shit, lmfao.
Could probably golf with better modulo shit, but I've stopped caring lol
Try the really "golf-inputted" one, awkward for input
Same program, weird header and footer to format OP's input into the one above, easier to use and test. Plus, look at that identically-formatted output. Gorgeous, ainnit?

Perl 5 -MList::Util=sum -MPOSIX -a, 76 bytes
map$_*=++$i==5||$i%2*2+2,@F;map{say ceil.25+sum@F[$_,$_+1,$_+3,$_+4]}0,1,3,4

Try it online!
Input:
If the grid is denoted as:
a b c
d e f
g h i

Then the input is space separated:
a b c d e f g h i

Output:
Output is line separated:
balloons attached at a
balloons attached at c
balloons attached at g
balloons attached at i

Haskell, 67 66 bytes
f a b c d e f g h i=[2*v+e+1|v<-[2*a+b+d,b+2*c+f,d+2*g+h,f+h+2*i]]

Try it online!
Inspired by my Python answer.

@BjarturThorlacius thanks for your suggested edit with the improvement. However, in this community it is good practice to leave a comment with the suggestion for the golfing you find or, alternatively, leave a TIO link with the shorter code version!

Good to know, I had no idea. Also, I accidentally wiped out the text you had written below your solution on how the solution was inspired by your Python solution.

No problem x2 :) Enjoy this community! Code-golfing can be quite fun!

Jelly, 21 19 bytes
3,1p`ạ€3Rp`¤P€€×³§‘

Try it online!
How?
Notice that we can create the weight matrices for each corner by finding the absolute difference to the opposite corners.
For example, for the first balloon, the weight matrix is
4 2 0
2 1 0
0 0 0

This can be found by, for each coordinate, find the absolute difference to the corner (3, 3), and product. For example, (1, 1) has an absolute difference (2, 2) and product 4.
3,1p`ạ€3Rp`¤P€€×³§‘    Main link
3,1                      Get 3,1 pair
   p`                    cartesian product with itself, gives the 3 corner coordinates
       3Rp`¤             Get all the coordinates
     ạ€                  get the absolute differences for each corner coordinate
            P€€          product each subsublist
               ×³        vectorize multiply with the input
                 §‘      sum each sublist and increment

Jelly, 14 bytes
ŒJḂ§2*ṁ×⁸+Ɲ⁺€‘

A monadic Link accepting a list of lists of integers which yields a list of list of integers:
[[top-left, top-right], [bottom-left, bottom-right]]
Try it online!
How?
ŒJḂ§2*ṁ×⁸+Ɲ⁺€‘ - Link: list of lists of integers, T    e.g. [[ 3, 9, 5],[ 1, 3, 2],[ 4, 6, 1]]
ŒJ             - multidimensional indices (T)               [[1,1],[1,2],[1,3],[2,1],[2,2],[2,3],[3,1],[3,2],[3,3]]
  Ḃ            - least significant bit (vectorises)         [[1,1],[1,0],[1,1],[0,1],[0,0],[0,1],[1,1],[1,0],[1,1]]
   §           - sums                                       [2,1,2,1,0,1,2,1,2]
    2          - literal two                                2
     *         - exponentiate                               [4,2,4,2,1,2,4,2,4]
      ṁ        - mould like (T)                             [[ 4, 2, 4],[ 2, 1, 2],[ 4, 2, 4]]
        ⁸      - chain's left argument, T                   [[ 3, 9, 5],[ 1, 3, 2],[ 4, 6, 1]]
       ×       - multiply (vectorises)                      [[12,18,20],[ 2, 3, 4],[16,12, 4]]
          Ɲ    - for neighbours:
         +     -   add (vectorises)                         [[14,21,24],[18,15, 8]]
            €  - for each:
           ⁺   -   repeat last link                         [[35,45],[33,23]]
               - (...i.e +Ɲ for each)
             ‘ - increment (vectorises)                     [[36,46],[34,24]]

brainfuck, 138 bytes
,[->++++<],[->++>++<<],[->>++++<<],[->++>>++<<<],[->+>+>+>+<<<<],[->>++>>++<<<<],[->>>++++<<<],[->>>++>++<<<<],[->>>>++++<<<<]>+.>+.>+.>+.

Try it online!, just for the byte count.
Try it here, by pasting this input: \12\9\35\1\32\2\4\6\18 and hitting the "view memory" button to compare it with the expected output 101  195  063  121.

No comments?...

Pyth, 24 bytes
mh+eQ+ys<.<ecPQ4d2yy@Qd4

Try it online!
I/O format: List [0, 1, 2, 3, 4, 5, 6, 7, 8] (input) and [0, 1, 2, 3] (output) with positions
Input: 0 5 1     Output: 0 1
 = Q   4 8 6             3 2
       3 7 2

Explanation
m                      4   # map [0, 1, 2, 3] to (current number = d)
 h                         # 1 +
  +eQ                      # Q[-1] + 1 +
      ys                   #   2 * sum of
           ec  4           #     chop       into pieces of length 4, take last element
             PQ            #          Q[:-1]                 -> [4,5,6,7]
         .<     d          #     rotate left by d
        <        2         #     first two elements -> [4,5], [5,6], [6,7] or [7,4]
     +                     # +
                  yy       #   4 *
                    @Qd    #       Q[d]

PHP, 101 bytes
A rather inelegant solution. Just multiples corners by 4, sides by 2 and adds 1 to the center than adds up each corner. Some form of matrix multiplication may be possible with array_map().
parse_str($argv[1]);$e++;echo$a*4+$b*2+$d*2+$e,$c*4+$b*2+$f*2+$e,$g*4+$d*2+$h*2+$e,$i*4+$f*2+$h*2+$e;

Try it online!
It takes input as a string in a html query format e.g. a=9999&b=3&c=9001&d=0&e=9998&f=9999&g=9999&h=999&i=9999
+7 bytes if the output can't be an unseparated list, by making it into an array and using print_r()
PHP, 108 bytes
parse_str($argv[1]);$e++;print_r([$a*4+$b*2+$d*2+$e,$c*4+$b*2+$f*2+$e,$g*4+$d*2+$h*2+$e,$i*4+$f*2+$h*2+$e]);

Try it online!


text:
Progressing Two's
Given an positive integer n (including 0 if you decide to support it), output all numbers in the generated sequence up to the index n. For the current test cases of the current challenge numbers are one-indexed. Feel free to submit 0-indexed answers though.
Base sequence
We start from this sequence (NOT, but quite similar to, A160242):
1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, ...

This sequence should be more understandable after formatting:
1,       2,       1,
1,    2, 2, 2,    1,
1, 2, 2, 2, 2, 2, 1,
and so on ...

However, our point is not to output this sequence. See the below procedure.
Adding the sequence
Here's an example of adding the sequence. Here, our sequence starts with 0:
We collect all intermediate results into the sequence.
  The sequence
    |     Output sequence: [0]
    v
0 + 1 = 1 Output sequence: [0, 1]
1 + 2 = 3 Output sequence: [0, 1, 3]
3 + 1 = 4 Output sequence: [0, 1, 3, 4]
4 + 1 = 5 Output sequence: [0, 1, 3, 4, 5]
...

Our generated sequence is therefore

0, 1, 3, 4, ...

Test cases
Here is a sample program outputting the sequence up to the input.
3 -> [0, 1, 3]
10 -> [0, 1, 3, 4, 5, 7, 9, 11, 12, 13]

Are we allowed to start at 1; i.e. [1, 3, 4, 5, 7, 9, 11, 12, 13, 15] for 10?

Oh right I forgot about that whoops

What's the difference between this and A160242?

@S.S.Anne This one insert two 1's.

Is it just me or the title plus the whole structuring of the question is really misleading and confusing?

The title mentions "adding square differences", so I automatically expect squares (either geometric or the squaring function $x \mapsto x^2$). And you mention "differences" but I can't find anything that vaguely makes me think of "square differences". Then the "1, 2 (xN), 1 repeated arbitrary times" is confusing and doesn't tell me how to generate the base sequence. Then you have the sentence where you explain how to go from the base seq. to the generated sequence. Which also is not clear at all... Then you also have this rule about my sequence not being allowed to start at 1..?

@a'_' thanks for your efforts! I find the challenge much more understandable now!

05AB1E, 9 7 bytes
ÝDtï-ü+

Port of @Bubbler's top APL answer, which uses the same formula as @xnor's Python answer:
$$f(n) = \sum_{k \in \{n,n+1\}}\left({k-\lfloor \sqrt k\rfloor}\right)$$
-2 bytes thanks to @Grimmy.
Try it online.
Explanation:
Ý        # Push a list in the range [0, (implicit) input-integer]
 D       # Duplicate this list
  t      # Take the square-root of each value
   ï     # Cast it to an integer to floor it
    -    # Subtract the values at the same positions from one another
     ü   # For each overlapping pair:
      +  #  Add them together
         # (after which the result is output implicitly)

Implementing the steps described in the challenge description would be 13 bytes instead:
2∞и1δš€û˜.¥I£

Try it online.
Or 2∞и1δš€û could alternatively be ÅÉÅ21δ.ø.
Try it online.
Explanation:
 ∞             # Push an infinite positive list: [1,2,3,...]
2 и            # Repeat 2 that many times as list: [[2],[2,2],[2,2,2],...]
    δ          # For each inner list:
   1 š         #  Prepend a leading 1: [[1,2],[1,2,2],[1,2,2,2],...]
      €        # For each inner list:
       û       #  Palindromize it: [[1,2,1],[1,2,2,2,1],[1,2,2,2,2,2,1],...]
        ˜      # Flatten the list of 1s and 2s: [1,2,1,1,2,2,2,1,1,2,2,2,2,2,1,...]
         .¥    # Undelta it (cumulative sum with 0 automatically prepended):
               #  [0,1,3,4,5,7,9,11,12,13,15,17,19,21,23,24,25,...]
           I£  # Leave the first input amount of items from this infinite list
               # (after which the result is output implicitly)

ÅÉ             # Push a list of odd numbers below or equal to the (implicit) input
               #  i.e. 6 → [1,3,5]
  Å2           # Repeat a list of 2s for each inner value: [[2],[2,2,2],[2,2,2,2,2]]
     δ         # For each inner list:
    1 .ø       #  Surround it with 1s: [[1,2,1],[1,2,2,2,1],[1,2,2,2,2,2,1]]
               # (The rest is the same as above)

Python 2, 52 bytes
n=p=0
exec"n+=1;r=n-n**.5//1;print p+r;p=r;"*input()

Try it online!
54 bytes
lambda N:[n-~n-n**.5//1-(n+1)**.5//1for n in range(N)]

Try it online!
It's a formula!
$$f(n) = 2n+1 - \lfloor \sqrt n\rfloor - \lfloor \sqrt {n+1} \rfloor$$
This can also be split up as
$$f(n) = \sum_{k \in \{n,n+1\}}\left({k-\lfloor \sqrt k\rfloor}\right)$$
Note that \$k-\lfloor \sqrt k\rfloor\$ is the number of non-squares from \$1\$ to \$k\$ inclusive.

APL (Dyalog Extended), 14 12 bytes
0,2+/⍳-⌊∘√∘⍳

Try it online!
Uses xnor's formula of
$$
f(n) = \sum_{k \in \{n,n+1\}}\left({k-\lfloor \sqrt k\rfloor}\right)
$$
How it works
0,2+/⍳-⌊∘√∘⍳
     ⍳-       ⍝ 1..n minus...
       ⌊∘√∘⍳  ⍝ floor(sqrt(1..n))
  2+/         ⍝ Add two consecutive pairs
              ⍝ giving first n items of the sequence except leading 0
0,            ⍝ Prepend the leading 0

APL (Dyalog Extended), 14 bytes
⊢↑2(∧+/,2××/)⍳

Try it online!
Based on the observation that the sequence is the union of all odd numbers and the numbers in the form of \$2n(n+1), n \ge 0\$. Uses ⎕IO←0.
How it works
⊢↑2(∧+/,2××/)⍳  ⍝ Input: positive integer n
             ⍳  ⍝ Generate 0..n-1
  2(      ×/)   ⍝ Pairwise product (0×1, 1×2, ..., (n-2)×(n-1))
        2×      ⍝ Double it
     +/,        ⍝ Concat with pairwise sum (0+1, 1+2, ..., (n-2)+(n-1))
    ∧           ⍝ Ascending sort the 2(n-1) numbers in total
⊢↑              ⍝ Take the first n numbers
                ⍝ For n=1, "overtake" from zero elements, giving single 0

Haskell, 42 bytes
(`take`q 4)
q k=0:[1,3..k]++map(k+)(q$k+4)

Try it online!
Uses a version of Bubbler's observation that the sequence alternates runs of consecutive odd numbers with an even number directly in between.

Haskell, 43 bytes
(`take`scanl(+)0(q[2]))
q r=1:r++1:q(2:2:r)

Try it online!
Generates an infinite list of 1's and 2's, take the cumulative sums, and truncates to the input length.

Jelly, 8 bytes
R_Æ½$+ƝŻ

Try it online!
-5 bytes by porting xnor's formula (thanks Bubbler!)
-1 byte thanks to Nick Kennedy
Explanation
Uses xnor's formula of:
$$f(n) = \sum_{k \in \{n,n+1\}}\left({k-\lfloor \sqrt k\rfloor}\right)$$
R_Æ½$+ƝŻ    Main Link
R           range
 _   $      subtract
  Æ½                 square root floored (of each element)
     +Ɲ     add adjacent pairs together
       Ż    prepend 0

Without xnor's formula, I have 10 bytes
Jelly, 10 bytes
RÆ²Ẹ$Ɲ¬‘ÄŻ

Try it online!
(range; for each pair of adjacent elements, check if either of them is square; logical NOT that and add one (gets the original 1,2 sequence), cumulative sum, prepend 0)

Maybe you could try different approaches like mine or xnor's.

You can save a byte using Æ½ instead of ½Ḟ$.

@NickKennedy Oh whoops, I forgot that existed lol. Thanks!

@HyperNeutrino and a further byte by doing _Æ½)+ƝŻ

Perl 5 -MList::Util=sum -n, 39 bytes
Shoutout to @xnor for the formula.  This is essentially a port of his Python answer.
map{say$a+($n=$_-int$_**.5);$a=$n}1..$_

Try it online!

Bash + GNU utilities, 33 29 bytes
seq -f %0.fddv-r1-dv-+p $1|dc

Try it online!
This is another solution using @xnor's nice formula.

JavaScript (ES7), 40 bytes
This is using the closed-form formula described below.
But because we're asked to output the \$n\$ first terms of the sequence, we need 19 bytes of wrapping code. :'-(
f=n=>n?[...f(n-1),(n-=n**.5)*2|n%1>0]:[]

Try it online!
21 bytes (n-th term, 1-indexed)
n=>(n-=n**.5)*2|n%1>0

Try it online!
Given \$n\ge0\$, we compute:
$$d(n)=2\cdot\lfloor n-\sqrt{n}\rfloor\\
f(n)=\cases{
d(n)&\text{if $n$ is a square}\\
d(n)+1&\text{otherwise}
}$$
The JS implementation uses a bitwise OR which implicitly floors \$n-\sqrt{n}\$ after it has been multiplied by \$2\$. But this leads to the same result.

05AB1E, 9 bytes
ENÅ²_©O=®

Try it online!
E           # loop for N from 1 to input:
 NÅ²        #  is N a square?
    _       #  logical not (0 if N is a square, 1 if not)
     ©      #  save in the register without popping
      O     #  sum all numbers on the stack
       =    #  print without popping
        ®   #  push the content of the register

Python 3, 93 bytes
f=lambda n,x=0:(n-x)*[1]and[sum([j for i in range(1,n,2)for j in[1]+[2]*i+[1]][:x])]+f(n,x+1)

Try it online!
-21 bytes thanks to @Bubbler

Quick and dirty recursive lambda, 93 bytes.

You can't exclude f= part because it's recursive.

Ah. Well. Hmm. I'll edit it back in.

"And then +2 using the new f= trick"

Shhhhh. We don't talk about that here. :P

Python 2, 71 bytes
f=lambda n,k=0,w=3:n*[n]and[0]+[x-~(k>1)for x in f(n-1,~-k%w,w+2*0**k)]

Try it online!

Ruby, 52 50 bytes
->n,*w{n.times{|x|w+=[x,x*x,x*x];p w.sort[x+1]+x}}

Try it online!
How:
The difference between n and f(n) shows an interesting pattern:
n   f   f-n
----------
0   0   0
1   1   0
2   3   1
3   4   1
4   5   1
5   7   2
6   9   3
7   11  4
8   12  4
9   13  4
10  15  5
11  17  6
12  19  7
13  21  8
14  23  9
15  24  9
16  25  9
17  27  10
18  29  11
19  31  12

In the rightmost sequence, every non-square number occurs only once, and every square number appears three times (except 0 which occurs only twice). I can build the required sequence as the sum of n and (f-n).

Charcoal, 17 bytes
ＩＥＥＮ…±⊕ι⊕ιＬ⁻↔ιＸι²

Try it online! Link is to verbose version of code. Based on @xnor's formula. Explanation:
   Ｎ                Input as a number `m`
  Ｅ                 Map over implicit range `0`..`m-1`
       ι ι          Current index `n`
      ⊕ ⊕           Incremented (i.e. `1`..`m`)
     ±              Negated
    …               Exclusive range (i.e. `-n` .. `n-1`)
 Ｅ                  Map over list of ranges
             ι ι    Current range
              Ｘ ²   Squares of values
            ↔       Absolute values
           ⁻        Remove the squares
          Ｌ         Take the length
Ｉ                   Cast to string
                    Implicitly print

C (gcc) -lm, 72 \$\cdots\$ 61 60 bytes
Saved a byte thanks to ceilingcat!!!
s;i;f(n){for(s=i=0;i<n;)printf("%d ",i-~i-s-(s=sqrt(++i)));}

Try it online!
Uses xnor's formula.

Compiler flags are considered a different language now. Therefore, your solution is in the language "C (gcc) -lm".

@S.S.Anne That's great! Makes sense as you can't use sqrt without -lm. Thanks! :-)

@ceilingcat Nice one - thanks! :-)

C (gcc), 81 bytes
r,c,i;f(n){for(r=c=0;~n;c++)for(i=++c;i--+2&&n--;r+=c+~i&&i+2)printf("%d ",r++);}

Some magic hackery used.
-4 bytes thanks to ceilingcat!
Try it online!

Jelly, 7 bytes
Ż_Æ½$+Ɲ

A monadic Link accepting a positive integer, n, which yields a list of the first n entries.
Try it online!
How?
Application of xnor's pair-wise addition formula \$f(n) = \sum_{k \in \{n,n+1\}}\left({k-\lfloor \sqrt k\rfloor}\right)\$
Ż_Æ½$+Ɲ - integer, n                       e.g. 10
Ż       - zero range                            [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    $   - last two links as a monad:
  Æ½    -   integer square-root (vectorises)    [0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3]
 _      -   subtract (vectorises)               [0, 0, 1, 2, 2, 3, 4, 5, 6, 6, 7]
      Ɲ - for neighbours:
     +  -   add                                  [0, 1, 3, 4, 5, 7, 9, 11,12,13]

Husk, 10 bytes
ΘẊ+mṠ-o⌊√ḣ

Try it online!

Japt, 8 bytes
Another port of xnor's formula.
ôÈ-¬fÃä+

Try it
ôÈ-¬fÃä+     :Implicit input of integer
ô            :Range [0,input]
 È-          :Map & subtract
   ¬         :  Square root
    f        :  Floored
     Ã       :End map
      ä+     :Consecutive pairs reduced by addition

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Smaller Strings in Printable ASCII base
Task
Given a input string s which contains only printable ascii characters output all strings which contain only printable ascii characters and are strictly smaller than s in any order
String a is strictly smaller than a string b if either of the following is true:

len(a) < len(b)
len(a) == len(b) and string a is lexicographically smaller than string b

Note: here printable ascii characters refer to the characters which have a ascii value strictly greater than 0x1f and strictly less than 0x7f
Reference Python Implementation
Scoring
This is code-golf so shortest bytes wins
Testcases
'' -> []
'%' -> ['$', '', '#', '"', ' ', '!']
' #' -> ['', ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '  ', ' !', ' "']
'! ' -> ['', ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '  ', ' !', ' "', ' #', ' $', ' %', ' &', " '", ' (', ' )', ' *', ' +', ' ,', ' -', ' .', ' /', ' 0', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6', ' 7', ' 8', ' 9', ' :', ' ;', ' <', ' =', ' >', ' ?', ' @', ' A', ' B', ' C', ' D', ' E', ' F', ' G', ' H', ' I', ' J', ' K', ' L', ' M', ' N', ' O', ' P', ' Q', ' R', ' S', ' T', ' U', ' V', ' W', ' X', ' Y', ' Z', ' [', ' \\', ' ]', ' ^', ' _', ' `', ' a', ' b', ' c', ' d', ' e', ' f', ' g', ' h', ' i', ' j', ' k', ' l', ' m', ' n', ' o', ' p', ' q', ' r', ' s', ' t', ' u', ' v', ' w', ' x', ' y', ' z', ' {', ' |', ' }', ' ~']

Does the output have to be sorted?

@RGS no the output does not need to be sorted

05AB1E, 11 bytes
-1 byte thanks to @KevinCruijssen
gžQ×æêéI¡н

Try it online!
TIO link is for "abcd" instead of printable ascii since powerset of len(input) printable ascii takes a while to compute...

Explanation
gžQ×                 - repeat printable ascii length of the input times
    æ                - get the powerset of this string
     êé              - sort and uniquify lexicographically then sort by length
       I¡            - split on the input
         н           - and take the elements that are before it
                     - output these implicitly

DIk£ can be I¡н to save a byte. And a version that's better for performance and works with the full printable ASCII range would be this 11-byter, although it is missing it's leading empty string unfortunately which would cost 2 bytes to fix.. :/

Haskell, 64 62 bytes
f s|h:t<-mapM(\_->[' '..'~'])<$>scanr(:)""s=id=<<filter(<s)h:t

Try it online!

Previous 64 byte version with explanation:
f s=[x|x<-mapM(\_->[' '..'~'])=<<scanr(:)""s,(0<$x)<(0<$s)||x<s]

Try it online!
Given an input string s, e.g. s="abc", scanr(:)""s yields all suffixes of s: ["abc","bc","c",""]. mapM(\_->[' '..'~']) takes a string and computes all possible combinations of the printable ASCII characters of the same length as this string. We apply this function to all the suffixes and thus get all possible strings of length 3, 2, 1 and zero. x iterates over all those strings and we keep only those that are smaller in length ((0<$x)<(0<$s) using this Tip) or lexicographically smaller (x<s) than the input s.

Jelly,  11  10 bytes
-1 thanks to Nick Kennedy!
LŻØṖṗẎṣ⁸Ṗj

A monadic Link accepting a list of characters which returns a list of lists of characters.
Try it online! (footer prints each on it's own line, since a full program would implicitly smash and print)
How?
LŻØṖṗẎṣ⁸Ṗj - Link: list of characters (i.e. a string), S
L          - length (S)
 Ż         - zero-range -> [0,1,2,...,length(S)]
  ØṖ       - list of printable ASCII characters
    ṗ      - Cartesian power (vectorises) - i.e. all length n strings for n in [0..len(S)]
     Ẏ     - tighten (join all these lists of strings to one list of strings)
       ⁸   - chain's left argument, S
      ṣ    - split (the list of strings) at occurrences of (S)
        Ṗ  - throw away the rightmost list of strings (those lexicographically greater than S)
         j - join (the resulting list of lists of strings) with (S) (to get a list of strings)

I don’t think you need the Ɱ.

Ah yes, ṗ will vectorise here, thanks!

Python 3, 146 139 138 136 bytes
lambda s:[v for n in range(len(s)+1)for v in g(n)if n<len(s)or v<s]
g=lambda n:n and[s+chr(c+32)for c in range(95)for s in g(n-1)]or[""]

Try it online!
How:
The function g recursively generates all strings of length n. Our main function f only has to generate all the shorter strings and then, for the strings with the same length as the input, only keep the ones that have smaller dictionary order.
Thanks to @SurculoseSputum for fixing a mistake and saving 2 bytes at the same time, plus saving 2 bytes on a different golfing effort.

-2 bytes by fixing your off-by-1 error.

@SurculoseSputum what was I thinking..? :o

JavaScript (Node.js), 110 bytes
Prints the strings.
s=>(g=o=>o[k=s.length]||o[g([...o,32]),(n=o.length)<k|(S=Buffer(o)+'')<s&&console_log(S),n-1]++<126&&g(o))([])

Try it online!

Python 3, 142 141 135 129 bytes
lambda s:["%c"*n%p for n in range(len(s)+1)for p in product(*tee(range(32,127),n))if n<len(s)or"%c"*n%p<s]
from itertools import*

Try it online!
Takes input as a string s, and outputs a list of strings.
Explanation
The function generates all printable strings of length at most len(s), then keeps the ones that are smaller than s.
lambda s:[
  "%c"*n%p                    # forms string from p - a tuple of n ints (representing ASCII code points)
  for n in range(len(s)+1)    # for each length n from 0 to len(s), inclusive
  for p in product(*tee(range(32,127),n))
                              # for each possible tuple of n ASCII codepoints
  if n<len(s)or"%c"*n%p<s     # keep only the strings that are smaller than s
]

To generate all printable strings of length r:

tee(range(32,127),n) creates n iterators from 32 to 126 inclusive
product(*tee(...)) finds the Cartesian product of those n iterators
p in product(...): p will be a tuple of n integers, each between 32 and 126 inclusive
"%c"*r%p creates a string of n characters from p.

[Ruby], 111 108 bytes
->s,w=[*32..126]{!s[0]? []:w.product(*([w]*(s.size-1))).map{|a|a.map{|n|n<32 ?"": n.chr}*''}.select{|t|t<s}}

Try it online!
This perplexed me for far too long until I realised that I had the test cases mixed up (D'oh!).
It also creates a Cartesian product of the ASCII characters, and filters those "less than" the input string.
Explanation
w.product(*([w]*(s.size-1))) to get the Cartesian product of the ASCII characters, where w=[*32..126]. Found here
a.map{|n|n<32 ?"": n.chr}*'' to then take those arrays of code points and convert them to characters and join them into strings
.select{|t|t<s}} to filter down to those strings less than the input string.
Edit: Swap out s.empty? for !s[0]. Everything except nil and false are truthy in Ruby, and indexing an array out of bounds returns nil. So if there is a first element, then the array is not empty.

Pyth, 10 bytes
f!-Trd\rk

Try it online!
Contains an unprintable after the \ so here's a hex dump:
00000000: 66 21 2d 54 72 64 5c 7f 72 6b        f!-Trd\.rk

Explanation

rk(Q) Generate a string range from the empty string to the input string. This is a list of all strings strictly smaller than the input, but it also contains characters outside the printable ASCII range.
rd\. Generate a string range from the space character (ascii 32) to the DEL character (ascii 127). This is the range of printable ASCII.
f!-T ... Filter for elements of the first range that contain only elements of the second range.

PHP, 138 bytes
$c=unpack('C*',$argn);for(;$i=count($c);){for(;$i;)if(--$c[$i]<32)$c[$i--]=126;else break;if(!$i)array_pop($c);echo pack('C*',...$c),',';}

Try it online!
The idea is to create an array of ASCII code points and iterate over those.

Charcoal, 21 bytes
ＵＴＥΦＥ⍘⁺!θＳ⍘ιγ⁼§ι⁰!✂ι¹

Try it online! Link is to verbose version of code. I don't know whether I should include the ＵＴ in the byte count but Charcoal's default of padding all lines to the same length does make distinguishing between strings that might end in spaces very tricky. Explanation:
ＵＴ

Turn off padding.
     !              Literal `!`
    ⁺               Concatenated with
      Ｓ             Input string
   ⍘   γ            Base conversion using printable ASCII as base 95
  Ｅ                 Map over implicit range
        ⍘ιγ         Convert current value to base 95 as printable ASCII
 Φ                   Filter where
            §ι⁰      First character
           ⁼   !     Equals literal `!`
Ｅ                   Map over results
                ✂ι¹ Slice off first character
                    Implicitly print

If Charcoal had a bijective base conversion function, this could be written Print(Map(BijectiveBaseString(InputString(), g), BijectiveBaseString(i, g))); probably for 9 bytes, but unfortunately it doesn't, so the easiest way to fake it is to prefix all values with the same ASCII character and filter out entries that don't begin with that character.

JavaScript (Node.js), 90 bytes
s=>(g=(x='',j=32,b=Buffer)=>(s[x.length]?b(95).map(_=>g(x+b([j++]))):x<s)&&console_log(x))

Try it online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
The SBEVE Challenge
She said s(he) be(lie)ve(d), he said sbeve.
Input

A non-empty string, s. It's guaranteed that s will have only printable ASCII characters and at least one word (defined as [A-Za-z0-9]+) in parentheses, and all parentheses will be closed respectively.

Output

A string containing all non-whitespace characters (whitespaces are defined as spaces, tabs, carriage returns, new lines, vertical tabs and form feeds characters) that are not in parentheses.

Test cases
Input -> Output
s(he) be(lie)ve(d) -> sbeve
s(h3) (1s) br(0k)3n -> sbr3n
(I) (K)now (Ill) Be
(My) Best (Self) -> nowBeBest
sho(u)lder (should)er
s(ho)u(ld)er s(h)ould(er) -> sholderersuersould
p(er)f(ection) -> pf
(hello) (world) ->

The last output is an empty string.
This is code-golf so shortest code in bytes wins.

Are all whitespace characters guaranteed to be spaces?

@Jonathan Allan No, it includes all the \s characters as well.

I think all answers so far assumed whitespaces were limited to spaces due to the examples :(

Please specify what characters may be in the non-word portions / what characters may be present in s. Also best to add some test cases with non-space whitespace.

@Jonathan Allan I'm sorry, I tried to demonstrate a new line in examples 3 and 4, but I think it was mistaken for text wrap. I'll make it more explicit, thanks!

Must we handle non-printable characters?

@Jonathan Allan No, it's guaranteed that input will contain only printable characters.

@Expired Data Added, thanks for the advice.

All parentheses will be closed, But will all of them be opened? (:

@Post Rock Garf Hunter Yes, read that as "All opened parentheses will have a respective closed parenthesis".

I think what PRGH is getting at is that that still leaves the possibility of lone close-parentheses e.g. blah (blah) blah) blah - maybe you mean to say "all parentheses will be balanced"?

Is s printable ASCII? (I'd recommend so.) Also, \S is ambiguous between regex flavours I believe.

@Jonathan Allan Oh, I get it now. There is no possibility of lone parentheses, every open parenthesis will have a corresponding closed parenthesis and vice versa. I thought I had made a good first challenge, but with all these flaws, it wasn't that good after all. :(

@JonathanAllan I'll specify that. Consider whitespaces spaces, tabs, carriage returns, new lines, vertical tabs and form feeds characters.

...it's not all that easy. It is a nice challenge though!

Welcome to code golf :) Using the sandbox can help make your challenges go more smoothly. Also, please consider rewriting your test cases to make them more easy to use (this may also have helped with the spaces confusion).

@FryAmTheEggman Thanks, I've rewritten the test cases. I didn't know Sandbox, this is something I'll definitely use in my next challenges, thanks for the indication and I apologize for any inconvenience.

It's guaranteed that s will have only printable ASCII characters. "Printable ASCII" means code points from 32 to 126 (both included), and therefore the only whitespace allowed in the input is the normal space character (so no tabs, newlines etc). Can you confirm, and perhaps edit the challenge text accordingly?

(Please let me know when you clarify that, so I can un-downvote and re-upvote)

May we (assume (no) nested) parentheses?

Jelly, 11 bytes
>Ƈ⁶Ø(yṣ”)m2

A full program printing the result.
Try it online!
How?
Whitespace printable ASCII characters are "\t\r\n\f\v " and non-whitespace printable ASCII are all greater than ' ', so:
>Ƈ⁶Ø(yṣ”)m2 - Link: list of printable ASCII characters, s
 Ƈ          - filter keep those (characters) for which:
> ⁶         -   greater than literal space character
   Ø(       - literal list of characters ['(', ')']
     y      - translate (replace all '(' with ')')
       ”)   - literal ')' character
      ṣ     - split at
         m2 - modulo-two-slice (every other entry)
            - implicit, smashing print

05AB1E, 16 bytes
ηʒ„()S¢Æ_}€θJžKÃ

Try it online!, or Verify all test cases

Explanation
η                         - Prefixes of the string
 ʒ       }                - filter these when...
  „()S¢                   - the counts of ( and ) characters
       Æ_                 - are the same
          €θ              - get the last character from each of these prefixes
            J             - Join all these last characters
             žKÃ          - and remove any that aren't in [a-zA-Z0-9]

Retina, 11 bytes
\(.*?\)|\s

(Note the trailing newline in the code).
Try it online!
How it works
                 Replace either
  .*             a sequence of characters
\(   \)          in parentheses,
    ?            matched non-greedily,
       |         or
        \s       any whitespace character
                 by nothing

Bash + GNU utilities, 36 32 28 bytes
xargs|sed 's/([^)]*)\|\s//g'

Try it online!
Thanks to @user41805 for 4 bytes!

I believe xargs can take the place of tr

@user41805 Thank you -- great trick1

APL+WIN, 25 bytes or 30 bytes
Prompts for string.
((~x∨≠\x←s∊'()')/s←⎕)~' '

Try it online! Courtesy of Dyalog Classic
If I now have to handle none alphanumeric characters this works for 5 extra bytes in APL+WIN but will not work in Dyalog Classic so no TIO
((~x∨≠\x←s∊'()')/s←⎕)~⎕av[⍳33]

Fails the test cases containing newline characters.

@JonathanAllan I have modified my code to handle the newline character but the spec seems to be continually evolving. I think I will bow out rather than trying to keep up!

You can always delete and come back later, but I think most issues have been ironed out. Printable ASCII in s, balanced parentheses, whitespace are ordinals 9, 10, 11, 12, 13, and 32.

Jelly, 12 bytes
e€Ø(œpm2FfØB

Try it online!
A monadic link taking and returning a Jelly string. Now handles other whitespace characters.
Alternative 12 bytes
Ø(yṣ”)m2FfØB

Try it online!

Fails the test cases containing newline characters.

@JonathanAllan to be fair they weren’t there until 9 minutes ago!

They were there from revision 1, just not that obvious.

@JonathanAllan ok, thanks. Fixed.

SNOBOL4 (CSNOBOL4), 119 bytes
 I =INPUT
S I ARB . L '(' ARB ')' REM . I :F(W)
 O =O L :(S)
W O NOTANY(&UCASE &LCASE 84 ** 9) ='' :S(W)
 OUTPUT =O
END

Try it online!

05AB1E, 12 bytes
ŒʒÁ„)(å}KžKÃ

Try it online!
Œ               # substrings
 ʒ     }        # filter, keep each substring if:
  Á             #  after being rotated right
   „)(å         #  it contains ")("
        K       # remove those substrings from the input
         žKÃ    # keep only characters in [a-zA-Z0-9]

Nice didn't realise that K would work like that, I didn't try it because I thought it would remove the text in between brackets too.. but I guess it applies each consecutively?

Yup, K (and similar operators like :, .: and .;) applies substitutions one by one.

Since my 10-byter using the split and uninterleave builtins was quite different from both of your answers, I decided to post it as a separated answer.

05AB1E, 10 11 bytes
„()S¡ιнJʒð›

+1 byte as bug-fix (žu to „() and žKÃ to ʒð›), since apparently all printable ASCII + whitespaces are valid input-characters, instead of only alphanumeric, whitespaces, and parenthesis..
Try it online or verify all test cases.
Explanation:
„()S         # Push string "()", and split it to a list of characters: ["(",")"]
    ¡        # Split the (implicit) input-string by that
     ι       # Uninterleave this list
      н      # Only keep the first inner list
       J     # Join it together to a single string
        ʒ    # Filter the characters in this string by:
         ð›  #  Check if the character is larger than a space " " (by ASCII codepoint)
             # (after which the result is output implicitly)

We're only supposed to remove substrings wrapped in (), aren't we?

@Shaggy And remove all whitespaces. But I think the reason you're asking is due to the ()<>[]{}? The input is guaranteed to only contain alphanumeric characters, whitespaces, and parenthesis. So using the builtin žu is 1 byte shorter than string „()/„)(.

From the spec: "It's guaranteed that s will have only printable ASCII characters". Maybe it changed since you posted this, though?

@Shaggy Hmm, I guess you're indeed right. I do remember the specs changed A LOT with this challenge, but my answer was posted after those changes.. In that case the other two 05AB1E answers are invalid as well, though. Since all three of us use žKÃ.. :/ Ah well, I've fixed my answer.

Stax, 11 bytes
û┼╢╕jN&╪º╛╘

Run and debug it
Unpacked:
"\(.*?\)| "zR

this is just a simple regex replace.  It replaces all strings that match /\(.*?\)| / with z (an empty string)

You can deal with whitespace by splitting on spaces, j at the end. The resulting segments are implicitly concatenated when printed, taking you down to 10 bytes.

Perl 5 + -lF/\(\w+\)|\s+/ -M5.10.0, 5 bytes
say@F

Try it online!

Python 3, 47 45 bytes
Saved 2 bytes thanks to FryAmTheEggman!!!
lambda s:re.sub(r"\(\w+\)|\s","",s)
import re

Try it online!

Japt, 12 bytes
r"%s|%(.*?%)

Try it

Why not r" |%(.*?%)?

@EmbodimentofIgnorance, because that would only remove literal spaces and not newlines, tabs, etc..

Charcoal, 18 bytes
Φθ∧›ι ⁼№…θ⊕κ(№…θκ)

Try it online! Link is to verbose version of code. Explanation:
 θ                  Input string
Φ                   Filtered where
    ι               Current character
   ›                Is not whitespace
  ∧                 Logical And
       №            Count of
            (       Open parentheses
        …θ⊕κ        In input string so far (inclusive)
      ⁼             Equals
             №      Count of
                 )  Close parentheses
              …θκ   In input string so far (exclusive)

sed, 32 31 bytes
:l;s/([^)]*)\|\s//g;N;s/\n//;tl

Try it online!
Shaved off one byte by removing the -E option and just using basic regular expressions, surprisingly :-) .
sed is almost perfect for this challenge.  The only issue is that sed is a stream editor, processing one line at a time: the trailing newline on each line is not processed, which doesn't make it straightforward to delete any newline characters.
So here's how this script does it:
:l
   Label we can jump to later.

s/([^)]*)\|\s//g
   Delete all parenthetical expressions and whitespace before the first newline.

N
   If we're not at the last line, append the next line to the pattern space.  (The next line is appended immediately _after_ the \n at the end of the previous line.  That \n is still there, now in the middle of the pattern space, where it's available for processing by sed.)

s/\n//
    Delete a \n in the middle of the pattern space, if any.  (There will be one if we weren't at the last line in the previous step already.)

tl
    If the last command found a \n to delete, jump back to label l, and do it again!

Hint: there's a flag in GNU sed (since 4.2.2 or something) that slurps all those newline-delimited lines

@user41805 Thanks, I'll check it out. I thought I reviewed all the sed flags, but maybe I was looking at old documentation, or maybe I missed it.

Perl 5 -p0, 15 bytes
s/\s|\(.*?\)//g

Try it online!

C (gcc), 70 bytes
f(char*s){for(;*s;)s=*s-40?isalnum(*s)&&putchar(*s),s+1:strchr(s,41);}

Try it online!

Suggest index() instead of strchr()

Red, 52 bytes
func[s][parse trim/all s[any[to"("remove thru")"]]s]

Try it online!

JavaScript (Node.js), 30 bytes
s=>s.replace(/\(.*?\)|\s/g,"")

Try it online!

APL (Dyalog Extended), 21 19 bytes
∊⊢⊆⍨<>(≠\∨⊢)⍤∊∘'()'

Try it online!
How it works
∊⊢⊆⍨<>(≠\∨⊢)⍤∊∘'()'  ⍝ Input: string s
             ∊∘'()'  ⍝ Boolean vector (1 if a member of '()')
      (≠\  )⍤        ⍝ Scan by boolean XOR
                     ⍝ (gives 1 between '()'s, including '(' but not ')')
         ∨⊢          ⍝ Include back ')'
     >               ⍝ Bitmask indicating negation of the above,
    <                ⍝ plus each char not being whitespace
∊⊢⊆⍨                 ⍝ Filter s by the bitmask above

Boolean filtering uses this APL golfing tip.

Kotlin, 75 bytes
{fold(""){a,v->when(v){')'->a.takeWhile{it!='('}
in " \r\n"->a
else->a+v}}}

Try it online!

Gema, 7 characters
(*)=
 =

Sample run:
bash-5.0$ gema '(*)=; =' <<< 's(he) be(lie)ve(d)'
sbeve

Try it online! / Try all test cases online!

Pip, 14 bytes
aRMw,`\(.+?\)`

Try it online!
Unweave works really well in this solution.
-2 bytes from DLosc, with the first documented use of , for Regex alternation!


text:
Error-correct text
Correct a single-letter typo in a fixed text.
Input: The paragraph below but with exactly one typo, where a single letter a-zA-Z is replaced by a different letter a-zA-Z. To be clear, the letter isn't replaced everywhere it appears, but just in that one place. For example, the first word "In" might become "IZ". Non-letter characters like spaces or punctuation cannot be affected.
Output: The paragraph exactly as below, without the typo. A trailing newline is OK.

In information theory and coding theory with applications in computer
  science and telecommunication, error detection and correction or error
  control are techniques that enable reliable delivery of digital data
  over unreliable communication channels. Many communication channels
  are subject to channel noise, and thus errors may be introduced during
  transmission from the source to a receiver. Error detection techniques
  allow detecting such errors, while error correction enables
  reconstruction of the original data in many cases.

TIO with text
The text is taken from the Wikipedia article Error detection and correction. But, your code may not fetch the text from Wikipedia or elsewhere, as per the standard loophole.
Any site-default string I/O is acceptable. Fewest bytes wins. Please check that your solution works for all 23001 possible inputs, if you're able to run that much.

Python 2, 136 ... 97 96 bytes
def f(s,n=0):k=s[:n>>7]+chr(n%128)+s[n/128+1:];return 0x2e838ca8118c7496+hash(k)and f(s,n+1)or k

Try it online!
Simply replace each character in the given input with each possible letter, then check if the hash matches the correct string.
I use Python 2 hash function, which is deterministic and has no collision within our search space.
This program checks if the function returns correct output for all possible input. It takes ~2 hours to run on my computer
Thanks @Jitse for saving -22 bytes with recursion!

@JonathanAllan yes I have, will post the collision check soon

Snap! Will do, thanks for pointing it out.

If the hash is indeed 64 bits and roughly random, it seems very likely it will give no false matches with two-character changes, but a check would indeed be good.

@JonathanAllan took a long time, but I checked and all inputs return the correct output.

Assuming sufficiently high recursion limit and stack size, you can write it as a recursive function for 98 bytes. Can't show examples in this TiO link, because it will exceed the character limit of this comment.

Very clever use of mod! Saved 1 more byte by rearranging stuff.

MATLAB with Communications Toolbox, 88 64 59 bytes
Z=rsdec(gf([+input('') 879 323],10),532,530);disp([Z.x ''])

This uses a (1023, 1021) Reed-Solomon code shortened to (532, 530). This is a systematic, non-binary code with alphabet size 1023, which can correct any single-symbol error.
The number 1023 has been selected because, in Reed-Solomon codes, both the alphabet size and the maximum input length must be of the form n = 2m−1 for m integer. Since the input text has alphabet size bounded by 95 (number of printable ASCII characters) and length 530, m = 9 (n = 511) would be too small, and m = 10 (n = 1023) is enough.
The error-correcting code has first been applied to the input message to obtain the parity bits. This has been done offline. The submitted program only implements the decoder.
Encoder
Each ASCII character in the input is considered as a symbol from a 1023-size alphabet, and then the code is applied using the gf and rsenc functions.
Note that the code is not part of the submitted solution, and is not golfed.
x = 'In information theory and coding theory with applications in computer science and telecommunication, error detection and correction or error control are techniques that enable reliable delivery of digital data over unreliable communication channels. Many communication channels are subject to channel noise, and thus errors may be introduced during transmission from the source to a receiver. Error detection techniques allow detecting such errors, while error correction enables reconstruction of the original data in many cases.';
x_ext = [zeros(1,491) double(x)]; % convert to code points. Zero-pad to length 1021
y_ext = rsenc(gf(x_ext, 10), 1023, 1021); % encode
y = y_ext(492:end); % remove zero padding
y = double(y.x); % convert to double
check_symbols = y(numel(x)+1:end)

This gives check_symbols = [879 323]. The encoded codeword is the input expressed as code points with these two numbers appended.
Decoder
This is a program that reads the input text as a string from STDIN and displays the corrected text in STDOUT.
Z=rsdec(gf([+input('') 879 323],10),532,530);disp([Z.x ''])

The parity-check symbols are appended to the code points of the input, and the result is provided to the decoder with code parameters 532, 530, which define the shortened code. This causes the decoder to implicitly assume zero-padding. The gf and rsdec functions are used for this. The result Z is converted to char.
Note that + is used instead of double to save bytes; and similarly, [... ''] is used instead of char(...).
Example run

Thank you, I learned something new!

Jelly,  30  25 bytes
JœPjⱮØẠɗ€⁸Ẏ1,ȷ9ḥ⁼“×Ṙ*-’ƲƇ

A full program printing the result (as a monadic Link it yields a list of one list of characters).
Try it online!
How?
Changes each character (including non-A-Za-z ones) to every character in A-Za-z and checks if a hashed value is equal to that of the required input. The hash function was chosen so that none of the \$450 \times 51 + 79 \times 52 = 27058\$ possible states for each \$451 \times 51 = 23001\$  inputs hash to the same value as the expected output*.
The program to check for collisions is here (I split the 2-char check into 5 parts and ran for over 1h to completion).
* smaller hash functions might work for just visited states which could save bytes (although if a collision does exist further on than the correct match then an Ḣ must be appended).

Is the hash enough that any change of two letters produces a different result? I think you need that so that an input with a one-letter change doesn't have a different one-letter change where the resulting two-letter change gives the same hash as the original text.

Good point, quite possibly not. I think checking might take a while ...deleting.

It was not, but now is ...and could probably be smaller.

C (gcc), 260 259 247 226 223 217 215 214 198 189 bytes
y;*R=L"ė|h0\"k5&j4Đzm7ſ4sM6~0=a[z@z4zp4y j,-#3#mu7qĘdd";char n,k,t,u,r,c,x;f(char*s){for(n=y=23;n--;c?u=n:0,r?x=r,t=n:0)for(r=R[n],c=R[n+y],k=y;k--;r^=s[y*n+k])c^=s[y*k+n];s[y*t+u]^=x;}

Try it online!

Now with 9 fewer bytes, thanks to @ceilingcat!

Thanks to @Bubbler for golfing 16 bytes off!
I haven't updated the readable version to include @Bubbler's modifications, but the biggest improvement is in the XOR computation loop.  The shorter approach starts at the desired values R[n] and R[n+23], and repeatedly does an XOR, which will yield 0 at the end (except at the bad character).  My answer had the loop starting at 0, and checking for the values R[n] and R[n+23] at the end.

I've added a readable version of the code, commented and with whitespace, at the end of the answer.

This doesn't use an md5sum or hash function, since that's not available in C without using an external library. Here's how this program works instead:
Imagine the input text, except for the final '.', arranged in a square.  The XOR of each row and the XOR of each column are computed, and they're compared with the correct XOR values from the original text.  One row XOR value and one column XOR value will not be what they should, and that tells you which character to fix, and which bits to flip to make it right.

Here's the more readable version of my last version of the code (before @Bubbler and @ceilingcat's improvements), commented and with whitespace:
f(char*s)
   {
/*****
   The original text contains 530 characters.

   Using the fact that 23 * 23 = 529, view the text as
   arranged in a 23 x 23 square (plus the '.' at the end,
   which doesn't matter since it can't be changed).
*****/

// The string R below is 46 characters long.
// It consists of the XOR of each of the 23 rows in the original text,
// folllowed by the XOR of each of the 23 columns.
    char *R = "\x17|h0\"k5&j4\x10zm7\x7f""4sM6~0=a[z@z4zp4y j,-#3#mu7q\030dd",
         n,k,t,u,r,c,x;

    for (n = 23; n--; )
       {
// Compute the XOR of row n of the input string, and store it in r.
// In the same loop, compute the XOR of column n of the input, and store it in c.
        r = c = 0;

        for (k = 23; k--; )
           {
            r ^= s[23*n+k];
            c ^= s[23*k+n];
           }

// If the computed row value doesn't equal the row value from the original text,
// save the bad row number in t.  Also save (in x) the bits that are wrong.
        if (r-R[n])
          {
           t=n;
           x=r^R[n];
          }

// If the computed column value doesn't equal the column value from the original text,
// save the bad column number in u.  There's no need to save the bits that are wrong,
// since they're guaranteed to be the same as the bits that are wrong for the row.
        u = c-R[n+23] ? n : u; // Golfed equivalent of:
                               // if (c != R[n+23]) u=n;
       }

// Fix the bad character, which is in row t and column u, by flipping the bits in x.
     s[23*t+u]^=x;
    }

198: y=23;f(char*s){char*R="\x17|h0\"k5&j4\x10zm7\x7f""4sM6~0=a[z@z4zp4y j,-#3#mu7q\030dd",n=y,k,t,u,r,c,x;for(;n--;r?x=r,t=n:0){r=R[n];c=R[n+y];for(k=y;k--;r^=s[y*n+k])c^=s[y*k+n];c?u=n:0;}s[y*t+u]^=x;}

@Bubbler  Thank you!  That's clever golfing -- especially starting at R[n] and R[n+23] and aiming at 0, instead of starting at 0 and aiming at R[n] and R[n+23].

@ceilingcat Thank you -- it looks like it's actually 185 bytes now.  I'm kind of surprised that it works with R declared as an int * (implicitly) instead of as a char *.

There is a bug in the way TIO counts bytes in C files. Change the language into "bash" and see how long it is.

Strange. I’ve mostly used TIO for bash.

Ruby, 122 121 119 113 bytes
->s{s[a=(0..9).sum{|x|",JEDI>(:6#"[x].ord==(0..529).sum{|w|s[w].ord*w[x]}%84?0:2**x}]=""<<50998-s.sum+s[a].ord;s}

Try it online!
How:
Compare partial sums applying different masks to the string:
In information theory and coding theory with applicati [...]
X X X X X X X X X X X X X X X X X X X X X X X X X X X  -> "I nomto hoyad [...]"
XX  XX  XX  XX  XX  XX  XX  XX  XX  XX  XX  XX  XX  XX -> "Innfmaonhey d [...]"
XXXX    XXXX    XXXX    XXXX    XXXX    XXXX    XXXX   -> "In imatiheord [...]"

With 10 partial sums (and the total sum of the original string) we have enough information to detect and fix a single error.
Incidentally, the partial sums modulo 84 converted to ASCII form the word "JEDI" and an Australian smiley, which I hope bring some imaginary bonus point.
Why not hash?
From the Ruby documentation:
The hash value for an object may not be identical across invocations or implementations of Ruby. If you need a stable identifier across Ruby invocations and implementations you will need to generate one with a custom method.
I'm lazy. That's why.

Clever. Is there a name for this error-correction technique? It's similar to Hamming codes, but on base-84 digits rather than on bits.

I don't know if it has a name, it's a generalization of parity check / hamming code, base 84 is for the specific case, because the characters we need are all in range 65-122 (so any number > 57 would do) and all partials sums of this string modulo 84 are printable ASCII. Checking single bits would require more code.

JavaScript (Node.js), 78 bytes
This is a port of xnor's great answer.
s=>(t=118,u=10340,g=k=>Buffer(s).map(x=>(u+=t-=k&x-96)-531*t?x:x+t))(g(~0))+''

Try it online!

JavaScript (Node.js),  121 118  116 bytes
s=>[...s+'jEIM'].some(c=>[...s].some(C=>Buffer(o=p+c+s.slice(++i)).map(c=>k=k*99^c,k=p+=C)|k==0x6B9400B8,i=p=''))&&o

Try 10 random test cases online!
How?
Replacement letters
All letters in the original paragraph appear at least twice, except j, E, I and M that appear only once and may disappear in the modified paragraph.
That's why we do:
[...s + 'jEIM'].some(c => ...)

This way, it is guaranteed that each possible replacement letter is tried.
Hash
Using a built-in hash would be rather lengthy in Node:
require('crypto').createHash('md5').update(string).digest('hex')

Instead of that, we use the following custom 32-bit hash:
Buffer(string).map(c => k = k * 99 ^ c, k = 0)

This was (rather painfully) tested against all possible inputs.

Interesting that a 32-bit hash succeeds here. The number of possible two-character changes is 1265169625, which as about 29% of 2^32, so it comes out close. But I guess you have more wiggle room because your hashes actually use more than 32 bits due to truncating before multiplying by 97 rather than after.

@xnor I've now tested the formula k=k*N^c for all $N\in[1..99]$. The only working values are $97$ and $99$. $N=95$ was promising as the decimal representation of the hash value was one byte shorter, but it eventually failed.

I just remembered this question of yours, which makes me wonder if ideas here can improve your answer there.

Since my challenge has a similar premise to yours, I was probably inspired by it without realizing. So thanks for the idea!

Python 3, 83 bytes
def f(s,t=118,u=-10340):
 for x in s:t-=x-96;u-=t
 *l,=s;l[u//t]+=t;return bytes(l)

Try it online!
We compute a custom numerical checksum that let us locate and fix the error. This means don't need to try possible changes until we find one that works. As a result, the code run very fast, letting us test all 23,001 possible inputs in under 2 seconds in the linked TIO.
Input and output are as bytestrings, which requires Python 3.
The checksum
It's a bit easier to understand the idea using the code below.
def f(s):
 t=50998-sum(s)
 k=13447420-sum(i*x for i,x in enumerate(s))
 i=k//t
 l=list(s)
 l[i]+=t
 return bytes(l)

Try it online!
The core is the checksum, which gives two values. The correct string (and only it) gives the values (50998, 13447420), which are used in the code above.
def checksum(s):
 t=sum(s)
 u=sum(i*x for i,x in enumerate(s))
 return(t,u)

Try it online!
The checksum not only lets us know whether the string is correct, but the difference from the checksum to the real string lets us deduce what the error is and fix it. This doesn't rely on the typoes being with letters.
How does it work?
The checksum consists of two parts, each of which is a number.
The part t=sum(s) is simply the sum of the (ASCII) values in the string. Given a string with a single typo from the original, we can figure out the numerical difference between the original and typoed character by comparing the sum to the original's sum of 50998. For example, if we find a sum of 51001, we know that the typo increased a character by 3, such as a->d or M->P.
So, we know the amount that the character is off, but not which one. That is, we don't know the index. For that, we use the additional information given in the second value u of the checksum,
u=sum(i*x for i,x in enumerate(s))

Here, we add up all the characters, but each one is given a multiplier equal to its index, so zero times the initial character plus one times the next one, up to 529 times the last one.
The idea is similar to a classic puzzle:

You have 10 bags of coins. Each bag has 10 gold coins that each weigh 10 grams, except one bag is filled with lighter counterfeits that each weigh 9 grams but otherwise look normal. You have a digital scale that displays exact numerical weight. How can you determine which bag has the counterfeits, using only a single weighing?

The solution is to number the bags 1 to 10, and put 1 coin from bag 1 on the scale, 2 coins from bag 2, up to 10 coins from bag 10. That's 55 coins total, so if all the coins had been real, they'd weigh 550 grams. But, each counterfeit coins lowers the total weight by 1 gram. So, since the fake bag will contribute its index-number of underweight coins, which is however many grams under 550 we see. This tell uses which bag is fake. (We could also have zero-indexed 0-9 and used 45 coins.)
The checksum u works just like this. Suppose that the typo is index j, and it's off by an amount d as determined by the first checksum value t. Then, the index j will contribute to the error in u with a multiplier equal to j, so it will be off by j*d. Knowing both d and j*d lets us find the typoed index j by dividing.
Fixing the error
The error is fixed as *l,=s;l[u//t]+=t;return bytes(l). This converts the string to a list, modifies the indexed value in place with +=, and then converts back a bytestring. This is pretty ugly. Note that strings and bytestring are immutable in Python, unlike lists, so we couldn't just modify the string directly.
I'm still not really clear what default string I/O permits, despite having given it the go-ahead in the challenge. If we can do input and output on lists of ASCII values, then we can save a lot of code, especially by modifying the input list in place.
61 bytes
def f(l,t=118,u=-10340):
 for x in l:t-=x-96;u-=t
 l[u//t]+=t

Try it online!
Optimizations
def f(s,t=118,u=-10340):
 for x in s:t-=x-96;u-=t
 *l,=s;l[u//t]+=t;return bytes(l)

We save some characters in the above code with a few optimizations.
Instead of computing the checksum values (t,u) and subtracting the target values, we get the differences directly by initializing t and u to to their target values and subtracting the contributions for each character iteratively. Passing in the original string would make them end up both as zero, giving a divide-by-zero error in the code.
Instead of using enumerate to compute the weighted sum u, we repeatedly subtract the running sum t, which subtracts each character value successively more times. This effectively computes the weighted sum for the reversed string, that is with the biggest weights at the front. But we end up with a negative index that goes from the back, so it works out.
Finally, we are able to obtain shorter-to-write checksum values (t,u) = (118,-10340) instead of (50998, 13447420) by using a slightly different checksum that first subtracts 96 from each ASCII value. This is the rounded average ASCII value for the text, so subtracting it makes the string values average out to roughly zero. This make the checksums have both positive and negative summands that make them close to zero. These values of (118,-10340) are tantalizingly close to being one digit shorter, and one is negative, but I didn't see a way to shorten them.
I was originally planning to do all checksums computations modulo some prime to make the resulting values shorter to write, but they are short enough anyway that it's not nearly worth it, even without the optimization above.

Perl 5 -MDigest::MD5=md5_base64 -F, 86 bytes
map{//;for$j(a..z,A..Z){$_=$j;(aNCL7lqAQsi7llQYWh7r8A eq md5_base64@F)&&say@F}$_=$'}@F

Try it online!
Brute force method. Runs each character position through all possibilities until it finds that the md5 checksum matches the original message.
Proof that no other single character change matches the checksum.

Did you check that the md5 sum doesn't have any collisions for the inputs in this challenge?

@LuisMendo Yes.

I suggest you include that information in the answer text. Without that it's not guaranteed that it works

As I noted on Jonathan Allan's answer, you'd actually need to check that no two-character change gives the same md5, since you're looking at one-character changes from the input which already has a one-character change. Probabilistically, this is almost certainly true with a 64 bit hash.

C (gcc), 181 163 bytes
n,*R=L"[z@z4zp4y j,-#3#mu7qĘddė|h0\"k5&j4Đzm7ſ4sM6~0=a",u,v,x,y;f(char*s){for(n=529;n--;s[n]^=u&v)for(y=23,u=R[n/y+y],v=R[x=n%y];y--;u^=s[n-x+y])v^=s[23*y+x];}

Try it online!
-13 bytes thanks to @ceilingcat using the L-string trick. -5 bytes by moving the remaining local variables to the global scope; it doesn't matter if they are int or char because the ultimate destination is s[n]^=u&v, i.e. assignment to char.
A small improvement over Mitchell Spector's C answer. Instead of keeping track of which row and column have the typo, this one computes for every char the XOR-sums of its own row and column. If both are nonzero (they are necessarily equal), correct the current cell (which is the only offending cell) right away.
Commented
// declare global(?) variables n,u,v,x,y
// and initialize *R to point to the XOR hash array
n,*R=L"[z@z4zp4y j,-#3#mu7qĘddė|h0\"k5&j4Đzm7ſ4sM6~0=a",u,v,x,y;

// the function: takes char array and modifies it in place
f(char*s){
  // loop over first 529 chars backwards...
  for(n=529;n--;s[n]^=u&v)
    // loop over the chars on the same row/col as n,
    // initialize u=row hash, v=col hash
    for(y=23,u=R[n/y+y],v=R[x=n%y];y--;
      // collect XOR sums of row/col
      u^=s[n-x+y])v^=s[23*y+x];
    // at this point, go back to s[n]^=u&v
    // i.e. fix the typo if both sums are nonzero
}

Nice golfing :)

PHP, 91 bytes
for(;($a=$argn)[$i];$i++){for($j=9;++$j<123;crc32($a)!=3603504069?:die($a))$a[$i]=chr($j);}

Try it online!
Brute force version, actually checking with replacing each letter with all ASCII between codes 10 and 122 (many useless checks, but it saves bytes for example initializing $j to 9 instead of 64, those results can't be positive anyway)
As noted by @LuisMendo and @PeterCordes (thanks), this works because crc32 can reliably detect every burst of up to 32 bit errors, and in the ASCII-encoded input, replacing a character will cause a burst of 14 (7*2) bit errors at most.

@LuisMendo thanks for this precision, adding it to the answer!

Phrasing: CRC32 can detect some longer errors, but I think the key point here is that it can detect every possible burst of up to 32 bit-errors.  Or that it can reliably detect a burst of up to 32 bit errors.  (And that a wrong replacement attempt will have up to 2x 7 = 14 bit errors; that's the harder criterion for false positives.)

APL (Dyalog Unicode), 94 bytes
g←252|1⊥⊢⍪⎕AV⍳⊣
252|⊢+0,⍨∘(,'⊂⍷≠Eæ×(í/7Ãs·¨\=Ð¨⍎ëáØ@'∘g∘.⌊⍨'#⌿O⍒`=~{└⊤Üã/cëÖ¶⌹⌹bð'g⍉)23 23⍴-

Try it online!
Uses the vector of Unicode codepoints as the I/O format. Otherwise it would cost me 11 bytes to convert from/to strings:
APL (Dyalog Unicode), 105 bytes
g←252|1⊥⊢⍪⎕AV⍳⊣
⎕UCS 252|46,⍨∘(,-+'⊂⍷≠Eæ×(í/7Ãs·¨\=Ð¨⍎ëáØ@'∘g∘.⌊⍨'#⌿O⍒`=~{└⊤Üã/cëÖ¶⌹⌹bð'g⍉)23 23⍴-∘⎕UCS

Try it online!
Uses the row/col checksum approach as in Mitchell Spector's C answer. Because bitwise XOR is not a built-in function in APL, I had to use plain sum and negation instead.
How it works
g←252|1⊥⊢⍪⎕AV⍳⊣  ⍝ Auxiliary function: checksums g matrix → checksum vector
          ⎕AV⍳⊣  ⍝ Convert string written in APL SBCS to integer
        ⊢⍪       ⍝ Append the checksum vector at the bottom of the matrix
      1⊥         ⍝ Column-wise sum
  252|           ⍝ Modulo 252

⍝ Main function: Correct the typo based on checksum
252|⊢+0,⍨∘(,'⊂⍷≠Eæ×(í/7Ãs·¨\=Ð¨⍎ëáØ@'∘g∘.⌊⍨'#⌿O⍒`=~{└⊤Üã/cëÖ¶⌹⌹bð'g⍉)23 23⍴-
23 23⍴-  ⍝ Negate each element and reshape into 23x23 matrix, discarding the last '.'
(...)    ⍝ Pass to the inner tacit function...
'...'g⍉    ⍝ Check rows against the row checksums
∘.⌊⍨       ⍝ Outer product by minimum (rows and columns reversed) with...
'...'∘g    ⍝ Check columns against the column checksums
           ⍝ Result = all-zero matrix except at the typo (difference mod 252)
,          ⍝ Flatten the result
0,⍨∘     ⍝ Append a zero to account for the last '.'
252|⊢+   ⍝ Fix the typo using the offset

Java 10, 140 139 137 bytes
s->{var r=s;for(int i=0;;i++)for(var c='z';c>65;c-=c==97?7:1)if((r=s.substring(0,i)+c+s.substring(i+1)).hashCode()==0xA89D0862)return r;}

-2 bytes thanks to @ceilingcat.
Try it online.
Explanation:
Also uses an hash like most other answers. The hash of the expected text is -1466103710. All other possible double replacements of letters cause no collisions, which has been verified locally with this test program. (Obviously times out on TIO since it has to do \$(52\times 530)^2=759\text{,}553\text{,}600\$ iterations, including calculating the hash-code and substituting characters in each iteration. It takes between 8 and 9 minutes locally.)
s->{                    // Method with String as both parameter and return-type
  var r=s;              //  Result-String (starting at the input to save bytes)
  for(int i=0;;i++)     //  Loop `i` upwards from 0 indefintely:
    for(var c='z';c>65; //   Inner loop over the characters `c` in the ASCII range ['z','A']
        c-=c==97?7:1)   //   skipping the characters "`_^]\[" between 'a' and 'Z':
      if((r=s           //    Set `r` to the input-String,
             .substring(0,i)+c+s.substring(i+1))
                        //    with the `i`'th character replaced with `c`
         .hashCode()==0xA89D0862)
                        //    And if its hash-code is -1466103710:
        return r;}      //     Return `r` as result

Regarding the hash collision test, as I commented to Jonathan Allan: "Is the hash enough that any change of two letters produces a different result? I think you need that so that an input with a one-letter change doesn't have a different one-letter change where the resulting two-letter change gives the same hash as the original text."

@xnor I'm not sure I completely understand, since you state only a single letter is replaced in the challenge description? Let's call the expected text $e$ with hash $E$. And let's call a text with any single letter replacement $a_n$ with hash $A_n$. As long as there isn't any single $A_n$ that's equal to $E$, it would mean $E$ is collision-proof for the challenge, isn't it? So even if there happen to be a case of $A_x=A_y$, that is irrelevant as long as $E\neq A_x\land E\neq A_y$. Unless I'm missing something here?..

Maybe I'm not clear on how your code is working. So the input to the function is some single-letter replacement $a_n$ of the original text $e$. As I understand, you iterate and try every single-letter replacement of the input string $a_n$, which produces strings that are two letters off from $e$. Then, if one of these two-letter changes from $e$ has the same hash as $e$, then you'd output it.

@xnor Ah, now I understand what you meant. Hmm, you're completely right. I will delete for now and modify my collision program to verify it's (hopefully) correct.

@xnor Undeleted. Luckily for me, it was indeed valid. I've modified the test script (although it's too slow to run on TIO).

With a 32-bit hash, you had about a 6% chance of bad collision, so you only needed a little luck, and looks like you got it :)

Charcoal, 52 49 bytes
θＪ↨²⮌Ｅ =&%ce9KG*¬⁼§γΣＥΦθ＆μＸ²κ⌕γλι⁰§γ⁻²⁸ΣＥθ∧⁻κⅈ⌕γι

Try it online! Link is to verbose version of code. Works with all printable ASCII, not just letters. I originally wanted to do a Hamming check on all of the letters in the input but I was too ill to implement that at the time and by the time I got better I realised that @GB's modular sums would suit Charcoal better anyway. Explanation:
θ

Print the input string.
Ｅ =&%ce9KG*

Loop over 10 partial sums. These characters are the result of cyclically indexing the appropriate sum from the correct input back into the predefined printable ASCII variable.
ΣＥΦθ＆μＸ²κ⌕γλ

Filter on the desired characters for this sum and take the sum of their indices within the predefined printable ASCII variable.
Ｊ↨²⮌...¬⁼§γ...ι⁰

Interpret those sums that don't match as a number in base 2 LSB first, and jump to that character, which will be the incorrect character.
§γ⁻²⁸ΣＥθ∧⁻κⅈ⌕γι

Subtract the sum of all the other printable character indices from 28 which gives the index (modulo 95) of the current character.
@xnor's algorithm can be implemented in 42 bytes:
θ≔⁻⁵⁰⁹⁹⁸ΣＥθ℅ιηＪ÷⁻¹³⁴⁴⁷⁴²⁰ΣＥθ×℅ικη⁰§γ⁺η⌕γＫＫ

Try it online! Link is to verbose version of code. Works with all printable ASCII, not just letters, but fails if the input is correct (would cost 3 bytes to fix). Explanation:
θ

Print the input string.
≔⁻⁵⁰⁹⁹⁸ΣＥθ℅ιη

Calculate the size of the error.
Ｊ÷⁻¹³⁴⁴⁷⁴²⁰ΣＥθ×℅ικη⁰

Calculate and jump to the position of the error.
§γ⁺η⌕γＫＫ

Correct the character that is in error.

C (gcc), 125 bytes
Note: my code includes 2 unprintable characters \x0c and \0x01 in the string literal which aren't visible in the snippet.
b,i,j,m,n;C(char*T){b=i=n=0;for(;i<10;b|=("N<Syr4Zd"[i]!=m)<<i++)for(m=j=0;T[j];n^=!i*T[j++])m^=(1&j>>i)*T[j];T[b]^=120^n;}

Try it online!
The ith character in the literal is the XOR of all the characters in the original text at positions whose ith bit is 1. The program performs the same XOR on the modified text. The computed value will be different iff the modified character is in a position with ith bit 1. This gives us all the bits of the modified character's position.
Finally, we modify the character such that the XOR of all characters is that of the original text(120).

I was just thinking that the binary number magic trick I remember from when I was a child would make a good approach to this (if you haven't seen it, check out, for example, http://www.norsemathology.org/wiki/index.php?title=Binary_Cards ).  But then I went online and saw that you already did it!  I do like this method.

Python 3, 364 bytes
Output is bz2 encoded. Input is ignored. Code contains unprintable characters, so here is the hex version. Utf-8 encoded version is 55 bytes regular code + 309 bytes compressed data. See commented lines in the header of the TIO link.
import bz2
lambda s:bz2.decompress(b'BZh91AY&SY\xd3\xaa\xfe\xfd\x00\x00(\x15\x80@\x05\x02"?\xf7\xff\xa00\x01F\n\x86\x82bI\xfa\x14\xf4&\x99\r\n\x00\x06\x80\x00\x04\xa6\x84\x9a\x9e\xd455<\xa6\x99\x19\x10o\xcf|b5oN"\x06V\xab\xd0\xa3\x8awA\xbb}\x8a=\xa6\xcc\x9b#\x1a\xcd\x94Q\x83%Lp\xc9-n\x99\xd9\xee\xb5\xbc\xb4xc\x1a\xeaz\x03\xe49*\x90\xc9E\xf8\xa1y\xb7q\xcb!O\xbeA\xf5\rj\xd9Vg2\xec\xe9&A\x08\xb0\x91\x0c\xde\x05_m\xeb.\xa8\x9a~\x0b?\xec\x0e+\x14\xf0q\x05\x19\xa3O\x84\xb0\xbb\xea\xb6\xc3d\xab\xa6\xa3\x1b\x02c\xd3\x8fE\x99F\xf8\xdf\x07\x95\xdam\x10\x1b!\xb0m\xd7m\xb9\xdf\x9d:&\x0e\x13\xa4{S\xa3\x9ao\x95\x98\r\x995#\xdb\xbb\x17\x1d`2\xd0\x1d7$\xb5E\xe1Y9\xf4u\xbd\xcc9\x01va\x0e\x12\x7fA\x06\xa6[\xceg>\x05\xc8T\xaf\x87\x1a\t\x18Hcq\x87\x04\xa2\xa5\xf8\xc2\x0643\xbci\x14\x14\xbe5\xd77\x99w\'\xba&\r\x19b\x1ck\x16\x10&v\xd0\xb9\xe1W\xc3\x82{\xbe\xdb-\x81\xb0\xac\xc8A\xfc]\xc9\x14\xe1BCN\xab\xfb\xf4').decode('ascii')

Try it online!


text:
Japanese Encoding Conversion
Background
In JIS X 0208 a 94 by 94 map (kuten (区点)) is defined to encode Chinese characters (kanji), phonetic moras (kana) and other symbols. Along with this standard there are 3 different encodings that maintain 1-1 correspondences with the map, namely JIS, Shift_JIS and EUC. These encodings take 2 bytes for each character in the kuten map. The mappings are different that random characters may occur (mojibake) if the wrong encoding is used.
Conversion Algorithm
In the formulae below, kuten is an ordered pair of numbers \$(区,点)\$ where \$1\le 区,点\le94\$, and \$(a,b)\$ is an ordered pair of bytes where \$0\le a,b\le 255\$. The conversions between kuten and the 3 encodings are as follows:
$$\text{JIS}: (a,b)=(32+区,32+点)$$
$$\text{Shift_JIS}: (a,b)=\begin{cases}
\left(128+\left\lceil\frac{区}{2}\right\rceil+64\left\lfloor\frac{区}{63}\right\rfloor,63+点+\left\lfloor\frac{点}{64}\right\rfloor\right)&\text{if }区\text{ is odd}\\
\left(128+\left\lceil\frac{区}{2}\right\rceil+64\left\lfloor\frac{区}{63}\right\rfloor,158+点\right)&\text{if }区\text{ is even}
\end{cases}$$
$$\text{EUC}: (a,b)=(160+区,160+点)$$
Challenge
Write a program or function that, given a byte pair, the source encoding and the destination encoding, converts the byte pair from the source encoding to the destination encoding and outputs the result. You may assume that the input byte pair represents a valid codepoint in the source encoding.
The input and output formats are flexible and are accepted if reasonable. For example, you may receive or output the byte pair as a list, as two numbers or as a number, either in decimal or hexadecimal; you may also assign a number to each of the possible encodings and use them as the input format of the encodings.
Sample IO
The format used in the samples is SrcCodePoint, SrcEncoding, DstEncoding -> DstCodePoint. Decimal is used here but hexadecimal is also acceptable. The Unicode character and its assigned kuten are for explanation.
(227, 129), Shift_JIS, EUC -> (229, 225) (Kuten: 69-65; U+7E3A 縺)
(101, 98), JIS, Shift_JIS  -> (227, 130) (Kuten: 69-66; U+7E67 繧)
(229, 227), EUC, JIS       -> (101, 99)  (Kuten: 69-67; U+7E5D 繝)
(137, 126), Shift_JIS, JIS -> (49, 95)   (Kuten: 17-63; U+5186 円)
(177, 224), EUC, Shift_JIS -> (137, 128) (Kuten: 17-64; U+5712 園)
(49, 97), JIS, EUC         -> (177, 225) (Kuten: 17-65; U+5830 堰)

See here (in Japanese) for the full table.
Winning condition
This is a code-golf challenge, so the shortest valid submission for each language wins. Standard loopholes are forbidden by default.

See my answer; since this codepoint stuff is technically specific to Extended Unix Code - Japanese (EUC-JP) instead of the standard EUC, could I possibly require that as an input? :)

@ValueInk Yes you may treat EUC as EUC-JP in this challenge.

Ruby, 140 116 bytes
Takes code point as an array, and encodings are JIS, Shift_JIS, and EUC-JP, respectively.
Ruby supports converting between EUC-JP and SHIFT_JIS, so we math JIS encoding into EUC, perform the appropriate conversion, then math back the JIS encoding if that's the destination encoding.
-34 bytes by getting permission to take EUC input as EUC-JP.
->c,s,d{(c.map!{|e|e+=128};s="EUCJP")if s=~r=/^J/
c.pack('c*').encode(d[r]?"EUCJP":d,s).bytes.map{|e|e-=d[r]?128:0}}

Try it online!
Explanation
->c,s,d{                                            # Function that takes 3 parameters
        (                           )if s=~r=/^J/   # If s is JIS: (starts with J)
                                                    #  (also store this regex for later)
         c.map!{|e|e+=128};                         # Add 128 to each codepoint
                           s="EUCJP"                # Change s to EUC-JP locale
  c.pack('c*')                                      # Pack codepoints into bytestring
    .encode(                                        # Encode the bytestring as follows:
                                                    #  Destination encoding is:
      d[r]?"EUCJP":d,                               #   If d is JIS, use EUC-JP instead
      s                                             #  Source encoding
    )
    .bytes                                          # Convert to bytes
    .map{|e|e-=d[r]?128:0}                          # If d is JIS, subtract 128
}

Pure Math Version, 164 162 bytes
Takes code points separately, and the encodings are integers: 0=JIS, 1=SHIFT_JIS, 2=EUC.
-2 bytes from Jonathan Allen.
->a,b,s,d,e=160{k,t=[[a-32,b-32],[a*2-1+b/158-(2+a/222)*128,b-63-b/128-b/158*94],[a-e,b-e]][s]
[[k+32,t+32],[128+k/2+k%2+k/63*64,158+t+t/64-k%2*95],[k+e,t+e]][d]}

Try it online!

c=160; should save you 2 in the pure maths version.

05AB1E, 37 34 bytes
93ÝãDžy+∞x64&+₃+Ƶ₁L64K30+â)33+Iè`‡

Try it online! or validate all test cases.
First input is [source encoding, destination encoding], with 0 representing JIS, 1 for EUC, and 2 for ShiftJIS.
Second input it [byte pair].

JavaScript (Node.js), 172 bytes
(a,b,x,y)=>eval('for(c=d=t=0;c-a|b-d;[c,d]=x(p,q))y(p=++t>>8,q=t&255)')
S=(k,t)=>[128+k/2+k%2/2+64*(k>62),(k%2?63+(t>63):158)+t]
J=(k,t)=>[32+k,32+t]
E=(k,t)=>[160+k,160+t]

Try it online!
Invoke as f(227, 129, S, E) where S=Shift_JIS, E=EUC, J=JIS.

You should be allowed to take arguments separately. (a,b,x,y)=> for -2 bytes.

Jelly, 62 bytes
Tired & ill so probably very beatable!
⁹:64;95⁸ị+63+
‘&64+HƲḞ+Ø⁷,ç
94,þ`“¡ ɦ‘+€ç/€€€1¦
Ḣị¢⁼€€ŒṪṪ⁸;œị¢

A dyadic Link accepting [SrcEncoding, DstEncoding] on the left and SrcCodePoint on the right which yields DstCodePoint.
Where SrcEncoding and DstEncoding are:
Shift_JIS  1
      JIS  2
      EUC  3

Try it online! Or see the test-suite.

Clojure, 51 50 bytes
#(for[b(.getBytes(String. %2%)%3)](bit-and b 255))

Try it online!
Anonymous function taking three arguments: source encoding, input pair as a Java byte array, and destination encoding.
This relies on JVM's built-in conversion functionality. As other answers are doing, I took the liberty to modify the expected encoding strings to match the format recognized by the JVM:

JIS -> JIS0208 (Simply "JIS" is also listed in Java docs, but somehow doesn't work)
Shift_JIS remains as is
EUC -> EUC-JP

Haskell, 185 179 153 bytes
x?(a,b)=[(a+32,b+32),(128+div a 2+rem a 2+64*div a 63,b+63+[95,div b 64]!!rem a 2),(a+160,b+160)]!!x
(x!y)i=y?head[(a,b)|a<-[1..],b<-[1..255],i==x?(a,b)]

Try it online!
Takes Encodings as 0=JIS, 1=Shift_JIS, 2=EUC. Probably still a lot of room for improvement.