text:
Write a formatted Morse code cheatsheet
Challenge:
Write a program that produces the following output:
. E   .. I   ... S   .... H
                     ...- V
             ..- U   ..-. F
                     ..--
      .- A   .-. R   .-.. L
                     .-.-
             .-- W   .--. P
                     .--- J
- T   -. N   -.. D   -... B
                     -..- X
             -.- K   -.-. C
                     -.-- Y
      -- M   --. G   --.. Z
                     --.- Q
             --- O   ---.
                     ----

This is a formatted table of the Morse codes of the letters from A to Z. Each column is separated by three spaces.
There are four missing slots, which are used by international character sets. Your program must write a space there.
The output must consist of ASCII spaces, dots, dashes, uppercase letters and newlines (either LF or CRLF) only.
Your program accepts no input.
The following is a sample Python program that produces the desired output:
b = "."
out = []
last = 0
ch = "EISHVUF ARL WPJTNDBXKCYMGZQO  "
cx = 0
while b:
    if last >= len(b):
        print("   ".join(out))
        out = ["   ", "    ", "     ", "      "][0:len(b) - 1]
    out.append(b + " " + ch[cx])
    cx += 1
    last = len(b)
    if len(b) < 4:
        b += "."
    elif b[-1] == ".":
        b = b[0:-1] + "-"
    else:
        i = len(b) - 1
        while b[i] == "-":
            i -= 1
            if i < 0:
                break
        if i < 0:
            break
        b = b[0:i] + "-"
print("   ".join(out))

This is code-golf, so the shortest answer in bytes wins.

can each line 3 prepending spaces?

Standard loopholes disallow solution hard coding. How much of the table are we allowed to hard code?

@Brunner considering the table is around 450 bytes, I doubt hard coding is the optimal solution

@Cyoce Definitely not the shortest version here, but Joerg Huelsermann got it down to 208 bytes in his brilliant php answers.

@Brunner I don't think hard coding is an issue with Kolgomorov-Complexity challenges, since it is pretty much in the definition of the challenge. It doesn't take input, so how would you get to the solution, other than by hard coding it (and compressing or building it up in some shape or form)?

@JarkoDubbeldam I'm not opposed to hard-coding, I was just wondering if there was a limit. To answer your question, it doesn't have to be all or nothing.

@Brunner Generally, there are better (shorter) ways to create the output than a simple print statement with the entire output in there. So while there isn't really a limit to the hardcoding, you generally won't win doing it like that.

@JarkoDubbeldam I never said that was the case and I wasn't implying that hard-coding might be an advantage. I do F# answers, I don't expect to win with any of those :) It's like I said earlier, I was just curious if there was an additional constraint or not.

Are we allowed to have trailing spaces?

If there´s a pattern, generating the content is almost always the shortest approach.

@Adám The default for [tag:ascii-art] is that it's just the visual effect of the output that matters, not the actual characters that make it up; thus, differences in invisible characters (like trailing whitespace) don't matter. The OP can override that if they want to, but I don't see why they would here.

Why no CR newlines?

Jelly, 85 bytes
ØQj⁶“_ȦeƤbṅỌU@⁼Cq’œ?;⁶$⁺ṁ®L€€¤
4R2ṗ©ị⁾.-;€€⁶ż"¢;€€⁶$⁺W€€j"731Dẋ@⁶¤ZµKFṚ;⁶ẋ³¤ḣ29ṫ3Ṛµ€Y

A full program printing the cheat sheet.
Try it online!
How?
Note: I do think there may be a way to trim this down by forming a list which formats correctly by use of the grid atom, G, but I can't quite work out how.
ØQj⁶“_ȦeƤbṅỌU@⁼Cq’œ?;⁶$⁺ṁ®L€€¤ - Link 1: get "letters" lists: no arguments
ØQ                             - Qwerty yield = ["QWERTYUIOP","ASDFGHJKL","ZXCVBNM"]
  j⁶                           - join with spaces = "QWERTYUIOP ASDFGHJKL ZXCVBNM"
    “_ȦeƤbṅỌU@⁼Cq’             - base 250 number = 23070726812742121430711954614
                  œ?           - lexicographical permutation at index = "ETIANMSURWDKGOHVF L PJBXCYZQ"
                       ⁺       - do this twice:
                      $        -   last two links as a monad
                    ;⁶         -     concatenate a space              = "ETIANMSURWDKGOHVF L PJBXCYZQ  "
                             ¤ - nilad followed by link(s) as a nilad:
                         ®     -   recall from registry (4R2ṗ from the Main link)
                          L€€  -   length for €ach for €ach = [[1,1],[2,2,2,2],[3,3,3,3,3,3,3,3],[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]]
                        ṁ      - mould like = ["ET","IANM","SURWDKGO","HVF L PJBXCYZQ  "]

4R2ṗ©ị⁾.-;€€⁶ż"¢;€€⁶$⁺W€€j"731Dẋ@⁶¤ZµKFṚ;⁶ẋ³¤ḣ29ṫ3Ṛµ€Y - Main link: no arguments
4R                                                     - range(4) = [1,2,3,4]
  2ṗ                                                   - Cartesian power with 2 = [[[1],[2]],[[1,1],[1,2],[2,1],[2,2]],...,[...,[2,2,2,2]]]
    ©                                                  - copy to register and yield
      ⁾.-                                              - literal ['.','-']
     ị                                                 - index into (makes all the codes, in four lists by length like reading the output top-bottom, left-right)
         ;€€⁶                                          - concatenate a space to each code
               ¢                                       - call last link (1) as a nilad (get the letters reordered as required)
             ż"                                        - zip left and right with zip dyad
                     ⁺                                 - do this twice:
                    $                                  -   last two links as a monad:
                ;€€⁶                                   -     concatenate a space to each code, letter pair
                      W€€                              - wrap each code, letter pair in a list
                                  ¤                    - nilad follwed by link(s) as a nilad:
                           731                         -   literal 731
                              D                        -   to decimal list = [7,3,1]
                               ẋ@⁶                     -   repeat a space = ["       ","   "," "]
                         j"                            - zip with dyad join
                                   Z                   - transpose
                                    µ              µ€  - for each:
                                     K                 -   join with spaces
                                      F                -   flatten
                                       Ṛ               -   reverse
                                            ¤          -   nilad followed by link(s) as a nilad:
                                         ⁶ẋ³           -     space repeated 100 times
                                        ;              -   concatenate
                                             ḣ29       -   head to 29 (make all "lines" the same length)
                                                ṫ3     -   tail from 3 (trim off two spaces from each line)
                                                  Ṛ    -   reverse
                                                     Y - join with newlines
                                                       - implicit print

Python 3.6, 201 197 193 187 bytes
for i in range(16):print('   '.join(i%k and' '*(2+j)or f'{i//k:0{j}b}'.replace(*'0.').replace(*'1-')+' '+'ETIANMSURWDKGOHVF L PJBXCYZQ  '[2**j-2+i//k]for j,k in zip((1,2,3,4),(8,4,2,1))))

Uses some formatting, unpacking and A000918 magic.

By the way, f'{i//k:0{j}b}'.replace(*'0.').replace(*'1-') is the same length as ''.join('.-'[int(x)]for x in f'{i//k:0{j}b}')

Retina, 125 bytes
^
. EISHVUF_ARL_WPJ¶- TNDBXKCYMGZQO__
+m`^((.*?)([-.]+) )(\w)((\w)+?)(((?<-6>)\w)+)$
$2$3 $4   $3. $5¶$.1$*     $3- $7
T`\_`p

Try it online! Should be 121 bytes but I was too lazy to deal with the whitespace at the start and end. Explanation:
[blank line]
. EISHVUF_ARL_WPJ¶- TNDBXKCYMGZQO__

The letters whose code begins with . and - respectively are preloaded. (It is theoretically possible to avoid preloading the .- but it saves bytes this way.) _s are used instead of spaces as they are considered to be letters which makes them easier to match below.
+m`^((.*?)([-.]+) )(\w)((\w)+?)(((?<-6>)\w)+)$
$2$3 $4   $3. $5¶$.1$*     $3- $7

Here we split each line up into five pieces:

The letters for prefixes, if any
The current Morse code
The current letter
The first half of the remaining letters (their next character is .)
The second half of the remaining letters (their next character is -)

The pieces are then reassembled onto two lines:

The letters for prefixes, the current Morse code, the current letter, the Morse code with a . suffix, the first half of the remaining letters
Spaces replacing the first three pieces, the Morse code with a - suffix, the second half of the remaining letters

The new lines follow the same format as the existing line, just with an extra Morse prefix and half as many letters remaining to process. This is then repeated until each line has only one letter.
_
  [single space]

The _s are then changed back into spaces.

JavaScript (ES6), 154 147 145 bytes

f=(n=r='',d=i=k=0)=>(r+=n&&' '.repeat([d++&&3,21,13,6][i-(i=d-k)])+n+' '+'EISHVUF ARL WPJTNDBXKCYMGZQO  '[k++],d<4)?f(n+'.',d)&&f(n+'-',d):r+=`
`

o.innerHTML = f()
<pre id=o>

Oh dang! I missed this one... wouldn't have bothered otherwise!  Well done  :-)

PHP, 208 Bytes
<?=gzinflate(base64_decode("dZDJEQMhDAT/RNEJaHLwfd+38w/EWrRlu6gVnwZpGhWIGSCxqhCXoFgWhpa3jHtpasYtKOaZZwZ9z/OjCnEOim3imX7et2Y8guKYeR5aF+PqB4/tK8Q0KMbDnnWPeZamZmyCYpJ5Pu/V93y7qxCLoHgnXnf5qZnn/iGo9u1/Gf+XDw=="));

Try it online!
PHP, 229 Bytes
<?=strtr("3E0.3I053S0.53H12 2.54V1254U05-3F12 25-4 1.4A0.-3R0.-.3L12 2.-.4 12.-4W0.63P12 2.64J
4T0-3N0-.3D0-53B12 2-54X12-.4K0-.-3C12 2-.-4Y1-4M063G06.3Z12 26.4Q1264O0-63 12 2-64 ",[$a="   ","
$a$a","$a $a",". ","- ","..","--"]);

Try it online!

Perl 5, 158 156 bytes
map{$a=sprintf'%04b',$_;map{$a=~/.{$_}/;print(-$'?' 'x$_:$&=~y/01/.-/r,' ',(' EISHVUF ARL WPJTNDBXKCYMGZQO  '=~/./g)[!-$'&&++$i],$_-4?'   ':"\n")}1..4}0..15

PHP, 184 183 181 bytes
for(;$y<16;$y++,print str_pad(ltrim("$r
"),28," ",0))for($r="",$c="03231323"[$y&7];$c++<4;)$r.=strtr(sprintf("   %0${c}b ",$y>>4-$c),10,"-.")."EISHVUF ARL WPJTNDBXKCYMGZQO  "[$i++];

Run with -nr or try it online.
breakdown
for(;$y<16;$y++,                                    # loop through rows
    print str_pad(ltrim("$r\n"),28," ",0)               # 4. pad to 28 chars and print
    )
    for($r="",                                          # 1. result=empty
        $c="03231323"[$y&7];                            # 2. $c=bits in 1st code -1
        $c++<4;)                                        # 3. loop through columns
        $r.=strtr(sprintf("   %0${c}b ",$y>>4-$c),10,"-.")  # append morse code
            ."EISHVUF ARL WPJTNDBXKCYMGZQO  "[$i++];            # append letter

-7 bytes with leading spaces:
Replace ltrim("$r\n") with "$r\n" and 28 with 31.
171 (= -10) bytes with trailing spaces:
for(;$y<16;$y++)for(print str_pad("
",[0,7,14,22][$c="03231323"[$y&7]]);$c++<4;)echo strtr(sprintf("%0${c}b %s   ",$y>>4-$c,"EISHVUF ARL WPJTNDBXKCYMGZQO"[$i++]),10,"-.");

breakdown try it online
for(;$y<16;$y++)                                    # loop through rows
    for(
        print str_pad("\n",[0,7,14,22][             # 2. print left padding
            $c="03231323"[$y&7]                     # 1. $c=bits in 1st code -1
        ]);
        $c++<4;)                                        # 3. loop through columns
        echo                                                # print ...
            strtr(sprintf("%0${c}b %s   ",                  # 3. delimiting spaces
            $y>>4-$c,                                       # 1. morse code
            "EISHVUF ARL WPJTNDBXKCYMGZQO"[$i++]            # 2. letter
        ),10,"-.");

No true line break this time?

for(;$y<16;$y++,print str_pad(ltrim("$r\n"),28," ",0))for($r="",$c="03231323"[$y&7];$c++<4;)$r.=strtr(sprintf("   %0${c}b ",$y>>4-$c),10,"-.")."EISHVUF ARL WPJTNDBXKCYMGZQO  "[$i++]; should save 2 bytes.

It seems you droped a space too much: In the last line ---- doesn't match with the rest. "EISHVUF ARL WPJTNDBXKCYMGZQO " should have 2 spaces in the end.

APL (Dyalog), 92 bytes
Needs ⎕IO←0 which is default on many systems.
0 3↓¯1⌽⍕{' ',(16⍴1↑⍨16÷≢⍵)⍀'.-'[⍉2⊥⍣¯1⍳≢⍵],' ',⍪⍵}¨'ET' 'IANM' 'SURWDKGO' 'HVF L PJBXCYZQ  '

Try it online!
{…}¨'…' apply the following anonymous function to each of the strings:
 ⍪⍵ make the argument into a column
 ' ', prepend a space (on each row)
 '.-'[…], prepend the string after it has been indexed with:
  ≢⍵ the length of the argument
  ⍳ the indices of that (0, 1, 2, …, length-1)
  2⊥⍣¯1 anti-base-2 (uses as many bits as needed)
  ⍉ transpose (from one representation in each column to one in each row)
 (…)⍀ expand by (insert blank rows as indicated by zeros in):
  ≢⍵ the length of the argument
  16÷ divide sixteen by that
  1↑⍨ (over)take from one (makes a list of a one followed by 1-n zeros)
  16⍴ recycle that pattern until it has sixteen elements
 ' ', prepend a space
⍕ format (the list of tables into a single table, padding each with a space on each side)
¯1⌽ rotate one step right (thus moving the trailing space to the front)
0 3↓ drop zero rows and three columns (thus removing the three leading spaces)

Hey, where does 16÷⍨ appear in your code‽

@ZacharyT It sure doesn't. Nicely spotted, sir.

Ruby, 144 143 141 bytes
k=0
16.times{|i|4.times{|j|$><<("%0#{j+1}b 9   "%(i>>3-j)).tr('109',(i+8&-i-8)>>3-j>0?'-.'+'  OQZGMYCKXBDNTJPW LRA FUVHSIE'[k-=1]:" ")}
puts}

Ungolfed
k=0                                                     #setup a counter for the letters
16.times{|i|                                            #16 rows
  4.times{|j|                                           #4 columns
    $><<("%0#{j+1}b 9   "%(i>>3-j)).                    #send to stdout a binary number of j+1 digits, representing i>>3-j, followed by a 9, substituted as follows.
      tr('109',(i+8&-i-8)>>3-j>0?                       #(i&-i) clears all but the least significant 1's bit of i. the 8's ensure a positive result even if i=0.
      '-.'+'  OQZGMYCKXBDNTJPW LRA FUVHSIE'[k-=1]:      #if the expression righshifted appropriately is positive, substitute 1and0 for -and. Substitute 9 for a letter and update counter.
      " ")}                                             #else substiture 1,0 and 9 for spaces.
puts}                                                   #carriage return after each row.

JavaScript (205 bytes)
for(A='EISHVUF ARL WPJTNDBXKCYMGZQO     ',q=0,i=15;30>i++;){for(x=i.toString(2).replace(/(.)/g,a=>1>a?'.':'-'),o='',j=4;j--;)o+=(i%2**j?A.slice(-6+j):x.slice(1,5-j)+' '+A.charAt(q++))+'   ';console.log(o)}

for(A='EISHVUF ARL WPJTNDBXKCYMGZQO     ',q=0,i=15;30>i++;){for(x=i.toString(2).replace(/(.)/g,a=>1>a?'.':'-'),o='',j=4;j--;)o+=(i%2**j?A.slice(-6+j):x.slice(1,5-j)+' '+A.charAt(q++))+'   ';console.log(o)}

C, 199 195 bytes
#define P putchar
m;p(i,v){printf("%*s",i&1|!v?v*(v+11)/2:3,"");for(m=1<<v;m;m/=2)P(45+!(i&m));P(32);P("  ETIANMSURWDKGOHVF L PJBXCYZQ  "[i]);v<3?p(2*i,v+1):P(10);++i&1&&p(i,v);}main(){p(2,0);}

Live on coliru (with #include  to avoid the warning message.)
UPDATE: Saved four characters by moving the "declaration" of m outside the function, as suggested by @zacharyT
Uses what seems to be a standard strategy: keep the letters in an array-encoded binary tree, so the children of element i are 2*i and 2*i+1. This tree is rooted at 2 rather than 1 because the arithmetic worked out a little shorter, I think. All the rest is golfing.
Ungolfed:
// Golfed version omits the include
#include <stdio.h>
// Golfed version uses the string rather than a variable.
char* tree = "  ETIANMSURWDKGOHVF L PJBXCYZQ  ";
/* i is the index into tree; v is the number of bits to print (-1) */
void p(int i, int v) {
  /* Golfed version omits all types, so the return type is int.
   * Nothing is returned, but on most architectures that still works although
   * it's UB.
   */
  printf("%*s", i&1 || !v ? v*(v+11)/2 : 3, "");
  /* v*(v+11)/2 is v*(v+1)/2 + 3*v, which is the number of spaces before the odd
   * element at level v. For even elements, we just print the three spaces which
   * separate adjacent elements. (If v is zero, we're at the margin so we
   * suppress the three spaces; with v == 0, the indent will be 0, too.
   *
   * Golfed version uses | instead of || since it makes no semantic difference.
   */

  /* Iterate over the useful bits at this level */
  for (int m=1<<v; m; m/=2) {
    /* Ascii '-' is 45 and '.' is 46, so we invert the tested bit to create the
     * correct ascii code.
     */
    putchar('-' + !(i&m));
  }
  /* Output the character */
  putchar(' ');
  putchar(tree[i]);
  /* Either recurse to finish the line or print a newline */
  if (v<3)
    p(2*i,v+1);
  else
    putchar('\n');
  /* For nodes which have a sibling, recurse to print the sibling */
  if (!(i&1))
    p(i+1, v);
}

int main(void) {
  p(2,0);
}

Could you move the int m to be m; outside of the function?

Does this work https://repl.it/Iqma?

@ZacharyT: I suppose it will work but it's one character longer (the open parenthesis in the #define) so there seems little point.

I counted 194 bytes with that version, am  I missing something?

Bubblegum, 133 bytes
000000: e0 01 be 00   7d 5d 00 17   08 05 23 e4   96 22 00 5d │ à.¾.}]....#ä.".]
000010: e5 e9 94 d3   78 24 16 ec   c1 c4 ad d8   6e 4d 41 e8 │ åé.Óx$.ìÁÄ.ØnMAè
000020: a3 a1 82 e6   f4 88 d9 85   6f ae 6b 93   aa 44 c8 e3 │ £¡.æô.Ù.o®k.ªDÈã
000030: 29 6f df 65   aa 4a f8 06   f5 63 1a 73   a7 e4 4d 19 │ )oßeªJø.õc.s§äM.
000040: 03 2c 87 59   7b df 27 41   4b b6 12 dd   7c e5 78 27 │ .,.Y{ß'AK¶.Ý|åx'
000050: 9c 9f 99 db   f6 8e 42 fd   43 68 48 46   37 da d7 21 │ ...Ûö.BýChHF7Ú×!
000060: a9 ca ea be   f4 57 e0 da   c1 16 97 ef   7a 0c e9 3c │ ©Êê¾ôWàÚÁ..ïz.é<
000070: 8e c2 b6 22   ca e4 e5 53   57 f0 f4 fb   a4 fb c0 a7 │ .Â¶"ÊäåSWðôû¤ûÀ§
000080: ec cd 6e 00   00                                      │ ìÍn..

Compressed as a LZMA stream.

SOGL, 106 105 102 bytes
¹θΞk“r²{r³³a:IA2─l4;- 0*;+Ζ0.ŗΖ1-ŗø4∫BƧ| ⁵±+⁷b<?⁄@*}+;j;@3*+}±kkk≥x}¹±č┐"7ŗ◄∑f^│N≥Χ±⅜g,ιƨΛ.⌡׀¹*ΛβΧκ‘čŗ

If prepending spaces are allowed, 102 99 bytes
¹θΞk“r²{r³³a:IA2─l4;- 0*;+Ζ0.ŗΖ1-ŗø4∫BƧ| ⁵±+⁷b<?⁄@*}+;j;@3*+}±≥x}¹±č┐"7ŗ◄∑f^│N≥Χ±⅜g,ιƨΛ.⌡׀¹*ΛβΧκ‘čŗ

141 bytes, compression
Πa≤χ≥∫RωθΩ≡⅛QΨ═Λ9⁶Ul¹&╔²‘č"‼¼⁸Ƨ,9█ω½└╗«ωΤC¡ιΝ/RL⌡⁄1↑οπ∞b∑#⁵ø⁶‘č"⁵ ?∙«Σf⁾ƨ╤P1φ‛╤Β«╚Δ≡ΟNa1\÷╬5ŗķ§⁷D◄tFhžZ@š⁾¡M<╔↓u┌⁽7¡?v¦#DΘø⌡ ⁹x≡ō¦;⁵W-S¬⁴‘' n

just wanted to see how well could SOGL do with just compression (well it's got more than just compression, but it's 97% compressed strings)

Pyth, 106 bytes
DhNR.n.e+]++.[\.sllN::.Bk\0\.\1\-\ b*]*\ +2sllNt/16lNNjmj*3\ d.t[h"ET"h"IANM"h"SURWDKGO"h"HVF L PJBXCYZQ

Test it online!
Explanation
In a few words, what I do here is to generate the table column by column and then transpose the table before printing it. We notice that in a column, the morse codes for the letters can be represented as binary strings (replace . by 0 and - by 1) when counting from zero to the index of the last letter in the column.
The algorithm relies on a function from which I give an example run below (for the second column):
1. Takes "IANM" as input
2. Generates the binary representations of zero up to len("IANM"): ["0", "1", "10", "11"]
3. Replace with dots and hyphens: [".", "-", "-.", "--"]
4. Pad with dots up to floor(log2(len("IANM"))): ["..", ".-", "-.", "--"]
5. Add the corresponding letters: [".. I", ".- A", "-. N", "-- M"]
6. After each element, insert a list of 16 / len("IANM") - 1 (= 3) strings containing only spaces of length floor(log2(len("IANM"))) + 2 (= 4):
    [".. I", ["    ", "    ", "    "], ".- A", ["    ", "    ", "    "], "-. N", ["    ", "    ", "    "], "-- M", ["    ", "    ", "    "]]
7. Flatten that list:
    [".. I", "    ", "    ", "    ", ".- A", "    ", "    ", "    ", "-. N", "    ", "    ", "    ", "-- M", "    ", "    ", "    "]
8. That's it, we have our second column!

Code explanation
I cut the code in two. The first part is the function described above, the second part is how I use the function:
DhNR.n.e+]++.[\.sllN::.Bk\0\.\1\-\ b*]*\ +2sllNt/16lNN

DhNR                                                      # Define a function h taking N returning the rest of the code. N will be a string
      .e                                             N    # For each character b in N, let k be its index
                      .Bk                                 # Convert k to binary
                     :   \0\.                             # Replace zeros with dots (0 -> .)
                    :        \1\-                         # Replace ones with hyphens (1 -> -)
            .[\.sllN                                      # Pad to the left with dots up to floor(log2(len(N))) which is the num of bits required to represent len(N) in binary
          ++                     \ b                      # Append a space and b
         ]                                                # Make a list containing only this string. At this point we have something like [". E"] or [".. I"] or ...
        +                           *]*\ +2sllNt/16lN     # (1) Append as many strings of spaces as there are newlines separating each element vertically in the table
    .n                                                    # At this point the for each is ended. Flatten the resulting list and return it

(1): In the morse table, in the first column, there is seven lines after each line containing a letter ("E" and "T"). In the second column, it is three lines. Then one (third column), then zero (last column). That is 16 / n - 1 where n is the number of letters in the column (which is N in the code above). That what does the code at line
(1):
*]*\ +2sllNt/16lN

       sllN          # Computes the num of bits required to represent len(N) in binary
     +2              # To that, add two. We now have the length of a element of the current column
  *\                 # Make a string of spaces of that length (note the trailing space)
           t/16lN    # Computes 16 / len(N) - 1
*]                   # Make a list of that length with the string of spaces (something like ["    ", "    ", ...])

Alright, now we have a nice helpful function h which basically generates a table's column out of a sequence of characters. Let's use it (note the two trailing spaces in the code below):
jmj*3\ d.t[h"ET"h"IANM"h"SURWDKGO"h"HVF L PJBXCYZQ

           h"ET"                                        # Generate the first column
                h"IANM"                                 # Generate the second column
                       h"SURWDKGO"                      # Generate the third column
                                  h"HVF L PJBXCYZQ      # Generate the last column (note the two trailing spaces)
          [                                             # Make a list out of those columns
        .t                                              # Transpose, because we can print line by line, but not column by column
 mj*3\ d                                                # For each line, join the elements in that line on "   " (that is, concatenate the elements of the lines but insert "   " between each one)
j                                                       # Join all lines on newline

The code can still be shortened; maybe I'll come back on it later.

C, 291 bytes
Try Online
char*i,*t=".aEc..aIc...aSc....aH/u...-aV/m..-aUc..-.aF/u..--/f.-aAc.-.aRc.-..aL/u.-.-/m.--aWc.--.aP/u.---aJ/-aTc-.aNc-..aDc-...aB/u-..-aX/m-.-aKc-.-.aC/u-.--aY/f--aMc--.aGc--..aZ/u--.-aQ/m---aOc---./u----";
s(n){while(n--)putchar(32);}f(){for(i=t;*i;i++)*i<97?putchar(*i-'/'?*i:10):s(*i-96);}

How it works
First I parsed the string in C, counting spaces which are less than 26 so I encoded them in small case letters a, b, .. z with this little program
for(char*i=t; *i; i++)
{
    if(*i == ' ') c++;
    else c = 0;

    if(i[1] != ' ' && c > 0) putchar('a'+c-1);
    else if(*i =='\n') putchar('/');
    else if(*i != ' ') putchar(*i);
}

Then I wrote a parser for that encoding, where / is a new line, and a small-case letter represent t[i] - 'a' spaces
int s(int n)
{
    while(n--) putchar(32);
}

f()
{
    for(char*i=t; *i; i++)
        if(*i < 'a')
            if(*i == '/') putchar('\n');
            else putchar(*i);
        else s(*i-'a'+1);
}

263 bytes

Bash (with utilities), 254 bytes
tail -n+2 $0|uudecode|bzip2 -d;exit
begin 644 -
M0EIH.3%!6293631+'LX``&UV`%`P(`!``S____`@`(@:2!H#:@!ZFU'H@T](
MJ>H`'J``;4L>\%)R2H9TS-4WY[M(`"`@=((AJ")8HR^QFK?8RQO2B+W47&@`
M!"@$(!%Q,$'X:#+&>BI<RAC5.J53,S(%FFB!%A-*SM9TY&I8RFZJ9<D0H_B[
)DBG"A(&B6/9P
`
end

JavaScript (ES7), 242 240 238 bytes
console.log([...'EISH000V00UF000 0ARL000 00WP000JTNDB000X00KC000Y0MGZ000Q00O 000 '].map((a,k)=>(n=>(a!='0'?(2**n+(k>>2)/2**(4-n)).toString(2).slice(-n).replace(/./g,c=>'.-'[c])+' '+a:'      '.slice(-n-2))+(n<4?'   ':'\n'))(k%4+1)).join``)

Try it online!
–2 bytes thanks to Zachary.

Try changing a!='0' to a!=0

Can you replace .join('') with .join<insert backtick here><insert backtick here> ? (<insert backtick here> being replaced with actual backticks)

As Cyoce said, try changing a!='0' toa!=0, that should work.

@ZacharyT No it doesn’t, but thanks again.

Sorry, forgot about the ''case.

Dyalog APL, 159 bytes (non-competing)
↑{X←⍵-1⋄Y←2*⍳4⋄R←Y+(Y÷16)×⍵-1⋄3↓∊{C←R[⍵]⋄'   ',(⍵⍴(1+0=1|C)⊃'    '({⍵⊃'.-'}¨1+(4⍴2)⊤X)),' ',((1+0=1|C)⊃' '((C-1|C)⊃' ETIANMSURWDKGOHVF L PJBXCYZQ  '))}¨⍳4}¨⍳16

Why is this non-competing?

I think you can save a lot by setting ⎕IO←0 (default on many systems) and using ⍨ (commute).

Excel, 208 bytes
=LET(x,ROW(1:16)-1,d,{1,2,3,4},y,4-d,z,2^y,m,IF(MOD(x,z)=0,SUBSTITUTE(SUBSTITUTE(DEC2BIN(x/z,d),"0","."),"1","-")&" "&MID(" ETIANMSURWDKGOHVF L PJBXCYZQ",2^d+x/z,1),""),CONCAT(m&IF(y,REPT(" ",9-LEN(m)),"
")))

Explanation
=LET(x,ROW(1:16)-1,                                    'x = {0..15} 0-indexed row
d,{1,2,3,4},                                           'd = {1..4} 1-indexed column length of code
y,4-d,                                                 'y = {3..0}
z,2^y,                                                 'z = {8,4,2,1}
m,IF(MOD(x,z)=0,                                       'm = if x%z = 0 then
                      DEC2BIN(x/z,y)                   '   binary representation of x/z length y
SUBSTITUTE(SUBSTITUTE(              ,"0","."),"1","-") '   change "0" to "." and "1" to "-"
&" "&MID(" ETIANMSURWDKGOHVF L PJBXCYZQ",2^d+x/z,1),   '   & " " & corresponding letter
""),                                                   '   else ""
CONCAT(m&IF(y,REPT(" ",9-LEN(m)),"                     'concatenate the elements of m and pad w/ spaces and line feeds
")))

Deadfish~, 1329 bytes
{iiii}iiiiiic{d}ddddc{iiii}dddc{dddd}iiiccc{i}iiiicc{d}ddddc{iiii}ic{dddd}dccc{i}iiiiccc{d}ddddc{iiiii}ic{ddddd}dccc{i}iiiicccc{d}ddddc{iiii}c{dddddd}ddc{ii}ii{cc}c{i}iiiicccdc{d}dddc{iiiii}iiiic{{d}iii}ddddddc{ii}ii{c}ccc{i}iiiiccdc{d}dddc{iiiii}iiic{ddddd}dddccc{i}iiiiccdcic{d}ddddc{iiii}ddc{dddddd}c{ii}ii{cc}c{i}iiiiccdcc{d}dddcc{dd}ddc{ii}iicccccc{i}iiiicdc{d}dddc{iii}iiic{ddd}dddccc{i}iiiicdcic{d}ddddc{iiiii}c{ddddd}ccc{i}iiiicdcicc{d}ddddc{iiii}iiiic{dddddd}ddddddc{ii}ii{cc}c{i}iiiicdcicdc{d}dddcc{dd}ddc{ii}ii{c}ccc{i}iiiicdcc{d}dddc{iiiii}iiiiic{ddddd}dddddccc{i}iiiicdccic{d}ddddc{iiiii}ddc{{d}iii}c{ii}ii{cc}c{i}iiiicdccc{d}dddc{iiii}iic{dddddd}ddddc{iii}iiiiic{d}dddc{iiiii}iic{ddddd}ddccc{i}iiicic{d}ddddc{iiii}iiiiiic{dddd}ddddddccc{i}iiicicc{d}ddddc{iii}iiiiiic{ddd}ddddddccc{i}iiiciccc{d}ddddc{iii}iiiic{ddddd}ddddddc{ii}ii{cc}c{i}iiiciccdc{d}dddc{iiiii}iiiiiic{{d}ii}iic{ii}ii{c}ccc{i}iiicicdc{d}dddc{iiii}iiic{dddd}dddccc{i}iiicicdcic{d}ddddc{iii}iiiiic{dddddd}iiic{ii}ii{cc}c{i}iiicicdcc{d}dddc{iiiiii}dddc{{d}ii}ic{ii}iicccccc{i}iiicc{d}dddc{iiii}iiiiic{dddd}dddddccc{i}iiiccic{d}ddddc{iiii}dc{dddd}iccc{i}iiiccicc{d}ddddc{iiiiii}ddc{{d}ii}c{ii}ii{cc}c{i}iiiccicdc{d}dddc{iiiii}dc{{d}iii}dc{ii}ii{c}ccc{i}iiiccc{d}dddc{iiiii}dddc{ddddd}iiiccc{i}iiicccic{d}ddddcc{dd}ddc{ii}ii{cc}c{i}iiicccc{d}dddcc{dd}ddc

Try it online!


text:
Wardialing in the Modern World
Introduction
Wardialing was a very interesting way to try to hack people back in the '80s and '90s. When everyone used dial-up, people would dial huge amounts of numbers to search for BBS's, computers, or fax machines. If it was answered by a human or answering machine, it hung up and forgot the number. If it was answered by a modem or a fax machine, it would make note of the number.
"Of course, you realize this means War...dialing?" <--- Pun made by @Shaggy
Challenge
Your job is to make a URL wardialer. Something that tests and checks if it's a valid website from one letter of the alphabet.
Constraints

Program must take user input. This input has to be a letter of the alphabet, no numbers. Just one letter of the alphabet and form multiple URLs that start with the letter. Input letter will be lowercase, not uppercase.
Standard loopholes apply.
You must make 8 URLs from 1 letter, and test to see if it is a valid site.
If you hit an error (not a response code), instead of leaving it blank, go ahead and return a 404
If you hit a redirect (3xx), return a 200 instead.
You may output the results in any reasonable format, as long as it includes the website name, status codes for all the websites and the redirects.
This is code-golf, so shortest amount of bytes wins.

What counts as a URL for this challenge?
http://{domain-name}.{com or net or org}
For this challenge, the domain name should only be 4 letters long, no more, no less.
What should I test?
For each 4 letter domain name, test it against three top-level domains (.com, .net, .org). Record all the response codes from each URL, remember from the constraints that any (3xx) should return 200 and be recorded as a redirect in the output and any error getting to the website should result in a 404.
Input

a

Output
+---------+------+------+------+------------+
| Website | .com | .net | .org | Redirects? |
+---------+------+------+------+------------+
| ajoe    | 200  | 200  | 200  | .com, .net |
+---------+------+------+------+------------+
| aqiz    | 200  | 404  | 404  | no         |
+---------+------+------+------+------------+
| amnx    | 200  | 503  | 404  | .com       |
+---------+------+------+------+------------+
| abcd    | 200  | 404  | 200  | .com       |
+---------+------+------+------+------------+
| ajmx    | 200  | 503  | 404  | no         |
+---------+------+------+------+------------+
| aole    | 200  | 200  | 200  | .com       |
+---------+------+------+------+------------+
| apop    | 404  | 200  | 200  | .net       |
+---------+------+------+------+------------+
| akkk    | 200  | 200  | 200  | .com       |
+---------+------+------+------+------------+

As a more modern human, what exactly was the point of wardialing? What did you use the numbers for?

@BetaDecay Typically, they were used to find computers, BBS's, or pretty much anything that could be connected to a computer modem. Once a number was found that could, the user could try to guess the user account to gain access to the system over dialup.

Are you sure it's only in the 80s or 90s? 'Cause I often get calls that hang up after one second...

If you've seen the movie WarGames, I believe the protagonist does some of this.

That's where the name wardialing came from, I assume @StephenS and well, it never really stopped but was more prominent in the 80s and 90s. Not a lot of people use dialup any more.

Can the url contain numbers?

@ovs Yes it can contain numbers.

How should we choose the 8 url's

At complete and utter randomness, the letter has to be at the beginning of each domain name

I've heard the only winning move is not to play.

Apparently everyone thinks so too @Bumpy

Oh?  This one looked interesting.  If I get a few moments when the boss isn't looking over my shoulder I'll  give it a bash ;-)  JS is my weapon of choice, and Justin's 249 is a tantalising target, though I'm sure I'll find he's removed every unnecessary byte. ;-)

Bash, 90 bytes
for i in $1{100..104}.{com,net,org};{ echo $i;(curl -IL $i 2>:||echo HTTP 404)| grep HTTP;}

Sample output:
b100.com
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b100.net
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b100.org
HTTP 404
b101.com
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b101.net
HTTP/1.1 406 Not Acceptable
b101.org
HTTP/1.1 406 Not Acceptable
b102.com
HTTP/1.1 200 OK
b102.net
HTTP 404
b102.org
HTTP 404
b103.com
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b103.net
HTTP 404
b103.org
HTTP 404
b104.com
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b104.net
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
b104.org
HTTP 404

working on changes, need to transform 3XX in 200 and avoid user agent problems

Ruby, 145 + 10 = 155 bytes
+ 10 bytes for command line arguments.
Probably not winning any beauty contests with this:
x=[*$<.getc+?a*3..?z*4]
24.times{|i|r=Net::HTTP.get_response(URI(p"http://#{x[i/3]}."+'comnetorg'[i*3%9,3])).code rescue"404"
p r=~/^3/?"200R":r}

Run with ruby -rnet/http wardialing.rb
Example:
$ ruby -rnet/http wardialing.rb <<< g
"http://gaaa.com"
"200R"
"http://gaaa.net"
"200"
"http://gaaa.org"
"200"
"http://gaab.com"
"200"
"http://gaab.net"
"200"
"http://gaab.org"
"200"
"http://gaac.com"
"404"

(etc)

Python 2 + requests, 198 191 bytes
from requests import*
def f(c):
 for i in range(24):
	u='http://'+c+`i/3`*3+'.'+'cnooermtg'[i%3::3]
	try:a=get(u,allow_redirects=0).status_code
	except:a=404
	if a/100==3:a='200 R'
	print u,a

Sample output for a:
http://a000.com 404
http://a000.net 404
http://a000.org 404
http://a111.com 200
...
http://a666.org 502
http://a777.com 403
http://a777.net 200 R
http://a777.org 200

I think the question was to produce all four-glyph names, not just the 1000 or so that start with a and end in a digit.  The example output contains a test against ajoe.com which your code cannot check.

@Draco18s You must make 8 URLs from 1 letter, and test to see if it is a valid site. does not sound like we should generate all url's.

Ah, yes, I missed that. Carry on.

NodeJS, 249 246 bytes
-3 bytes thanks to @ASCII-only.
c=>{r=_=>Math.random().toString(36).slice(-3),o="",q=i=>(u=`http://${n=i%3?n:c+r()}.`+["com","net","org"][i%3],o+=u+" ",d=r=>(o+=(/^3/.test(s=r.statusCode||404)?"200R":s)+`
`,--i?q(i):console.log(o)),require("http").get(u,d).on("error",d)),q(24)}

Creates random three-letter strings from 1-9 and a-z for each domain. Redirects are shown as 200R.
Try it online
(Note: may take a minute or two to complete all requests)
Sample output
http://a9k9.com 200
http://a9k9.net 404
http://a9k9.org 404
http://a529.com 200
http://a529.net 404
http://a529.org 404
http://asor.com 200R
http://asor.net 404
http://asor.org 404

Longer version with table output, 278 bytes
c=>{r=_=>Math.random().toString(36).slice(-3),o=h=`name .com    .net    .org
`,q=i=>(i%3||(n=c+r(),o+=n+`    `),u=`http://${n}.`+h.substr(6+i%3*5,3),d=r=>(o+=(/^3/.test(s=r.statusCode||404)?"200R":s)+(++i%3?` `:`
`),i<24?q(i):console.log(o)),require("http").get(u,d).on("error",d)),q(0)}

Whitespace in name .com    .net    .org and n+`    ` are literal tab characters.
Sample table output
name    .com    .net    .org
aa4i    200     200     200
a66r    404     404     404
anmi    200     200     403
aaor    403     200R    200R

I followed the link to 'Try it online' but only got "undefined" as output.

@Octopus It takes a minute or two to complete all of the requests, and for some reason the online interpreter outputs "undefined" right at the start. Running locally from command line does not output that, though. I'll add that as a note to the post.

246: c=>{r=_=>Math.random().toString(36).slice(-3),o="",q=i=>(u=\http://${n=i%3?n:c+r()}.`+['com','org','net'][i%3],o+=u+" ",d=r=>(o+=(/^3/.test(s=r.statusCode||404)?"200R":s)+`
`,--i?q(i):console.log(o)),require("http").get(u,d).on("error",d)),q(24)}`

@ASCII-only thanks, updated.

PHP, 221 bytes
for($c=8;$c--;){$u=$argv[1];for($i=3;$i--;)$u.=chr(rand(97,122));for($z=0;$z<3;){$r="$u.".['com','net','org'][$z++];$h=get_headers("http://$r");$s=$h?substr($h[0],9,3):404;$t=(3==intval($s/100))?"200R":$s;echo"$r $t\n";}}

With CRs and indentation
for($c=8;$c--;){
    $u=$argv[1];
    for($i=3;$i--;)$u.=chr(rand(97,122));
    for($z=0;$z<3;){
        $r="$u.".['com','net','org'][$z++];
        $h=get_headers("http://$r");
        $s=$h?substr($h[0],9,3):404;
        $t=(3==intval($s/100))?"200R":$s;
        echo"$r $t\n";
    }
}

Sample output on 'b':
bnjz.com 404
bnjz.net 200
bnjz.org 404
bkxw.com 200
bkxw.net 200
bkxw.org 403
biak.com 200
biak.net 403
biak.org 200R
bpzb.com 200
bpzb.net 200
bpzb.org 404
bigr.com 404
bigr.net 200
bigr.org 200
bcei.com 404
bcei.net 200R
bcei.org 200
bexc.com 200
bexc.net 200
bexc.org 404
bset.com 404
bset.net 200
bset.org 200

q/kdb+, 392 378 300 276 bytes
Solution:
t:{
  w:y,($:)x;
  r:@[{"J"$-3#12#(`$":http://",x)y}[w;];"GET / HTTP/1.1\r\nHost:",w,4#"\r\n";404];
  (x,`w`r)!(r;`$y;$[(r>299)&r<400;[r:200;x];`])
  }
f:{
  R:(`w,x,`r)xcols(,/)each(x)t\:/:{x,/:3 cut 24?.Q.a}y;
  (`Website,x,`$"Redirects?")xcol update r:`No from R where r=`
  }[`.com`.org`.net;]

Example:
q)f"a"
Website .com .org .net Redirects?
---------------------------------
amik    200  200  200  .net
abjl    200  200  503  No
afuw    403  200  200  No
agby    200  200  200  No
afen    200  200  200  .net
ajch    200  404  200  No
aaro    200  200  200  No
ajsr    200  404  503  No

Notes:
Current solution is fairly hefty... Half the code is trying to fetch a URL, the other half is presenting the results nicely, unsure how much further I can golf this.
Explanation:
Function t
w:y,($:)x       // convert suffix (`.com) to string, prepend host and save in w
@[x;y;404]      // try function x with parameter y, on error return 404
"GET /..."      // HTTP GET request in shortest form
`:http://x y    // open web connection to x, send request y
-3#12#          // truncate output to 12 chars, take last 3 chars
"J"$            // cast result to long
$[x;y;z]        // if x then y, else z
(x)!(y)         // create a dictionary with x as keys, y as values

Function f
24?.Q.a         // take 24 random characters from a-z
x,/:3 cut       // cut into 3-character lists, prepend input 'x'
t\:/:           // call function t with each combination of left and right
(,/) each       // raze (reduce) each result
xcols           // re-order columns into output format
xcol            // rename columns

source: Stack Exchange

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

sort: votes


text:
When's the nearest special common year?
A common year is a year that is not a leap year and where the first and last day of the year are on the same day. A special common year is one that starts on a Monday and so ends on a Monday as well.
Your challenge is to create a program/function that when given a year as input finds the nearest special common year, outputting itself if it is a common year. If the year is as close to the one before it as the one next to it output the larger one.
Input
An integer representing the year to test against in the range 1600 <= x <= 2100.
Output
An integer representing the nearest special common year.
Test cases
2017 -> 2018
2018 -> 2018
1992 -> 1990
1600 -> 1601
2100 -> 2103
1728 -> 1731 (lies between 1725 and 1731)

Notes
All 54 years in the given range are already shown in the linked Wikipedia article. I will also provide them here for reference:
1601, 1607, 1618, 1629, 1635, 1646, 1657, 1663, 1674, 1685, 1691
1703, 1714, 1725, 1731, 1742, 1753, 1759, 1770, 1781, 1787, 1798
1810, 1821, 1827, 1838, 1849, 1855, 1866, 1877, 1883, 1894, 1900
1906, 1917, 1923, 1934, 1945, 1951, 1962, 1973, 1979, 1990
2001, 2007, 2018, 2029, 2035, 2046, 2057, 2063, 2074, 2085, 2091
2103 (Needed for 2097 to 2100)

just for reference to help people out, the sequence appears to go 6, 11, 11. IE 6 years after the first is another, 11 years after that is another, 11 years after that is another, 6 years after that is another, etc.

@Mayube Not quite. The actual sequence is "6, 11, 11, 6, 11, 11, 6, 11, 11, 6, 12, 11, 11, 6, 11, 11, 6, 11, 11, 6, 11, 12, 11, 6, 11, 11, 6, 11, 11, 6, 11, 6, 6, 11, 6, 11, 11, 6, 11, 11, 6, 11, 11, 6, 11, 11, 6, 11, 11, 6, 11, 11, 6" (note the 12s and the 6, 11, 6, 6, 11, 6)

@MartinEnder Ah yeah my bad, it seems that when the century changes, it's a 12, not an 11

Since the calendar repeats every 400 years, the relevant (periodic) part of the sequence is "6, 11, 11, 6, 11, 11, 6, 11, 11, 6, 12, 11, 11, 6, 11, 11, 6, 11, 11, 6, 11, 12, 11, 6, 11, 11, 6, 11, 11, 6, 11, 6, 6, 11, 6, 11, 11, 6, 11, 11, 6, 11, 11". I'll be impressed if anyone can save bytes with this, due to the three irregularities.

Congrats on 2k for me! :P

a year that is not a leap year and where the first and last day of the year are on the same day The second part of that definition is redundant.  All  non-leap years start and end on the same day, being exactly 52 weeks and one day (365 days) long.

@JohnGordon Of course they do, doesn't mean everyone knows. Saying it explicitly also helps set the scene for the question.

Jelly, 30 bytes
“Þıİs|9ṗ[¿¶F’ṃ“©€¿‘⁽£d;+\ạÐṂ⁸Ṁ

A monadic link taking and returning an integer year.
Try it online! or see a test suite.
How?
Much like other answers this builds the list of years required for the input domain from the increments, and finds the maximal year of minimal absolute difference from the input.
“Þıİs|9ṗ[¿¶F’ṃ“©€¿‘⁽£d;+\ạÐṂ⁸Ṁ - Main link: number y
                   ⁽£d         - augmented base 250 literal = 1601
“Þıİs|9ṗ[¿¶F’                  - base 250 literal = 20129386383114231907032071
              “©€¿‘            - code page index list = [6,12,11]
             ṃ                 - base decompression = [6,11,11,6,11,11,6,11,11,6,12,11,11,6,11,11,6,11,11,6,11,12,11,6,11,11,6,11,11,6,11,6,6,11,6,11,11,6,11,11,6,11,11,6,11,11,6,11,11,6,11,11,6,12]
                      ;        - concatenate = [1601,6,11,11,6,11,11,6,11,11,6,12,11,11,6,11,11,6,11,11,6,11,12,11,6,11,11,6,11,11,6,11,6,6,11,6,11,11,6,11,11,6,11,11,6,11,11,6,11,11,6,11,11,6,12]
                       +\      - reduce with addition = [1601,1607,1618,1629,1635,1646,1657,1663,1674,1685,1691,1703,1714,1725,1731,1742,1753,1759,1770,1781,1787,1798,1810,1821,1827,1838,1849,1855,1866,1877,1883,1894,1900,1906,1917,1923,1934,1945,1951,1962,1973,1979,1990,2001,2007,2018,2029,2035,2046,2057,2063,2074,2085,2091,2103]
                            ⁸  - link's left argument, y
                          ÐṂ   - filter keep if maximal:
                         ạ     -   absolute difference
                             Ṁ - maximum (alternatively tail, Ṫ, since increasing)

PHP, 67 Bytes
for(;date(LN,mktime(0,0,0,1,1,$y=$argn+$i))>1;)$i=($i<1)-$i;echo$y;

Try it online!
or

for(;date(LN,strtotime("1/1/".$y=$argn+$i))>1;)$i=($i<1)-$i;echo$y;

Try it online!
Expanded
for(;
date(LN,mktime(0,0,0,1,1,$y=$argn+$i)) # N is 1 for Monday and L is 0 for Non leap year
>1;) # loop so long as expression is not 1
  $i=($i<1)-$i; # set $i 0,1,-1,2,-2 ...
echo$y; # Output Year

date

Save a byte: $i=($i<1)-$i;

Python 2, 129 124 118 bytes
a=[11,11,6]*13
a[29:29]=a[19:19]=12,
a[10:10]=6,6
n=input()
o=[2401-n]
for i in a*2:o+=o[-1]-i,
print n+min(o,key=abs)

Try it online! or Try all test cases
First, the sequence is generated (reversed) on a, then 2401 - input_year is used as starting value to be subtracted over the sequence.
This way the list o will contain the differences between all the common years and the input, the nearest year will be the number that is nearest to zero (positive or negative), then will be extracted with (min, key=abs) and added back to the input.
With datetime, 119 bytes
lambda i:i+min([y-i for y in range(2200,1500,-1)if datetime(y,1,1).weekday()<1and y%400],key=abs)
from datetime import*

Try it online!

Does this generate the list of years based off of the sequence?

@TheLethalCoder kinda, added a little explanation

05AB1E, 41 bytes
6xD<Š)•HΘ%A°,SΔA)u•3вè.pO0¸ì1601+DI-ÄWQÏ¤

Try it online!
Explanation
6xD<Š)                                     # push the list [11,6,12]
      •HΘ%A°,SΔA)u•                        # push the number 20129386383114231907032071
                   3в                      # convert to a base-3 digit list
                     è                     # use this to index into the first list
                      .p                   # get list of prefixes
                        O                  # sum each sublist
                         0¸ì               # prepend 0
                            1601+          # add 1601 to each
                                 D         # duplicate
                                  I-       # subtract input from each
                                    Ä      # calculate absolute value
                                     WQÏ   # keep only the years that have the
                                           # smallest absolute difference from input
                                        ¤  # get the last one

JavaScript (ES6), 77 bytes

f=(y,z=y,d=m=>new Date(y,m,!m||31).getDay()-1)=>d(0)|d(11)?f(z<y?z-1:z+1,y):y
<input type=number value=2001 oninput=o.textContent=f(+this.value)><pre id=o>2001

Mathematica, 70 bytes
Max@Nearest[Select[Range[7!],!LeapYearQ@{#}&&DayName@{#}==Monday&],#]&

Generates a list of all special common years up to year 5040 (= 7!) and then finds the nearest one to the input, taking the maximum in case of a tie.

This was the sort of answer I was expecting, generate the list and compare to that. It would be interesting to see if anyone can use the "sequence" to find an answer.

Whaaaa... PHP beats Mathematica?

I was playing around with your code and came up with this: (n=1;t=#;While[!DayName@{t}==Monday||LeapYearQ@{t},n++;t=#-(-1)^n*Floor[n/2]];t)&   can you golf this by replacing while with //.t/; etc? I tried but I can't...

Java 7, 217 bytes
import java.util.*;int c(int y){return d(y,1);}int d(int y,int x){Calendar c=Calendar.getInstance(),d=Calendar.getInstance();c.set(y,0,1);d.set(y,11,31);return c.get(7)==d.get(7)&c.get(7)==2?y:d(y+x,x>0?-++x:-(--x));}

Explanation:
Try it here.
import java.util.*;                   // Required import for Calendar

int c(int y){                         // Method with integer parameter and integer return-type
  return d(y,1);                      //  Call second method with additional parameter
}                                     // End of method (1)

int d(int y,int x){                   // Method (2) with two integer parameters and integer return-type
  Calendar c=Calendar.getInstance(),  //  Create two Calendar instances
           d=Calendar.getInstance();
  c.set(y,0,1);                       //  Set one to 01 January yyyy
  d.set(y,11,31);                     //  and one to 31 December yyyy
  return c.get(7)==d.get(7)           //  If both are the same day of the week
         &c.get(7)==2?                //  and it is a Monday:
          y                           //   Return the input-year
         :                            //  Else:
          d(y+x,                      //   Recursive-call with year + `x`
                x>0?-++x:-(--x));     //   and change `x` to the next to check
                                      //   +1,-2,+3,-4,+5,-6,etc.
}                                     // End of method (2)

if x is always going to be 1, why not just remove int c(){} and change int d(int y, int x){} to d(int y){int x = 1;...}

@BrianH. Because I do a recursive-call which uses x, so if I reset it to 1 every time at the top of the method, x is incorrect and the recursive-call would fail.

MATL, 32 31 bytes
`G@2&\wEq*-XJtQv24KUhBh9XO77-}J

Try it online! Or verify all test cases

Ruby, 145 bytes
f=->i{i+(1.upto(i).map{|m|Time.new(y=i+m).monday?&&Time.new(y,6).friday?? m:Time.new(y=i-m).monday?&&Time.new(y,6).friday?? -m :nil}.find{|a|a})}

Defines a lambda taking the start year as input - f[2017] => 2018
Gotta love the Ruby standard library! wday==1 is the same length as monday? and infinitely less cool :). The special common year check is done by the fact that in a common year starting Monday, 1st June is a Friday ("friday" being the equal-shortest day name!)
Unfortunately, it's not so good at searching in both directions.

C#, 183 bytes
To get the ball rolling a bit, here's an implementation I've done of my own. I'm pretty sure it can still be golfed down so if anyone wants to feel free to post as a new answer.
namespace System.Linq{n=>Enumerable.Range(1,9999).Where(y=>!DateTime.IsLeapYear(y)&(int)new DateTime(y,1,1).DayOfWeek==1).GroupBy(y=>Math.Abs(n-y)).OrderBy(g=>g.Key).First().Last();}

Try it online!
Full/Formatted version, this also shows all outputs for the given range when ran.
namespace System.Linq
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<int, int> f = n =>
                Enumerable.Range(1, 9999)
                          .Where(y => !DateTime.IsLeapYear(y)
                                    & (int)new DateTime(y, 1, 1).DayOfWeek == 1)
                          .GroupBy(y => Math.Abs(n - y))
                          .OrderBy(g => g.Key)
                          .First()
                          .Last();

            for (int y = 1600; y <= 2100; ++y)
            {
                Console.WriteLine($"{y} -> {f(y)}");
            }

            Console.ReadLine();
        }
    }
}

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


text:
Discord large text generator
Input:
The input will be a string of any characters.
Output:
the output will be an emojified (discord emojis) version of the input string. The way it will work is as so:
Letters: a-z (case insensitive) will become ':regional_indicator_lowercase letter here:'
e.g 'A' will become ':regional_indicator_a:'
Digits: any digits (0-9) will become the word version of the digit like so ':digit:'
e.g '0' will become ':zero:'
Whitespace: any whitespace character that's matched with the regex: /\s/ will become ':white_large_square:'
e.g ' ' will become ':white_large_square:'
Important notes:

The ':' surrounding the emoji's are necessary or else it won't display correctly in discord.
Each emoji needs to be separated by 1 space or else it won't display correctly in discord.
Trailing whitespace is allowed in the final output.
Any other characters that it comes across should not be in the final output and will be ignored.

Examples:
#1: Input:
this is a test string 0123456789

output:
:regional_indicator_t: :regional_indicator_h: :regional_indicator_i: :regional_indicator_s: :white_large_square: :regional_indicator_i: :regional_indicator_s: :white_large_square: :regional_indicator_a: :white_large_square: :regional_indicator_t: :regional_indicator_e: :regional_indicator_s: :regional_indicator_t: :white_large_square: :regional_indicator_s: :regional_indicator_t: :regional_indicator_r: :regional_indicator_i: :regional_indicator_n: :regional_indicator_g: :white_large_square: :zero: :one: :two: :three: :four: :five: :six: :seven: :eight: :nine:

#2: input:
!?#$YAY 1234

output:
:regional_indicator_y: :regional_indicator_a: :regional_indicator_y: :white_large_square: :one: :two: :three: :four:

#3: input:
lots         of         spaces

output:
:regional_indicator_l: :regional_indicator_o: :regional_indicator_t: :regional_indicator_s: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :regional_indicator_o: :regional_indicator_f: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :regional_indicator_s: :regional_indicator_p: :regional_indicator_a: :regional_indicator_c: :regional_indicator_e: :regional_indicator_s:

Examples as shown in discord:

This is codegolf so the shortest code wins!

Yes, it should include all whitespace characters. I've added an example if you need a reference :)

Please include the test cases as rendered by Discord :-)

What should tab and newline be replaced with?

newline should also be the ':white_large_square:', i've editted the post to include all types of whitespace for that ':white_large_square:' :P

What happens when you input uppercase letters? does it become :regional_indicator_UPPERCASE: or :regional_indicator_uppercase: ?

I'll make that clearer in the original post but it should convert it to lowercase like in example #2

@eniallator You should wait a few days before accepting an answer. Accepting too early discourages new answers.

Ah thnx. Not rly in the hang of code golf things - still learning :)

Already have a python3 program to do just this haha, see if i can golf it

Is the input one argument or multiples?

just the one string :)

05AB1E, 75 bytes
žK…
©«Ãlvyaiy’‹¬_Âì_ÿ’}ydiy“¡×€µ‚•„í†ìˆÈŒšï¿Ÿ¯¥Š“#è}®yåi’„¸_…Æ_ï©’}…:ÿ:ðJ

Try it online!
Explanation
žK…<space><tab><newline>©«Ã   # remove any character that isn't in [A-Za-z0-9<whitespace>]
lv                            # loop over each character converted to lowercase
yai                           # if it is a letter
   y’‹¬_Âì_ÿ’}                # interpolate into string "regional_indicator_<letter>"
ydi                           # if it is a digit
   y“¡×€µ‚•„í†ìˆÈŒšï¿Ÿ¯¥Š“#è} # extract it from a list of digits as words
®yåi                          # if it is whitespace
    ’„¸_…Æ_ï©’}               # push the string "large_white_square"
…:ÿ:                          # interpolate in string ":<emoji>:"
    ð                         # push a space
     J                        # join stack to one string

Python 2, 275 268 267 bytes
d=['']*256
d[48:58]='zero one two three four five six seven eight nine'.split()
d[9]=d[10]=d[32]='white_large_square'
d[65:90]=d[97:122]=map(lambda c:'regional_indicator_'+chr(c),range(97,122))
print' '.join((':%s:'%d[ord(c)])*(d[ord(c)]!='')for c in input()).strip()

It creates a large list of strings, iterates through the input string's characters and gets the string from the list using the character's ord value.
Works for ascii characters only. Replaces space, tab and newline only; any other whitespace will be discarded.
It did leave whitespaces in front so I had to strip it in the end.
I also tried doing it with regex, turned out to be longer (286 bytes):
import re
print re.sub('([ \t\n])|([a-z])|(\d)',lambda m:':'+['white_large_square','regional_indicator_'+m.group(m.lastindex),'zero one two three four five six seven eight nine'.split()[(ord(m.group(m.lastindex))-68)%10]][m.lastindex-1]+': ',re.sub('[^a-z0-9 \t\n]','',input().lower()))

@mbomb007 seems to miss the first character

How could I replace raw_input to input? The program will fail when you input numbers or anything for that matter.

Ah alright, I see now.

Okay, I made the changes, now it works for like in example #2.

You can also replace the map/lambda for a list comprehension in the last lines

@Rod You are right, thanks!

Doesn't run for me: https://pastebin.com/6rCv6e0G (weird spacing issue is just an issue of copy/paste from terminal)

Without weird spacing from copy/paste: https://pastebin.com/hyfD6qMB

You can replace ':'+d[ord(c)]+':' with ':%s:'%d[ord(c)] to save 1 byte.

C#, 296 273 bytes

Data

Input String i The string to be converted
Output String The input converted

Golfed
(string i)=>{var o="";foreach(var c in i){var k=c|32;var t=k>96&&k<123?"regional_indicator_"+(char)k:char.IsWhiteSpace(c)?"white_large_square":c>47&&c<58?new[]{"zero","one","two","three","four","five","six","seven","eight","nine"}[c-48]:"";o+=t!=""?$":{t}: ":t;}return o;};

Ungolfed
( string i ) => {
   var o = "";

   foreach( var c in i ) {
      var k = c | 32;
      var t = k > 96 && k < 123
         ? "regional_indicator_" + (char) k
         : char.IsWhiteSpace( c )
            ? "white_large_square"
            : c > 47 && c < 58
               ? new[] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }[ c - 48 ]
               : "";

      o += t != ""
         ? $":{ t }: "
         : t;
   }

   return o;
};

Ungolfed readable
// Receives a string to be converted
( string i ) => {

   // Initializes a var to store the output
   var o = "";

   // Cycle through each char in the string
   foreach( var c in i ) {
      // Creates a temp int to check for 'a' - 'z'
      var k = c | 32;

      // Creates a temp string that checks if the char is a lowercase letter
      var t = k > 96 && k < 123
         // If so, "builds" a Discord letter
         ? "regional_indicator_" + (char) k

         // Otherwise, checks if the char is a whitespace
         : char.IsWhiteSpace( c )
            // If so, "builds" a Discord white square
            ? "white_large_square"

            // Otherwise, checks if the char is a digit
            : c > 47 && c < 58
               // If so, gets the digit name
               ? new[] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }[ c - 48 ]

               // Otherwise, builds nothing
               : "";

      // Checks if the temp string is empty or not
      o += t != ""
         // If so, format it properly -- capsulate with ':' and add a space at the end
         ? $":{ t }: "

         // Otherwise, add the temp string, it's empty, so won't do anything
         : t;
   }

   // Return the converted string
   return o;
};

Full code
using System;
using System.Collections.Generic;

namespace Namespace {
   class Program {
      static void Main( String[] args ) {
         Func<String, String> f = ( string i ) => {
            var o = "";

            foreach( var c in i ) {
               var k = c | 32;
               var t = k > 96 && k < 123
                  ? "regional_indicator_" + (char) k
                  : char.IsWhiteSpace( c )
                     ? "white_large_square"
                     : c > 47 && c < 58
                        ? new[] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }[ c - 48 ]
                        : "";

               o += t != ""
                  ? $":{ t }: "
                  : t;
            }

            return o;
         };

         List<String>
            testCases = new List<String>() {
               "this is a test string 0123456789",
               "!?#$YAY 1234",
               "lots         of         spaces",
            };

         foreach( String testCase in testCases ) {
            Console.WriteLine( $" Input: {testCase}\nOutput: {f( testCase )}\n" );
         }

         Console.ReadLine();
      }
   }
}

Releases

v1.1 - -23 bytes - Implemented pinkfloydx33 suggestions.
v1.0 - 296 bytes - Initial solution.

Notes

None

Can you do bitwise fiddling on the sixth bit to convert to/from lowercase? Not sure if it would help in this scenario as I'm being too lazy to check. You shouldn't  need new string[] {..}  but rather just new[] {..}  unless I'm missing something

@pinkfloydx33 the bitwise trick is nice to be implemented, but would increase the byte count -- that, or I don't know how to do it.

c|32 is what I was referring to but like I said I didn't check its implications as far as the problem statement or the overall byte count.. That aside you should still be able to recover some bytes by using implicit array typing and replacing new string[] with just new[]

I was trying to do it with the &, never crossed my mind using the |.

Ruby, 184 bytes
->x{[x.chars.map{|c|[?:,': ']*(c==$;?'white_large_square':c=~/\d/?%w[zero one two three four five six seven eight nine][c.to_i]:c=~/[A-Z]/i?'regional_indicator_%s'%c.downcase: 0)}]*''}

Try it online!

Consider making this a full program so you can use the -p flag and gsub instead of x.chars.map. Tips source

Retina, 142 bytes
T`w	¶p`_dll%%%_
.
:$&:
[a-z]
regional_indicator_$&
%
white_large_square
0
zero
1
one
2
two
3
three
4
four
5
five
6
six
7
seven
8
eight
9
nine

Really wish there was an easier way to replace the digits.
Try it online!
Explanation
T`w ¶p`_dll%%%_

(Note the tab before the ¶) This is a transliteration stage with changes all letters to lowercase, all whitespace to %, and deletes every other character.
.
:$&:

Next, every character gets wrapped in colons and followed by a space.
[a-z]
regional_indicator_$&

Next, letters are replaced with regional indicators.
%
white_large_square

And %, which were previously whitespace, are replaced with white_large_square.
0
zero
1
one
.......

And finally, the digits are replaced with their respective emojis.

Python, 212 205 bytes
lambda s:''.join('/'<c<':'and':'+'zero one two three four five six seven eight nine'.split()[int(c)]+': 'or'`'<c<'{'and':regional_indicator_'+c+': 'or':white_large_square: '*(c in' 	\n')for c in s.lower())

Try it online!

Nice, you beat me! This also works in Python 2!

PHP>=7.0, 202 Bytes
for(;a&$c=$argn[$i++];)echo($e=[0,"",ctype_alpha($c)=>regional_indicator_.lcfirst($c),ctype_space($c)=>white_large_square,ctype_digit($c)=>strtolower(substr(IntlChar::charName("$c"),6))][1])?":$e: ":"";

It exists no Online Interpreter which contains IntlChar::charName
PHP, 211 Bytes
is the nearest way to solve this without IntlChar::charName

for(;a&$c=$argn[$i++];)echo($e=[0,"",ctype_alpha($c)=>regional_indicator_.lcfirst($c),ctype_space($c)=>white_large_square,ctype_digit($c)=>[zero,one,two,three,four,five,six,seven,eight,nine][$c]][1])?":$e: ":"";

Try it online!
PHP>=7.0, 220 Bytes
Regex Based

<?=preg_replace_callback("#(\pL)|(\d)|(\s)|.#",function($t){$r=!$t[1]?!$t[2]?!$t[3]?"":white_large_square:strtolower(substr(IntlChar::charName("$t[2]"),6)):regional_indicator_.lcfirst($t[1]);return$r?":$r: ":"";},$argn);

It exists no Online Interpreter which contains IntlChar::charName
PHP, 229 Bytes
is the nearest way to solve this without IntlChar::charName

<?=preg_replace_callback("#(\pL)|(\d)|(\s)|.#",function($t){$r=!$t[1]?!$t[2]?!$t[3]?"":white_large_square:[zero,one,two,three,four,five,six,seven,eight,nine][$t[2]]:regional_indicator_.lcfirst($t[1]);return$r?":$r: ":"";},$argn);

Try it online!

V, 141 bytes
Óá/:regional_indicator_&:
Óä/½':'.split('zero one two three four five six seven eight nine')[submatch(0)].':'
Óó/:white_large_square:
Ó::/: :

Try it online!

JavaScript (ES6), 197 199 bytes
Fixed underscores not being handled properly thanks to @Neil.
s=>s.toLowerCase().replace(/_|(\d)|(\w)|(\s)|./g,(c,d,a,w)=>a||d||w?`:${a?"regional_indicator_"+c:d?"zero one two three four five six seven eight nine".split` `[c]:"white_large_square"}: `:"").trim()

Cleaned up
s => s.toLowerCase().replace( /_|(\d)|(\w)|(\s)|./g, (c, d, a, w) => {
    if(a || d || w) {
        let out;
        if (a) out = "regional_indicator_" + c;
        else if (d) out = "zero one two three four five six seven eight nine".split(" ")[c];
        else out = "white_large_square";
        return `:${out}: `;
    }
    else {
        return "";
    }
}).trim()

Test Snippet

f=
s=>s.toLowerCase().replace(/_|(\d)|(\w)|(\s)|./g,(c,d,a,w)=>a||d||w?`:${a?"regional_indicator_"+c:d?"zero one two three four five six seven eight nine".split` `[c]:"white_large_square"}: `:"").trim()
<input id="I" type="text" size="50" oninput="O.innerHTML=f(I.value)">
<pre id="O" style="width:90vw;white-space:pre-wrap">

Nice but doesn't work for _. Hopefully the fix won't cost more than a couple of bytes.

I'm pretty sure you can do /_|([\d\w\s])|./g as your regex.

I split it into three separate groups so that in the replace function, I have d, a, and w for the three groups. Then I could just check which of those parameters existed to determine digit vs letter vs whitespace.

PowerShell, 200 197 Bytes
-3 because the [A-Za-z] regex isn't needed in the default case-insensitive regex matches.
$a=switch -R ([char[]]"$args"){
"[0-9]"{(-split'zero one two three four five six seven eight nine')["$_"]}
"[a-z]"{"regional_indicator_"+"$_"|% *l*r}
"\s"{"white_large_square"}};":$($a-join': :'):"

Would like to find:
a way around using $a - wrapping a switch statement in brackets causes it to not work at all for some reason, and any other method is longer than just using a variable.
Try it online! - input whatever you want and get the result easily.


text:
Find an Unrelated Number
Given 2 non-negative integers as input, output a non-negative integer that cannot be created through any mathematical operators on the 2 inputs.
For example, given inputs 2 and 3, 6, 0, 5, 1, 9, 8, 23, 2 are all invalid outputs.
Operations that must be taken into account are:
Addition        (a + b)
Subtraction     (a - b) and (b - a)
Multiplication  (a * b)
Division        (a / b) and (b / a)
Modulus         (a % b) and (b % a)
Exponentiation  (a ** b) and (b ** a)
Bitwise OR      (a | b)
Bitwise XOR     (a ^ b)
Bitwise AND     (a & b)
Concatenation   (a.toString() + b.toString()) and (b.toString() + a.toString())

In cases where an operation would lead to a non-integer (such as 2 / 3), always floor. So 2 / 3 = 0
Assume any invalid operations (such as dividing by 0) result in 0.
Input
2 non-negative integers.
Standard I/O methods are accepted
You can assume the input will always be within a handleable range for your given language, however remember standard loopholes still apply.
Output
Any non-negative integer that can not be created via any of the above operations on the 2 inputs.
Testcases
Input  -> Invalid outputs
2, 3   -> 0, 1, 2, 3, 5, 6, 8, 9, 23, 32
0, 0   -> 0
17, 46 -> 0, 2, 12, 17, 29, 63, 782, 1746, 4617, 18487710785295216663082172416, 398703807810572411498315063055075847178723756123452198369
6, 6   -> 0, 1, 6, 12, 36, 66, 46656
1, 1   -> 0, 1, 2, 11

Scoring
This is code-golf so fewest bytes wins!

Related

I think the one way to solve this is to find some prime number that is larger than (a+b)

@DeadPossum would definitely be a valid solution, although perhaps not the only, or golfiest ;)

I bet that there is some fancy language that can do it in couple bytes :D

@DeadPossum It's called Jelly.

Unrelated

Mathematica probably has a builtin

@HyperNeutrino I see what you did there ;)

@HyperNeutrino If you guessed Jelly, you're right!

Any non-negative integer so no string output right?

Is string I/O allowed? Not sure what the defaults are here.

@xnor yes, that's allowed

I'm assuming taking input as an array / list is allowed. Am I correct?

I'm not sure this is possible... one could say (a/a)+(a/a)+.... to get any real number...

Retina, 3 bytes
.
1

Try it online!
Takes inputs separated by space (or any single non-newline character)
Replaces all digits with 1, and joins the resulting numbers with another 1.
Proof of correctness
Courtesy of Martin Ender

This operation computes a result with one more digit than the number of digits of the two numbers together; the only operation that could produce a result so big is exponentiation.
The result is a repunit (a number whose digits are all 1).
"It is know [sic] [...] that a repunit in base 10 cannot [...] be a perfect power." This means that this result can't be produced by exponentiation either.

technically this isn't joining the resulting numbers with another 1, it's simply taking input as a string of 2 space-separated numbers, and replacing every character with a 1.
But that being said I can't find any examples that prove you wrong... yet

@Mayube of course it does, and as such it could work with any string, not only one composed by two numbers separated by a single space. My explanation is in terms of the "two input numbers" abstraction.

"It is know [sic] [...] that a repunit in base 10 cannot [...] be a perfect power." No operation in the given list other than exponentiation can result in more digits than the total number of input digits, so this should be valid.

You cheeky bugger! +1

Works in QuadR too!

Jelly, 3 bytes
+Æn

Try it online!
Explanation:
+Æn Arguments: x, y
+                            x + y.
 Æn Find a prime larger than

I think this is valid...

I assume this sums the input and outputs the first prime greater than the sum?

@Mayube Yes this is what it does. Although I don't know if it would be valid for concatenation yet.

@Mayube As it was said :D

@EriktheOutgolfer Can you write explanation? I couldn't find anything about finding primes in jelly built-in table

@DeadPossum I was about to write one. Hope I golfed it well.

This works for all values [1, 100).

I tested it with a couple of random pairs as high as [2, 120011] and it worked fine

@EriktheOutgolfer Some more golfing would be nice, but I think that 3 bytes is fine

@DeadPossum I meant the explanation. I seriously don't think there's a 2-byte version at all.

Ignoring string concatenation, wouldn't this still fail on 2,3 because they sum to 5, so it outputs 7, but that's still smaller than 3^2 (9)?

@Draco18s 7 is a valid answer for (2,3). Only specific numbers are banned, anything else is fine.

Right, never mind. I managed to mungle the question  in my head as I was scrolling through answers.

Bertrand's postulate should be almost good enough to prove concatenation works. Concatenating with the smaller number b on the right we have a..b >= 10a > 4a > 2(a + b), and concatenating with the smaller number b on the left we have b..a > (b+1)a. The only non-small interesting case here should be b = 1, where we have 1..a > 2a = 2(a + b) - 2. The place where this bound is the tightest is for a = 9....9. This is the only non-small case which might be a problem for Bertrand's postulate. However, there are better results like https://mathoverflow.net/questions/2724

I guess there's a version of Bertrand's postulate the proves n < p < 2n - 2 which should work for everything. I was thinking n < p < 2n.

Python 2, 8 bytes
'1'.join

Try it online!
Takes a list of two number strings as inputs, outputs a single number string. Concatenates the numbers with a 1 in the middle.
The result has too many digits for anything but exponent. Note that the output for (x,y) has one more digit than x and y combined, unless x or y is 0. For exponent, we check we check that this means x**y never matches.

If x is 0 or 1, then so is x**y, which is too small
If y<=1, then x**y<=x is too small
If y==2, then x**2 must have two more digits than x. This happens up to x=316, and we can check none of those work.
If y==3, then x**3 must have two more digits than x. This happens up to x=21. We can check that none of those work.
If 3<y<13, then x**y quickly gets too long. It only plausible has the right number of digits for x<=25, and we can check these.
If y>=14, then x**y is too long even for the smallest possible x==2.

CJam (7 chars)
{+))m!}

This creates a number (a+b+2)! which is larger than the largest related number in almost all cases.
It's fairly obvious that the largest related number must be one of a ** b, b ** a, concat(a, b),  concat(b, a).
If we consider logarithms, we find that

log(a ** b) = b log a
log(concat(a, b)) ~= (log a) + log (b)
log((a + b + 2)!) ~= (a + b + 2) log (a + b + 2) - (a + b + 2)

Thus asymptotically it's larger, and we only need to worry about a few small cases. In fact, the only case for which the value output is not larger than all related numbers is 0, 1 (or 1, 0), for which it gives 6 and the largest related number is 10.

Python, 115 95 79 bytes
Stupid straightforward solution. Feel free to outgolf me.
x,y=input()
f=lambda x,y:[x+y,x*y,x**y,int(`x`+`y`)]
print max(f(x,y)+f(y,x))+1

+12 bytes because of stupid x/0.
-20 bytes thanks to @RobinJames
-16 bytes thanks to @tehtmi

x/y if y else 0 will be less than or equal x*y for x,y non-negative so I think you can have those 12 bytes back plus another 3

@RobinJames Ah yes, I'm dumb. Thanks.

I think you should be able to remove more cases: 1) x - y <= x <= x +y; 2) x%y <= y <= x + y; 3,4,5) x | y = x ^ y + x & y <= x ^ y + 2*(x & y) = x + y. (For that last one, XOR is like add without carry, and AND is finding the bits that would carry. OR is taking (1, 1) -> 1 instead of (1,1) -> 2 like in real addition.)

JavaScript (ES6), 15 bytes
Takes input in currying syntax.
a=>b=>a*a+b*b+2

a² + b² + 1 would fail for many entries such as 3² + 5² + 1 = 35 or 7² + 26² + 1 = 726 (concatenation). a² + b² + 2 should be safe. This was exhaustively tested for 0 ≤ a ≤ b ≤ 50000.
Demo

let f =

a=>b=>a*a+b*b+2

for(a = 0; a < 5; a++) {
  for(b = a; b < 5; b++) {
    console.log(a, b, f(a)(b));
  }
}

for(i = 0; i < 10; i++) {
  a = Math.random() * 1000 | 0;
  b = Math.random() * 1000 | 0;
  console.log(a, b, f(a)(b));
}

This should be safe from concatenation. Let b be the number concatenated on the right. Fixing b, we can solve a quadratic equation for a: a^2 + b^2 + 2 - 10^k * a - b = 0. The discriminant of the quadratic must be a perfect square for this equation to have an integer solution. The discriminant is 10^2k - 4(b^2 - b + 2) = 10^2k - (2b - 1)^2 - 7. Consider modulo 9. k doesn't matter and we never get a quadratic residue for any b.

Python, 27 bytes
lambda a,b:(a+b+9)**(a+b+9)

Outputs a number larger than all the related numbers.
Try it online!
-1 byte thanks to Kevin Cruijssen.
-2 bytes thanks to Dead Possum.

Your TIO-link is empty. Also, I think you can remove the space after : if I'm not mistaken.

@KevinCruijssen Whoops, fixed that, thanks!

You can remove f= - unnamed lambda is acceptable

@DeadPossum Didn't know that, thanks!

You could probably do with getting rid of at least one of the two nines (and the corresponding +), but I'm not totally sure.

@Theo I'm not sure either; but I included them just to be safe.

@Ankoganit You could actually probably get rid of both. The concatenation one is the one I'm not sure about.

@Theo Actually, (a+b)^(a+b) doesn't work for (a,b)=(0,1). And (a+b+9)^(a+b) and (a+b)^(a+b+9) both fail for (0,0).

Won't this necessarily output non-integers for sufficiently large (…not actually all that large) inputs?

Python 2, 25 bytes
lambda x,y:int(`x`+`y`)+3

Concatenates and adds 3
Try it online

Does this work if x and y are both 3?

@RobertBenson Should do, afaik you can't make 36 from 3 and 3

This seems probably okay to me. The reverse concatenation must have a different residue modulo 9. For exponentiation, there are only a finite number of cases to consider before the result of the exponentiation has too many digits along the lines of xnor's Python answer. I didn't see any conflicts (neither for +1, although +2 has 2**6 = 62 + 2).

@tehtmi +1 fails on x=y=0
The try it online link tests for all combinations of x and y in the range [0,400]

Brachylog, 3 bytes
+<ṗ

Try it online!
Nothing new here.
       The output
  ṗ    is a prime number
 <     which is strictly greater than
+      the sum of the elements of
       the input.

Now, to figure out how to find an unrelated string...

QBIC, 8 bytes
Man, so many cool ways to just take these numbers and get an unrelated number. I just had to try a few, to see how QBIC'd keep up. The shortest one is a port of xnor's Python answer, concatenating the numbers with a 1 in the middle:
?;+@1`+;

All ones, a port of Leo's Retina answer:
[0,_l;|+_l;||Z=Z+@1

Finding the next bigger prime:
c=:+:+1≈µc|+1|c=c+1]?c

JS (ES6), 12 bytes
x=>x.join`1`

Same algorithm as this python answer. Takes input as an array of ints.

J, 5 bytes
Just a translation of Jelly.
4 p:+

Try it online!

05AB1E, 2 4 bytes
+ØDm

Try it online!
Same as the Jelly answer, finds a prime after the sum. One byte shorter :)
EDIT: Now raises it to its own power to suffice for the exception.

Not the same algorithm actually, this finds a+b'th prime, while mine finds the smallest prime larger than a+b.

Either way, it should work.

Fails for 6443, 3 (which gives prime 64433, the concatenation).

@tehtmi is correct, this fails.

See my edit, should work now

APL (Dyalog), 4 bytes
Algorithm taken from here.
!2++

Try it online!
! factorial of
2+¨ two plus
+ the sum
Works in J too.

sed, 6 bytes
s/ /1/

Try it online!
Input is via stdin in the form "x y", output is to stdout.
Port of this python answer, which includes the proof of correctness.  Many thanks to xnor for such a simple method.

Java 8, 15 bytes
a->b->a*a+b*b+2

Port from @Arnauld's amazing JavaScript (ES6) answer.
Try it here.
Straight-forward approach (177 170 bytes):
a->b->{int r=1;for(;a+b==r|a-b==r|a*b==r|(b>0?a/b==r|a%b==r:0>1)|Math.pow(a,b)==r|(a|b)==r|(a^b)==r|(a&b)==r|new Integer(""+a+b)==r|new Integer(""+b+a)==r;r++);return r;}

Try it here.

Braingolf, 4 bytes
9&+^

Try it online! (Header & Footer are Interpreter, code is actual braingolf code, args are inputs)
Outputs (a+b+9)**(a+b+9)
From my testing I couldn't find any pairs that this doesn't work on.

Python 2, 19 bytes
lambda x,y:x+9<<y+9

Try it online!
I'm pretty sure the bit shift works for all cases, but I'm not 100% on it. Anyway, it saves a few bytes over the exponentiation version.

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


text:
lwap She tirst fetters!
Given a list or delimited string, output a list or delimited string with the first character of each word one word later.
For this challenge, a "word" consists of only all printable ASCII characters, except the space, newline, and tab character.
For example, take the string "Good afternoon, World!" (space-delimited):
1. String
"Good afternoon, World!"

2. Get the first characters:
"[G]ood [a]fternoon, [W]orld!"

3. Move the characters over. The character at the end gets moved to the beginning.
"[W]ood [G]fternoon, [a]orld!"

4. Final string
"Wood Gfternoon, aorld!"

This is code-golf, so shortest code wins!
Test cases:
Input -> output (space-delimited)

"Good afternoon, World!" -> "Wood Gfternoon, aorld!"
"This is a long sentence." -> "shis Ts i aong lentence."
"Programming Puzzles and Code Golf" -> Grogramming Puzzles Pnd aode Colf"
"Input -> output" -> "onput I> -utput"
"The quick brown fox jumped over the lazy dog." -> "dhe Tuick qrown box fumped jver ohe tazy log."
"good green grass grows." -> "good green grass grows."

Is a trailing space allowed in the output?

Can we assume there will be at most one space between words?

with some rules on which letters can follow each other, you'd have a spoonerism generator https://en.wikipedia.org/wiki/Spoonerism

@BusinessCat Yes.

@mathjunkie Yes.

The second test case's output appears to be missing a trailing period .

May we take input as a matrix with one word in each column?

@Adám That is fine.

It is more a rotate than a swap

05AB1E, 7 6 bytes
€ćÁ2ôJ

Explanation:
€ć      Extract head of each
  Á     Rotate to the right
    2ô  Split into pieces of length two
      J Join

Try it online!

You can take input and output as a list, you know.

Japt, 11 10 9 8 bytes
Takes advantage of Japt's index wrapping and negative indexing.
ËhUgEÉ g

Try it online

Explanation
        :Implicit input of array U (each element is an individual word).
Ë       :Map over the array.
h       :Replace the first character of the current element (word) ...
Ug      :  with the word in the array at index ...
EÉ      :    current index (E) -1's ...
g       :  first character.
        :Implicit output of array of modified words

I think you can take input as a list as well, saving a further byte on the ¸

That might be a stretch, @ETHproductions, but I'll ask. EDIT: Confirmed here

Yes, at the very beginning of the post it says "Given a list or delimited string," Not sure how long that's been there though (I guess since the challenge was first posted).

Nice one! Using h was a good idea. I came up with £g´Y ¯1 +XÅ which can become £XhUg´Y ¯1 using your technique.

Haskell, 43 bytes
p%((a:b):r)=(p:b):a%r
_%e=e
(%)=<<head.last

Try it online! Uses a list of strings for input and output.
Remembers the first letter of the previous word p, and recursively makes it the first letter of the current word while sending the new first letter down the chain. The previous first letter is initialized as the first letter of the last word.

JavaScript (ES6), 46 bytes
s=>s.map((k,i)=>s.slice(i-1)[0][0]+k.slice(1))

Takes advantage of the fact that slice(-1) returns the last element of an array.
Snippet

f =

s=>s.map((k,i)=>s.slice(i-1)[0][0]+k.slice(1))

console.log(f(['Good', 'afternoon,', 'World!']));
console.log(f(['This', 'is', 'a', 'long', 'sentence.']));
console.log(f(['Programming', 'Puzzles', 'and', 'Code', 'Golf']));
console.log(f(['Input', '->', 'output']));
console.log(f(['The', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog.']));
console.log(f(['good', 'green', 'grass', 'grows.']));

Could you remove join? Question states that you can output a list. It would save 8 bytes

@CraigAyre, sweet, thanks!

Ruby, 85 77 63 bytes
Pretty sure this could be much shorter.
Edit: Thanks for @manatwork for collect -> map
a=gets.split;$><<a.zip(a.rotate -1).map{|x,y|y[0]+x[1..-1]}*' '

You could replace both .collect and .each with .map.

-p flag (+1 byte) and i=-2;gsub(r=/\b\w/){$_.scan(r)[i+=1]} for ultimate golfage

CJam, 12 10 9 bytes
Saved 1 byte thanks to jimmy23013
q~Sf+:()o

Takes input as a list of words.
Try it online!
Explanation
     e# Example input: ["Good" "afternoon," "World!"]
q~   e# Read and eval the input.
     e# STACK: [["Good" "afternoon," "World!"]]
Sf+  e# Append a space to each word.
     e# STACK: [["Good " "afternoon, " "World! "]]
:(   e# Remove the first character from each substring.
     e# STACK: [["ood " 'G "fternoon, " 'a "orld! " 'W]]
)o   e# Remove and print the last element of the array.
     e# STACK: [["ood " 'G "fternoon, " 'a "orld! "]]
     e# Implicitly join the remaining array with no separator and output.

You can take input and output as a list, you know.

@ComradeSparklePony You confirmed that after I answered :P Golfing it now

)o for 1m>.

Jelly, 6 bytes
Ḣ€ṙ-;"

Try it online!
Thanks to Dennis for reading the rules better than me, this returns a list of the words. It doesn't work as a full program.

><>, 44 45 bytes
90.f3+0.>&i&01.>~r&l0=?;o20.
 i:" "=?^:1+ ?!^

Assumes space-separated words.
Correction by Aaron added 1 byte

Vim, 16, 9 bytes
<C-v>GdjPGD{P

7 bytes saved thanks to @Wossname!
Takes input one word per line, e.g.
Hello
world
and
good
day
to
you

I believe this should be fine since taking the input as a list is allowed.
Try it online!

It can be done in 12 keystrokes if you do it 'by hand' as it were.  Not sure how to articulate that syntax here or if it's even valid to do that in this puzzle. ^vGdjPGd$ggP       (where ^v is the [control+v] key combo, just be sure to start with the cursor at the top left and be in command mode)

@Wossname Ah, that's a great idea! Theres a couple small things I added to save even more bytes (for example, dd -> D, gg -> }) Thanks for the tip!

I didn't know dd and gg both had shorter versions!  Awesome :)

How about using the "superscript HTML tags" around the letter v in the code instead of ""?  That would make the code look the right length when seen in the Answer.  So your code would look like... VGdjPGD{P ... which looks pretty neat when the stackexchange web page formats it properly.

@wossname Actually, they are not equivalent. They just happen to work in this instance. I'd be happy to explain in more detail in vim---is---.

I see, the curly braces jump around between paragraphs, it works here because we're only dealing with one paragraph.  Cool.  Oh wow that makes scrolling quickly through large code files really easy!  Thanks for that tip. :)

V, 7 bytes
Îxjp
{P

Try it online!
Explanation:
Î       " On every line:
 x      "   Delete the first character
  j     "   Move down a line
   p    "   And paste a character (into column 2)
{       " Move to the beginning of the input
 P      " And paste the last thing we deleted (into column 1)

APL (Dyalog), 6 bytes
Takes matrix with one word per column.
¯1∘⌽@1

Try it online!
¯1∘⌽ rotate one step right
@ at
1 row 1

clever input idea

R, 72 70 bytes
function(x)paste0(substr(x,1,1)[c(y<-length(x),2:y-1)],substring(x,2))
Try it online
2 bytes saved thanks to Giuseppe.
Input and output are lists. Takes a substring consisting of the first letters, cycles the last one to the front, and pastes it together with a substring of the rest of each word. The cycling step is a killer, but I can't figure out a way to cut it down any further.

you could use 2:y-1 instead of 1:(y-1) since : takes precedence over - which saves you 2 bytes.

69 bytes aliasing substring as a function argument

Python 2 + Numpy, 104 bytes
from numpy import *
s=fromstring(input(),"b")
m=roll(s==32,1)
m[0]=1
s[m]=roll(s[m],1)
print s.tobytes()

You need to include the import statement in the byte count. Cool answer!

also, you need to have your input and output code in the byte count

I think you can drop the final newline for 1 byte.

@ØrjanJohansen yes, also "b" instead of "u1" works, so -2 bytes.

PHP, 62 bytes
$c=end($_GET);foreach($_GET as$g)echo$g|$g[0]=$c^$g^$c=$g,' ';

C#, 78 77 bytes
using System.Linq;a=>a.Select((s,i)=>a[i-->0?i:a.Count-1][0]+s.Substring(1));

Compiles to a Func<List<string>, IEnumerable<string>>, Full/Formatted version:
using System;
using System.Collections.Generic;
using System.Linq;

class P
{
    static void Main()
    {
        Func<List<string>, IEnumerable<string>> f = a =>
                a.Select((s, i) => a[i-- > 0 ? i : a.Count - 1][0] + s.Substring(1));

        Console.WriteLine(string.Join(" ", f(new List<string>() { "Good", "afternoon,", "World!" })));
        Console.WriteLine(string.Join(" ", f(new List<string>() { "This", "is", "a", "long", "sentence." })));

        Console.ReadLine();
    }
}

Brachylog, 12 bytes
{hᵐ↻|bᵐ}ᶠzcᵐ

Try it online!
Explanation
Example input: ["Good","afternoon,","World!"]

{      }ᶠ       Find: [["W","G","a"],["ood","fternoon,","orld!"]]
 hᵐ↻              Take the head of each string, cyclically permute them
    |             (and)
     bᵐ           Get the strings without their heads
         z      Zip: [["W","ood"],["G","fternoon,"],["a","orld!"]]
          cᵐ    Map concatenate on each list: ["Wood","Gfternoon,","aorld!"]

Python 2, 74 bytes
Try it online
S=input().split()
print' '.join(b[0]+a[1:]for a,b in zip(S,S[-1:]+S[:-1]))

-5 bytes, thanks to @Rod

@Rod Good suggestion, thank you!

S[:-1] can be shortened to S; zipping lists of different lengths automatically truncates whichever is longer

Haskell, 50 bytes
f=zipWith(:).((:).last<*>init).map head<*>map tail

Input and output are as lists of words.

Functions can be unnamed, so you can omit the f=.

Oh, cool, I didn't realize there was an online compiler for Haskell. I'll delete my comments, since I'm wrong ^^

Fig, \$13\log_{256}(96)\approx\$ 10.701 bytes
j/ +e[qJ]xxep

-2.469 bytes thanks to one of the @Sʨɠɠans
Try it online!
Explanation:
       J       # Append
          x    # the input
        ]x     # to the first item from the input,
      q        # then remove the first item from that.
    e[         # Get the first character from each item.
           ep  # Get the input with the first char of each word removed.
   +           # Add,
j              # join by
 /             # space

you can replace " " with /

13 chars by replacing M@<op> with e<op>

I should probably repurpose : as a reverse lazy op...

Mathematica, 59 bytes
""<>#&/@Thread@{RotateRight@#~StringTake~1,#~StringDrop~1}&

Try it online!
Takes and returns a list of words.
If you prefer to take and return strings, this works for 87 bytes:
StringRiffle[Thread@{RotateRight@#~StringTake~1,#~StringDrop~1}&@StringSplit@#," ",""]&

Retina, 46 37 31 bytes
Several bytes saved thanks to @Neil and @PunPun1000
(\S)(\S* +)
$2$1
(.* .)(.)
$2$1

Try it online!

Can you not drop the (.*) and $3?

@Neil yeah, thanks

If you turn the + in the first line to a * you turn (.* .) in the third line to (.*) for -2 bytes.  Try it Online!

kdb+, 25 22 bytes
Solution:
rotate[-1;1#'a],'1_'a:

Example:
q)rotate[-1;1#'a],'1_'a:("The";"quick";"brown";"fox";"jumped";"over";"the";"lazy";"dog.")
"dhe"
"Tuick"
"qrown"
"box"
"fumped"
"jver"
"ohe"
"tazy"
"log."

Explanation:
1_'a:             // (y) drop first character of each element of a
,'                // join each left with each right
rotate[-1;1#'a]   // (x) take first character of each element of a, rotate backwards 1 char

Extra:
A version that takes a regular string (37 bytes):
q){" "sv rotate[-1;1#'a],'1_'a:" "vs x}"The quick brown fox jumped over the lazy dog."
"dhe Tuick qrown box fumped jver ohe tazy log."

Perl 5, 40 bytes
39 bytes of code + 1 for -a
$F[-1]=~/./;$a=$&,s/./$a/ for@F;say"@F"

Try it online!

J, 34 bytes
;@(,.~_1|.])~/@|:@(split;.2)@,&' '

Try it online!

;@(,&' '@}.&.>,~&.>_1|.{.&>)@cut for 32.

Husk, 11 bytes
Foz:ṙ_1TmΓ,

Input and output as a list of strings, try it online!
(The header just transforms the input to a list of words and joins the output list with spaces.)
Explanation
F(z:ṙ_1)TmΓ,  -- example input: ["Good" "afternoon,","World!"]
         m    -- map the following (example on "Good")
          Γ   -- | pattern match head & tail: 'G' "ood"
           ,  -- | construct tuple: ('G',"ood")
              -- : [('G',"ood"),('a',"fternoon,"),('W',"orld!")]
        T     -- unzip: ("GaW",["ood","fternoon,","orld!"])
F(     )      -- apply the function to the pair
    ṙ_1       -- | rotate first argument by 1 (to right): "WGa"
  z:          -- | zip the two by (example with 'W' and "ood")
              -- | | cons/(re)construct string: "Wood"
              -- :-: ["Wood","Gfternoon,","aorld!"]

Alternative, 11 bytes
§oz:ṙ_1m←mt

Try it online!

Vyxal S, 7 bytes
vhǔ?vḢ+

Try it online!
vh       # Get the first item of each
  ǔ      # Rotate to the right
   ?     # Push the input
    vḢ   # Get the all but the first char of each
      +  # Add

you can do vhǔ?vḢ+ and remove the r flag.

@Sʨɠɠan True, thank you

Mathematica, 134 bytes
(w=Characters@StringSplit@#;d=Drop[w,0,1];StringRiffle[StringJoin/@Table[PrependTo[d[[i]],RotateRight[First/@w][[i]]],{i,Length@w}]])&

C, 106 77 bytes
i,a,b;f(char*o){a=*o;for(i=0;o[i++];)if(o[i]==32){b=o[++i];o[i]=a;a=b;}*o=a;}

-29 bytes from scottinet
Modifies the string in-place.
Ungolfed:
char *f(char *o){
    char a=*o,b; // start with a as the first character of the first word
    for(int i=0;++i<strlen(o);){
        // iterate through the string with i as the index
        if(o[i]==32){ // if the current character is a space,
                      // i.e. if a word begins after this character
            b=o[++i]; // store the beginning of the next word in b
            o[i]=a; // set the beginning of the next word to a
            a=b; // set a to what the beginning of the next work used to be
        }
    }
    *o=a;
    // set the beginning of the first word to the old beginning of the last word
}

Golfier version proposal (exact same code): -29 bytes

74 bytes

Retina, 25 20 bytes
Byte count assumes ISO 8859-1 encoding.
Om$`^.((?=.*¶))?
$#1

Try it online!
Input and output are linefeed-separated. The test suite performs the necessary I/O conversion from space-separation.

It is fine to use linefeed separation.

Pyth, 12 bytes
.b+hNtY.>Q1Q

Takes a list of words and returns a list of words.
Try it!

Java (OpenJDK 8), 97 bytes
for(int n=s.length,i=0,j=n-1;i<n;j%=n)System.out.print(s[j++].charAt(0)+s[i++].substring(1)+" ");

Try it online!

This is a snippet, not a function. Also, you should take the entire String as one argument, and also keep commas and question/examination marks in the output as is.

AWK, 63 bytes
{for(R=substr($NF,1,1);++j<=NF;R=r)sub(r=substr($j,1,1),R,$j)}1

Try it online!
It seems like there should be a way to reduce the redundancy, but I'm not seeing it.
Note: the TIO link has 4 extra bytes to allow for multiline input.

Python 3, 73 bytes
lambda s:' '.join(s.split()[i-1][0]+w[1:]for i,w in enumerate(s.split()))

Try it online!

Rust, 129 bytes
|k:&str|k.split(' ').zip(k.split(' ').cycle().skip(k.matches(' ').count())).map(|(a,b)|[&b[0..1],&a[1..]," "].concat()).collect()

Attempt This Online!
Shifting the other direction would be a lot shorter.

Thunno 2 Ṡ, 5 bytes
€ḢṾ2ẇ

Try it online!
Port of Okx's 05AB1E answer.
Explanation
€ḢṾ2ẇ  # Implicit input
€Ḣ     # Head extract from each
  Ṿ    # Rotate right once
   2ẇ  # Split into pairs
       # Join on spaces
       # Implicit output