text:
Programming Puzzles and Taco Truck
Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your help to ensure that everyone gets their orders in a timely manner. There isn't a whole lot of room inside food trucks, so you'll need your code to be as short as possible.
Now for some on-the-job training.
Your job
Write a full program that reads an order from STDIN or a function that gets a single string order as input. Tacos are printed to STDOUT, made to order.
Taking orders
Customers will give you their orders via STDIN or function argument. Orders will be in the form of a comma-delimited list of desired toppings. The order in which the toppings are given dictates the order in which they appear in the taco, with the first listed topping on the bottom and the last on the top. Here's what we keep in stock:

Beans
Rice
Veggies
Lettuce
Guacamole
Sour cream
Salsa

Customers may order as few as 1 topping but no more than 5 toppings. Toppings need not be distinct.
You may assume that the customers are familiar with the menu before ordering and thus all orders will only contain ingredients that we stock. That is, the input will always be valid.
Serving tacos
Customers demand their tacos be printed to STDOUT. They're fine with some leading or trailing whitespace in their food.
Market research shows that everyone wants to eat tacos as words, and words in all caps are much more flavorful. Thus we will list toppings in ALL CAPS with no spaces.
In the interest of artsy presentation, we can't just plop stuff in a tortilla and call it good, we have to gently lay toppings left to right, wrapping and repeating as needed. Each topping gets a minimum of 2 lines to itself. This will all become clearer once we inspect the sample platter.
Sample platter
Let's take a look at some sample orders.
The customer orders: Beans,Veggies,Rice,Lettuce,Sour Cream
We deliver:
   SOUR
  CREAMS
T LETTUC L
O ELETTU I
R RICERI T
T CERICE R
I VEGGIE O
L SVEGGI T
L BEANSB A
 A EANS L
  TORTIL

Looks pretty tasty, right? The toppings wrap after 6 characters to a new line and are repeated to fill 2 lines each, truncated to 12 characters. The first ingredient gets 6 characters on its top line but only 4 on its second line. This ensures that it fits in the fold of the tortilla. Similarly, the last ingredient always gets 4 characters on its top line and 6 on its second.
What happens if a customer orders two of the same topping in a row? Keep wrapping that ingredient for all consecutive lines of that ingredient.
The customer orders: Lettuce,Lettuce,Lettuce,Salsa
We deliver:
T  SALS  L
O ASALSA I
R LETTUC T
T ELETTU R
I CELETT O
L UCELET T
L TUCELE A
 A TTUC L
  TORTIL

The customer orders: Guacamole
T        L
O        I
R        T
T        R
I        O
L  GUAC  T
L AMOLEG A
 A UACA L
  TORTIL

Only one ingredient? Give 4 extra characters' worth on the top.
Employees of the month

var QUESTION_ID=65888,OVERRIDE_USER=20469;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Happy cooking!

JavaScript (ES6), 269 263 bytes
x=>eval('x=x.split`,`;p=o="";for(i=10;i--;){t=x[1]?x[i/2|0]:x[i>2|0];t!=p?r=(n=0,t?t.replace(s=" ",""):s).toUpperCase().repeat(99):0;m=r.slice(n,n+=p&&i?6:4);p&&i?0:m=s+m+s;p=t;o+=(i>7?t?s+s+m:"":i?"TORTILL"[7-i]+s+m+s+"LITROTA"[7-i]:` A${m}L`)+`\n`}')+"  TORTIL"

Explanation
x=>
  eval('                                          // use eval to save writin return and {}
    x=x.split`,`;                                 // convert ingredients to an array
    p=                                            // p = previous ingredient
      o="";                                       // o = output text
    for(i=10;i--;){                               // loop from top to bottom of taco
      t=x[1]?x[i/2|0]                             // t = ingredient text
        :x[i>2|0];                                // start a line early if 1 ingredient
      t!=p?r=                                     // r = repeated ingredient text
        (n=0,                                     // n = current index in repeated text
        t?t.replace(s=" ",""):s)                  // get the ingredient (or space)
        .toUpperCase().repeat(99):0;              // upper-case and repeat the ingredient
      m=r.slice(n,n+=p&&i?6:4);p&&i?0:m=s+m+s;    // m = text in the middle of the taco
      p=t;                                        // set p to current ingredient

      // Add the appropriate output
      o+=(i>7?t?s+s+m:"":i?"TORTILL"[7-i]+s+m+s+"LITROTA"[7-i]:` A${m}L`)+`\n`

    }                                             // implicit: eval returns o
  ')+"  TORTIL"                                   // return the output text

Test

var solution = x=>eval('x=x.split`,`;p=o="";for(i=10;i--;){t=x[1]?x[i/2|0]:x[i>2|0];t!=p?r=(n=0,t?t.replace(s=" ",""):s).toUpperCase().repeat(99):0;m=r.slice(n,n+=p&&i?6:4);p&&i?0:m=s+m+s;p=t;o+=(i>7?t?s+s+m:"":i?"TORTILL"[7-i]+s+m+s+"LITROTA"[7-i]:` A${m}L`)+`\n`}')+"  TORTIL"
<input type="text" id="input" value="Beans,Veggies,Rice,Lettuce,Sour Cream" />
<button onclick="result.textContent=solution(input.value)">Go</button>

As the shortest answer at the end of the bounty period, you receive the bounty of +50! And as the shortest of the two posted answers a week after the question was posted, you win the coveted check mark. Nice work and thanks for participating! :)

Python 3, 475 bytes
n=range
s=input().upper().replace(" ","").split(",")[::-1]
s=sum(zip(s,s),tuple())
t=""
p=0
l=len(s)
if l==2:q=s[0];s=[q,q,q];l=3
r=[]
e=" "
f=e*4
d=[f," AL ","L  A","L  T","I  O","T  R","R  T","O  I","T  L",f,f]
for i in n(l):
 h=s[i]
 c=6
 a=""
 if i==0 or i==l-1:c=4
 if t!=h:
  p=0
  t=h
 for x in n(0,c):
  a+=h[p]
  p+=1
  if p==len(h):
   p=0
 if c==4:a=e+a+e
 r+=[a]
r=["TORTIL"]+r[::-1]
for i in n(0,11):
 y=10-i
 x=d[y]
 m=e*6
 if y<=l:m=r[y]
 print(x[:2]+m+x[2:])

It's probably way too long, but I may as well post something!

I think you can replace r=(r+["TORTIL"])[::-1] with r=["TORTIL"]+r[::-1]. range(0,l) can also be range(l).

Stack Exchange replaces tabs with four spaces, so it's hard to verify your score as it is. After re-replacing them, I count 482. 2. You can save on whitespace by putting, e.g., if l==2:q=s[0];s=[q,q,q];l=3 on a single line. 3. n(l) does the same as n(0,l).

@Dennis is there something I can do about #1?

You could just use a single space instead of a tab. Python 3 doesn't allow mixing them anyway.

Okay, I've taken your suggestions and made it slightly shorter.

Ruby, 376 375 368 363 362 bytes
->a{p='ALLITROT'.chars
s='LATORTIL'.chars
t=['  TORTIL']
c=[*a.split(?,).chunk(&:upcase)]
c.map.with_index{|x,i|n=x[1].size*2
w=x[0].tr(' ','')*9*n
[n+=i==0?1:0,w.sub!(/..../,' \0 ')]if i==c.size-1
w.chars.each_slice(6).take(n).reverse.map{|l|t=["#{p.shift||' '} #{l*''} #{s.shift||' '}"]+t}}
p.map{|x|t=[x+' '*8+s.shift]+t}
t[-2].sub! /(.{6})../,' \1'
t.join$/}

Still a work in progress.
(Bonus: Works with as many toppings as you want, not just 5. Mostly because I didn't see that rule at first >_<)
Ungolfed version:
#!/usr/bin/env ruby

def make_taco ingredients
    # These three variables make up the tortilla.
    prefixes = 'ALLITROT'.chars
    suffixes = 'LATORTIL'.chars
    taco = ['  TORTIL']
    # .chunk is a Ruby builtin that's *incredibly* useful for this challenge.
    chunks = ingredients.split(',').chunk{|x| x}.to_a
    # Loop through every chunk of equal ingredients.
    chunks.each_with_index do |ingredient, idx|
        # Get the number of lines the group of ingredients should take up.
        count = ingredient[1].length * 2
        # *9 because that's guaranteed to be enough ingredient.
        wrapped = ingredient[0].upcase.sub(' ','') * 9 * count
        # If this is the last element...
        if idx == chunks.length - 1
            # Add spaces strategically to position the top "layer."
            wrapped.sub! /..../, ' \0 '
            # If this is also the first element...
            if idx == 0
                # We need to make one more row.
                count += 1
            end
        end
        # Arrange the ingredient like so, and then for each "layer"...
        wrapped.chars.each_slice(6).take(count).reverse.each do |line|
            # Add it to the taco, along with prefixes/suffixes if they exist.
            taco.push "#{prefixes.shift || ' '} #{line * ''} " +
                "#{suffixes.shift || ' '}"
        end
    end
    # Fill in the rest of the prefixes and suffixes we didn't use.
    prefixes.each do |prefix|
        taco.push prefix + ' ' * 8 + suffixes.shift
    end
    # Fix the "offset" on the second-to-last line.
    taco[1].sub! /(.{6})../, ' \1'
    # Since we've been building the taco bottom-up, reverse, join, and return.
    taco.reverse.join("\n")
end

puts make_taco 'Beans,Veggies,Rice,Lettuce,Sour Cream'
puts
puts make_taco 'Lettuce,Lettuce,Lettuce,Salsa'
puts
puts make_taco 'Guacamole'


text:
Pythagoras' Other Leg
Pythagoras had his leg blown up in the war. It had to be amputated, and though he nearly died, he pulled through and made a full recovery. Now, after a year of walking with crutches, he gets the privilege of getting a prosthetic leg! Thing is, though, there are several that fit, but which ones?
The Task
Given a positive integer as input that is the length of one leg of a Pythagorean triple, output all possibilities for the other leg. For example, the smallest Pythagorean triple is (3,4,5), which forms a triangle with two legs of length 3 and 4, and a hypotenuse of length 5.
Examples
Leg:5
12

Leg:28
21
45
96
195

Leg:101
5100

Leg:1001
168
468
660
2880
3432
4080
5460
6468
10200
38532
45540
71568
501000

The Rules

Input will be a single positive integer n.
Output may be in any order, with any delimiter, in any base (though this base must be consistent), and with optional opening and closing braces, and optional trailing whitespace. That is, 1 2 3, [1,2,3], and 1,11,111 all fit this output specification.
You may assume that n will never be larger than one fourth of the fourth root of your language's limit (without using libraries). In practice, you may assume the input will be less than either this or 10,000, whichever is less.

Pythagoras is waiting on you, so better write your code quick and short!

He's a really strange guy. He's willing to wait a couple thousand years for computers to be invented, but not a couple more nanoseconds to read a few extra hundred bytes. A very precise man, to say the least.

Pyth - 13 bytes
Brute forces all possible ones up till n^2+1.
f!%.a,TQ1S*QQ

Test Suite.

Jelly, 8 bytes
²R²+²Æ²O

This answer is non-competing, since it uses features that have been implemented after the challenge was posted. Try it online!
This approach does not use floating point math, so it will give the correct answer as long as the intervening lists can fit into memory.
Idea
If (a, b, c) is a Pythagorean triple, there are strictly positive integers k, m, n such that the set equality {a, b} = {km2 - kn2, 2kmn} holds.
In particular, this means that a < b2 and b < a2, so for input a we can simply check if a2 + b2 is a perfect square for each b in {1, … a2}.
Code
            Input: x

²           Compute x².
 R          Get get range 1 ... x².
  ²         Square each integer in that range.
   +²       Add x² to each resulting square.
     Æ²     Check if the resulting sums are perfect squares.
       O    Get all indices of ones.

Julia, 35 bytes
n->filter(i->hypot(i,n)%1==0,1:n^2)

This is an anonymous function that accepts an integer and returns an array.
For each i from 1 to the input squared, we compute the hypotenuse using Julia's built-in hypot function, and determine whether the fractional portion is 0. If so, we keep it, otherwise it's excluded.

CJam, 17 bytes
{:A2#{Amh1%!},1>}

This is an anonymous function that pops an integer from the stack and leaves an array in return.
Try it online!
Idea
If (a, b, c) is a Pythagorean triple, there are strictly positive integers k, m, n such that the set equality {a, b} = {km2 - kn2, 2kmn} holds.
In particular, this means that a < b2 and b < a2, so for input a we can simply check if a2 + b2 is a perfect square for each b in {1, … a2}.
Code
:A               Save the input in A.
  2#             Square it.
    {      },    Filter; for each B in {0, ..., A**2}:
     Amh           Calculate the hypotenuse of (A, B).
        1%!        Apply logical NOT to its fractional part.
                 Keep B if ! pushed 1.
             1>  Discard the first kept B (0).

JavaScript ES6, 60 62
Same as the other answers, checking from 1 to a*a-1
a=>[...Array(a*a).keys()].filter(b=>b&&!(Math.hypot(a,b)%1))

Thx to @Mwr247 the shortest way to build a range in ES6
2 bytes saved thx @ETHproductions

Awesome! I think you could save a few bytes with a built-in: a=>[...Array(a*a).keys()].filter(b=>b&&!(Math.hypot(a,b)%1))

@ETHproductions thx, I need to learn more about the new math builtins

Conveniently they're also discussed on the page you already linked. (I would have made the hypot suggestion myself but I wasn't logged in at the time.)

C, 96 bytes
Alternately increment y (the other leg) and z (the hypotenuse) until their difference drops to 1. Output every exact match (c==0) you encounter on the way.
int x,y,z;main(int c,char**a){for(x=z=atoi(a[1]);++y<z;c=x*x+y*y-z*z,c?z+=c>0:printf("%d ",y));}

Call the compiled program with n as parameter; it will output a space-separated list of decimal numbers.
Obviously not the shortest; I may find comfort in having the fastest.
$ time ./pyth 9999
200 2020 13332 13668 16968 44440 45360 54540 55660 137532 164832 168168 413080 494900 504900 617120 1514832 1851468 4544540 5554440 16663332 49990000
real    0m0.846s
user    0m0.800s
sys     0m0.000s

88 bytes

Wolfram Language (Mathematica), 40 bytes
b/.Solve[#^2+b^2==c^2,PositiveIntegers]&

I'm using an undocumented form of Solve: when the list of variables is omitted, then Solve defaults to solving for all symbols in the expression. We thus save 6 bytes over the more regular Solve[#^2+b^2==c^2,{b,c},PositiveIntegers].
PositiveIntegers is new in version 12 of Mathematica and thus not available in TIO. In desktop Mathematica, we get
F = b/.Solve[#^2+b^2==c^2,PositiveIntegers]& ;

F[5]
(*    {12}    *)

F[28]
(*    {21, 45, 96, 195}    *)

F[101]
(*    {5100}    *)

F[1001]
(*    {168, 468, 660, 2880, 3432, 4080, 5460, 6468, 10200, 38532, 45540, 71568, 501000}    *)

Python 2, 53 bytes
lambda n:[i for i in range(1,n*n)if abs(i+n*1j)%1==0]

A straightforward solution using complex abs to compute the length of the hypotenuse. It's safe to use n*n as an upper bound for the other leg because (n*n)^2 + n^2 < (n*n+1)^2. I tried using recursion instead but didn't get anything shorter.

Seriously, 20 bytes
,;╗ªDR;`╜@ÇA1@%Y`M@░

Same strategy as xnor's Python answer: check i in range(1,n*n) for values where abs(i+nj) % 1 == 0, and output the list. Try it online
Explanation:
,;╗    get input and save a copy in register 0
ªDR;   push two copies of range(1,n*n)
`╜@ÇA1@%Y`M    map the function across one of the ranges:
    ╜@ÇA         compute abs(i+nj)
    1@%Y         push 1 if result % 1 is 0, else 0
M@░    swap the two lists, take values in the original range where the corresponding values in the second range are truthy

PARI/GP, 36 bytes
x->[y|y<-[1..x^2],issquare(x^2+y^2)]

APL(NARS), 373 chars, 746 bytes
C←{h←{0=k←⍺-1:,¨⍵⋄(k<0)∨k≥i←≢w←⍵:⍬⋄↑,/{w[⍵],¨k h w[(⍳i)∼⍳⍵]}¨⍳i-k}⋄1≥≡⍵:⍺h⍵⋄⍺h⊂¨⍵}⋄P←{1≥k←≢w←,⍵:⊂w⋄↑,/{w[⍵],¨P w[a∼⍵]}¨a←⍳k}⋄d←{∪×/¨{k←≢b←1,π⍵⋄∪{b[⍵]}¨↑∪/101 1‼k k}⍵}⋄t←{(-/k),(×/2,⍵),+/k←⍵*2}⋄b←{⍬≡a←3 C d w←⍵:(⊂1,⍵,1)⋄(⊂1,⍵,1),a/⍨{⍵[2]>⍵[3]}¨a←↑∪/P¨,a/⍨{w=×/⍵}¨a}⋄u←{(↑⍵),2÷⍨(+/a),-/a←1↓⍵}⋄t1←{(↑¨⍵)×t¨1↓¨⍵}⋄f1←{0=2∣⍵:↑¨t1 b⍵÷2⋄{2⊃⍵}¨t1 u¨b⍵}⋄f←{m←⎕ct⋄⎕ct←0⋄r←f1⍵⋄⎕ct←m⋄r}

comment:
C: ⍺ combination in ⍵ list
P: permutations  in ⍵ list
d: divisors of ⍵ unsigned
t: Pythagorian triple from ⍵ list 2 unsigned
b: if argument ⍵ is one unsigned it would return the list of (k,i,j) where
   k,i,j are all divisors of ⍵, and ⍵=k×i×j and i>j
u: from one triple (k,i,j) return (k,(i+j)/2,(i-j)/2)
t1: apply (k,i,j) to t in the way  k×t i,j
f: the function of this exercise

The idea would be factor the input for to know the possible m,n that generate using t all Pythagorian triple
that has the input as leg. Test:
  f 18298292829831839x
167413760243137645229428509060960 15219432749376149566311682641900 99808869980900940
  1383584795397831778755607512840
  f 5
12
  f 28
195 96 21 45
  f 101
5100
  f 1001
501000 6468 38532 2880 468 660 168 5460 45540 4080 71568 3432 10200
  ≢f 1001
13
  f 1663481166348349x
1383584795397831778755607512900
  f 198820182831x
19764732550476133587280 346749693868002343608 5664631173992 6083327962596530720 613900915408 115583231289334114460
  18249983887789596492 1883559626820 1040249081604007030900 54749951663368790920 6588244183492044529092
  265093577108 2196081394497348176360

APL (Dyalog Extended), 15 14 bytesSBCS
Anonymous tacit prefix function.
(⍸⊢(+∊⊢)⍳×⍳)×⍨

Try it online!
×⍨ square (lit. multiplication selfie of) the argument
(…) apply the following anonymous tacit function:
 ⍳ ɩntegers 1 through the argument
 ⍳ multiply by ɩntegers 1 through the argument (i.e. square)
 ⊢(…) apply the following anonymous tacit function with the argument as left argument:
  + is the sum
  ∊ a member of
  ⊢ it?
 ⍸ ɩndices of truths

Perl 5, 43 bytes
$i=<>;{sqrt(++$_**2+$i**2)!~/\./&&say;redo}

If you want the script to terminate, we can inspect other legs up to n² only, as explained by xnor, so we have 48 bytes:
map{sqrt(++$_**2+$i**2)!~/\./&&say}1..($i=<>)**2

Japt, 16 bytes
1oU² f@!(MhXU %1

Try it online!
How it works
        // Implicit: U = input integer
1oU²    // Generate a range of integers from 1 to U squared.
f@!(    // Keep only items X that return falsily to:
MhXU %1 //  Math.hypot(X,U) % 1.
        // This keeps only the items where sqrt(X*X+U*U) = 0.
        // Implicit: output last expression

Stax, 8 bytes
î←■↑»⌐╚â

Run and debug it
In pseudo-code:
(1..n²).filter(d -> is-square(n² + d²))

05AB1E, 10 bytes
nDLn+Å²ƶ0K

Try it online or verify all test cases.
nDLʒnIn+Å²

Try it online or verify all test cases.
Explanation:
n           # Take the square of the (implicit) input-integer
 D          # Duplicate it
  L         # Create a list in the range [1, input^2]
   n        # Square each value in this list
    +       # Add the input^2 we duplicated to each
     Å²     # Check for each of these if it's a square (1 if truthy; 0 if falsey)
       ƶ    # Multiply each value by its 1-based index
        0K  # Remove all 0s from the list
            # (after which the result is output implicitly)

nDL         # Same as above
   ʒ        # Filter this list by:
    n       #  Get the square of the current number
     In+    #  Add the squared input to it
        Å²  #  And check if it's a square
            # (after the filter, implicitly output the result)

Java 8, 72 bytes
n->{for(int i=0;++i<n*n;)if(Math.hypot(i,n)%1==0)System.out.println(i);}

Try it online.
Explanation:
n->{                           // Method with integer as parameter and no return-type
  for(int i=0;++i<n*n;)        //  Loop `i` in the range (0, n²)):
    if(Math.hypot(i,n)         //   If sqrt(i² + n²)
       %1==0)                  //   has no decimal digits after the comma (so is an integer)
      System.out.println(i);}  //    Output `i` with trailing newline

MathGolf, 9 bytes
²╒gÆ²k²+°

Try it online!
Couldn't find a nice way to remove any of the ²s, which take up 3/9 bytes. Otherwise it is quite straight-forward
Explanation
²           square input
 ╒          range(1,n+1)
  gÆ        filter list using next 5 operators
    ²       square list element
     k²     push input squared
       +    pop a, b : push(a+b)
        °   is perfect square

source: Stack Exchange

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

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

sort: votes


text:
Seven's Cycle Sum Sequence
Take a look at the sevens multiplication table from 7×0 to 7×9:
0, 7, 14, 21, 28, 35, 42, 49, 56, 63

If we just look at the digits in the one's place we get a permutation of the digits 0 through 9:
0, 7, 4, 1, 8, 5, 2, 9, 6, 3

Consider taking some positive decimal integer N and replacing each digit D in N with the the digit in the one's place of 7×D.
For example, 15209 becomes 75403 because 1 maps to 7, 5 maps to 5, 2 maps to 4, 0 maps to 0, and 9 maps to 3.
Now lets repeat this process with this new decimal integer until we see a cycle, i.e. until an integer we've already seen comes up.
For example, with 15209 we get the cycle
15209 -> 75403 -> 95801 -> 35607 -> 15209 -> repeats...
                                      ^
                                      |
                             cycle restarts here

As another example, 505 has the short cycle
505 -> 505 -> repeats...
        ^
        |
cycle restarts here

It turns out that for any N these cycles will always contain exactly 1 or 4 distinct integers. (I'll leave it to you to figure out why that is.) What's interesting is that if you sum all the distinct integer in a cycle, you almost always get a decimal integer that only consists of 2's and 0's.
For example, 15209 + 75403 + 95801 + 35607 = 222020.
N = 505 is one of the exceptions. The only integer in the cycle is 505 so the total sum is 505 itself.
Here are the sums of the cycles for N = 1 to 60:
N sum
1 20
2 20
3 20
4 20
5 5
6 20
7 20
8 20
9 20
10 200
11 220
12 220
13 220
14 220
15 220
16 220
17 220
18 220
19 220
20 200
21 220
22 220
23 220
24 220
25 220
26 220
27 220
28 220
29 220
30 200
31 220
32 220
33 220
34 220
35 220
36 220
37 220
38 220
39 220
40 200
41 220
42 220
43 220
44 220
45 220
46 220
47 220
48 220
49 220
50 50
51 220
52 220
53 220
54 220
55 55
56 220
57 220
58 220
59 220
60 200
We'll call this the Seven's Cycle Sum Sequence.
Challenge
Write a program or function that takes in a positive decimal integer N and prints or returns, in decimal, the corresponding term of the Seven's Cycle Sum Sequence.
For example, if the input is 95801, the output should be 222020. If the input is 505, the output should be 505. If the input is 54, the output should be 220.
The shortest code in bytes wins.

Of course, if you take the numbers from the one-cycles and multiply them by four, you'll find that all of them give numbers whose only digits are 2 and 0.

Pyth, 14 bytes
s.uieM*R7jNTTQ

Not sure, why everybody determines the result by looking at patterns in the numbers. Simply doing the process, calculating all numbers of the circle and summing them up is shorter. At least in Pyth ;-)
Try it online: Demonstration or Test Suite
Btw, this is my 200th code-golf answer. So this post earns me the Gold code-golf badge.
Explanation:
s.uieM*R7jNTTQ   implicit: Q = input number
 .u          Q   apply the following expression to N=Q until it reaches a circle
         jNT        convert N to base 10
      *R7           multiply each digit with 7
    eM              and perform modulo 10 for each number
   i        T       convert digits from base 10 to a number
                    update N
                 .u returns the list of all intermediate results of N,
                 so we have now all numbers of the circle
s                sum them up

Code... wait for it... golf! :) Congrats, and nice use of .u

Python 2, 69 bytes
lambda n:[''.join('02'[x>'0']for x in`n`)+'0',n][set(`n`)<=set('05')]

The function is simple to describe:

If n consists of only 0's and 5's, output it unchanged.
Otherwise, replace each digit of n with 2, except 0 stays 0, and tack on a 0 to the end.

The golfing can be improved, I'm mostly posting to share the method. A language with native regex should allow a short solution.
An alternative statement of the function is

In n, replace each digit with a 5, except 0 stays as 0
If this changed n (it had a digit other than 0 or 5), multiply the result by 4

Python 2, 63 bytes
lambda s:s.strip('05')and''.join(`(c>'0')*2`for c in s)+'0'or s

Input argument is expected to be a string.

Wow, I had no idea strip behaved this way.

Come on, type conversions (string ↔ number) are a substantial part of the fun (i.e. code length ;o)!

CJam, 16 bytes
Using the same algorithm as everyone else:
r_50s-{:~2fe&0}&

Test suite. (Generates all results from 1 to the input.)
Explanation
r_      e# Read input and duplicate
50s     e# Push the string "50".
-       e# Remove all '5' and '0' characters from the input.
{       e# If any characters remained in the input...
  :~    e#   Evaluate each digit character to turn it into an integer.
  2fe&  e#   Map (&& 2) over the list. Due to short-circuiting, zeros remain zeros and
        e#   everything else becomes 2.
  0     e#   Push a trailing zero.
}&

JavaScript (ES6), 54 51 bytes
Using xnor's method:
n=>/[^05]/.test(n)?`${n}0`.replace(/./g,d=>+d&&2):n

Saved 3 bytes thanks to @charlie!
Explanation
n=>
  (s=n+"").match`[^05]`          // if there are any digits which aren't 5 or 0
    ?s.replace(/\d/g,d=>+d&&2)+0 //     replace every digit except 0 with 2 then add a 0
  :s                             // else return the input unchanged

Test

<input type="number" id="input" value="0" oninput='result.textContent=(

n=>(s=n+"").match`[^05]`?s.replace(/\d/g,d=>+d&&2)+0:s

)(+input.value)' />

Naive method, 102 bytes
n=>(c=x=>~r.indexOf(x+=m="")?eval(r.join`+`):[...r[++i]=x].map(d=>m+="0741852963"[d])&&c(m))(n,i=r=[])

n=>
  (c=x=>                  // c = recursive function
    ~r.indexOf(           // if we have calculated this number before
      x+=m="")?           // cast x to a string, m = calculated result
        eval(r.join`+`):  //     return the sum of all the calculated numbers
    [...r[++i]=x].map(d=> // else add x to the list of calculated numbers
      m+="0741852963"[d]  // map each digit of x to the "seven" digits
    )&&c(m)               // calculate the value of the result
  )(n,i=r=[])             // r = array of previously calculated values

<input type="number" id="input" value="0" oninput='result.textContent=(

n=>(c=x=>~r.indexOf(x+=m="")?eval(r.join`+`):[...r[++i]=x].map(d=>m+="0741852963"[d])&&c(m))(n,i=r=[])

)(+input.value)' />

51 bytes: n=>/[^05]/.test(n)?\${n}0`.replace(/./g,d=>+d&&2):n`

40 bytes: n=>n-(s=\${n}`.replace(/[^0]/g,5))?s*4:n`

@charlie Wow, that s*4 trick is awesome! I reckon you should post this as a separate answer because the method is different enough and it's so much shorter than mine. :)

ok, i humbly will ;o)

Mathematica, 83 77 60 characters
Tr@Union@NestList[FromDigits@Mod[7IntegerDigits@#,10]&,#,4]&

Ungolfed
Tr@
  Union@
   NestList[
    FromDigits@Mod[7 IntegerDigits@#, 10] &,
    #,
    4
   ] &

JavaScript (ES5), 40 bytes
n=>(s=`${n}`.replace(/[^0]/g,5))^n?s*4:n

It's an evolution of the user81655's solution, using the alternative approach described by xnor.
Explanation
Sum of a non-zero digit in the 4-cycle is always 20, since the digit cycles either through 1→7→9→3, or 2→4→8→6, or 5→5→5→5. So replacing every such a digit with 5 doesn't change the sum.
That replacement action is reused to distinguish the 4-cycle from 1-cycle — if the replacement result is different from the input, then it's a 4-cycle, otherwise it's a 1-cycle.
N.B.: The template string `${n}` is just for readability, (n+'') has the same length.

no regexp -- 47 bytes: n=>(s=[...\${n}`].map(d=>+d&&5).join``)^n?s*4:n`

sed, 26 bytes
/[^05]/{s/[^0]/2/g;s/$/0/}
(Another take on the "replace by 2's" approach.)
Examples
echo '500' | sed '/[^05]/{s/[^0]/2/g;s/$/0/}' → 500
echo '501' | sed '/[^05]/{s/[^0]/2/g;s/$/0/}' → 2020

Perl 6,  68 55 53 36  33 bytes

{[+] $^a,{[~] $^b.comb.map: {'0741852963'.comb[$_]}}...^{$++*?/$a/}} # 68

{$_=@=$_.comb;[~] (@$_,(|.map(2*?+*),0))[$_⊈qw<0 5>]} # 55

{[~] ($_=@=$_.comb)⊆qw<0 5>??@$_!!(|.map(2*?+*),0)} # 53

{/^<[05]>+$/??$_!!S:g/./{2*?+$/}/~0} # 36

{m/^<[05]>+$/||S:g/./{2*?+$/}/~0} # 33

This is definitely the wrong way to do this, if the number is consists only of 5s and 0s it will return a Match object, otherwise it replaces everything but 0 with a 2, and append a 0 to the end.
( The Match object will behave like a number if you use it as one )
Though since it is doing it wrong, it makes it easy to point out the rare numbers by calling the gist method.
usage:
# give it a name
my &code = {...}

.say for (0..60,505,15209).flat.map({ code($_).gist.fmt: '%4s' }).rotor(1,10 xx 6,:partial)

( ｢0｣)
(  20   20   20   20  ｢5｣   20   20   20   20  200)
( 220  220  220  220  220  220  220  220  220  200)
( 220  220  220  220  220  220  220  220  220  200)
( 220  220  220  220  220  220  220  220  220  200)
( 220  220  220  220  220  220  220  220  220 ｢50｣)
( 220  220  220  220 ｢55｣  220  220  220  220  200)
(｢505｣)
(222020)

Jelly, 9 bytes
D×7%⁵ƊƬḌS

Try it online!
How it works
D×7%⁵ƊƬḌS - Main link. Takes an integer n on the left
D         - Convert to digits
     ƊƬ   - Repeat the following until a value is repeated and collect all intermediate values:
 ×7       -   Multiply each digit by 7
   %⁵     -   Take the ones digit
       Ḍ  - Convert each list of digits back to a number
        S - Take the sum

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


text:
Bacon's cipher: An Intro to Steganography
This little piggy went to market, this little piggy wrote some code...
Ah wait, we're not talking about that bacon, we're talking about Sir Francis Bacon! Specifically, the cipher Bacon devised in the late 1500s, as a method of hiding a message within another message, a method of steganography.
The cipher works by concealing the message in the presentation of text, rather than its content. First, the letters of your message are encoded into binary (from 0 to 25) as follows:
Note: Please use the following encoding in your code and do not worry about numbers, spaces, or other symbols in the input, though I may devise some bonus for those who include these characters in their encoding. If you do include other symbols, the letters must still occupy spaces 0-25 in the encoding.
Letter  Encoding
A       AAAAA
B       AAAAB
C       AAABA
D       AAABB
E       AABAA
F       AABAB
G       AABBA
H       AABBB
I       ABAAA
J       ABAAB
K       ABABA
L       ABABB
M       ABBAA
N       ABBAB
O       ABBBA
P       ABBBB
Q       BAAAA
R       BAAAB
S       BAABA
T       BAABB
U       BABAA
V       BABAB
W       BABBA
X       BABBB
Y       BBAAA
Z       BBAAB

Having encoded all of the letters in your message into the As and Bs above, you must now select two typefaces for your code. For this example, I will use normal text for typeface A and bold text for typeface B.
So the message
HELLOWORLD

is encoded to
AABBB AABAA ABABB ABABB ABBBA BABBA ABBBA BAAAB ABABB AAABB

And now we conceal this binary with a carrier text.

The quick brown fox jumps over the lazy dogs, gamboling in the fields where the shepherds keep watch.

It is alright if the carrier message is longer than the actual encoded message, though it cannot be shorter. Now we turn the carrier text into bold according to where the Bs are in the encoded message,

The quick brown fox jumps over the lazy dogs, gamboling in the fields where the shepherds keeps watch.

Which without Markdown reads as
Th**e** **qu**ic**k** bro**w**n **fo**x **j**u**mp**s **ove**r **t**h**e** **l**az**y**
**do**g**s**, gam**b**o**l**i**ng** in t**he** fields where the shepherds keeps watch.

Note that I did not use the punctuation in the carrier message to encode the message, but whether the punctuation is encoded or not is up to you/.
Rules

Your input will be the message you to be encoded and a carrier message. If the carrier message is too short, return some sort of error message.
You must select two typefaces for encoding A and B, such as UPPERCASE, lowercase, italic, bold, bold italic, strikethrough, in code format and so on. You must use Stack Exchange's form of Markdown to encode these typefaces, i.e.
UPPERCASE, lowercase, *italic*, **bold**,
***bold italic***, <s>strikethrough</s>, `in code format`

Your output must be your now-encoded carrier message, either shown with Markdown or shown without, as seen in the above example.
You are only required to make an encoding algorithm. Any decoding algorithms you wish to provide are welcome, but at time of writing will not help or hinder your score.
Your code must be a program or a function.
This is code golf, so the smallest number of bytes wins.

As always, if the problem is unclear, please let me know. Good luck and good golfing!

So really there's no reason not to use upper/lowercase, since everything else costs more bytes

I think there's a typo in "we're not talking about that bacon", because surely you were talking about Kevin Bacon, so the "b" should be capitalised, right?

Pyth, 47 bytes
Vsm.[05jxGd2r~zw0#I}Jr@z~Z+1Z0GBpJ)p?NrJ1J;>zZ

Try it here.
Explanation:
             ~zw                               - Get the first line of input and
                                               - set z to the next line
            r   0                              - Turn it to lower case
  m                                            - Map each character
        xGd                                    - Get it's position in the alphabet
       j   2                                   - Turn it to base 2
   .[05                                        - Pad the start with 0's
 s                                             - Turn it to a 1d-array (flatten it)
V                                        ;     - For N in above array:
                 #                )            - While 1:
                      @z~Z+1Z                  - Get the current position in the
                                               - second line and increment the position
                    Jr       0                 - Set J to it lowercased
                  I}          GB               - If it's a letter, break
                                pJ             - Otherwise, print it
                                    ?N         - Is the character code
                                               - (the current 1d-array) 1
                                      rJ1      - Get the current char uppered
                                         J     - Leave it lowered
                                   p           - Print the character
                                           >zZ - Print out the rest of the second input

Python 3, 216 211 231 225 207 bytes
This is a solution that uses normal text and Markdown-style italics for its two typefaces. And it encodes everything in the carrier message except the spaces.
Edit: Had to fix the code so that the result would print correctly and added examples below the code.
Edit: Edited the code to previously worse uppercase/lowercase solution, due to problems in printing the italics correctly.
def g(s,c):
 c=c.lower();w=[h.upper()for h in s if h.isalpha()];t=''.join("{:05b}".format(ord(i)-65)for i in w);r='';j=m=0
 while t[j:]:a=c[m];x=a!=" ";r+=[a,a.upper()][x*int(t[j])];j+=x;m+=1
 return r+c[m:]

Examples
>>> g('HELLOWORLD', 'The quick brown fox jumps over the lazy dogs, gamboling in the fields
where the shepherds keep watch')
'thE QUicK broWn FOx JuMPs OVEr ThE LazY DOgS, gaMbOlINg in THe fields where the shepherds keep watch'

Ungolfed:
def bacon(message, carrier):
    # Lowers the case of the carrier message
    carrier = carrier.lower()
    # Removing all non-alphabetic characters and making the rest uppercase
    words = ""
    for char in message:
        if char.isalpha():
            words += char.upper()
    # Encoding the message
    binary = ""
    for letter in words:
        encode = ord(letter) - 65
        binary += "{:05b}".format(encode)
    # Encoding the carrier message
    result = ""
    bin_index = 0
    char_index = 0
    while bin_index < len(binary):
        letter = carrier[char_index]
        # If letter isn't a space and it needs to be encoded
        if letter != " " and int(binary[bin_index]):
            letter = letter.upper()
        result += type + letter + type
        # The encoding only proceeds if letter wasn't a space
        bin_index += letter != " "
        # char_index increments whether or not letter was alphabetical
        char_index += 1
    # Return the encoded text and any leftover characters from the carrier message
    return result + carrier[char_index : ]

C, 124 bytes

This requires the arguments to be in an ASCII-compatible encoding (e.g. ISO-8859.1 or UTF-8).  It modifies the carrier in-place, and returns 0 on success, or non-zero otherwise.  The encoding is A==lower-case and B==upper-case.  Unused carrier letters are set to upper.
int f(char*p,char*s){int m=16;do{if(isalpha(*s)){*s|=32;*s-=(*p-1)&m?32:0;if(!(m/=2)){m=16;p+=!!*p;}}}while(*++s);return*p;}

Explanation
Including a test program.  Pass the letters to encode as the first argument, and the carrier string as the second.
#include <stdio.h>
#include <ctype.h>

/* ASCII or compatible encoding assumed */
int f(char *p, char *s)         /* plaintext, carrier */
{
    int m=16;                   /* mask */
    do {
        if (isalpha(*s)) {
            *s |= 32;
            *s -= (*p-1)&m ? 32 : 0;
            if (!(m/=2)) {
                /* reset mask and advance unless we reached the end */
                m=16;
                p+=!!*p;
            }
        }
    } while (*++s);

    /* 0 (success) if we finished p, else non-zero */
    return *p;
}

int main(int argc, char **argv)
{
    int r = argc < 3 || f(argv[1], argv[2]);
    if (r)
        puts("~!^%&$+++NO CARRIER+++");
    else
        puts(argv[2]);
    return r;
}

Test output:
$ ./66019 "HELLOWORLD" "The quick brown fox jumps over the lazy dogs, gamboling in the fields where the shepherds keep watch."
thE QUicK broWn FOx JuMPs OVEr ThE LazY DOgS, gamBoLiNG in tHE FIELDS WHERE THE SHEPHERDS KEEP WATCH.

105 bytes


text:
Counting icons for Innovation splays
Innovation is a card game where players battle through the ages, from prehistory to modern times, in an attempt to earn achievements faster than their opponents.
Each card in Innovation is unique, and provides a player with a number of icons. If we treat each card as a 2x3 grid, then three of the four slots on the left and bottom edges will always been taken up by icons (the symbols in black hexagons are not counted).

The game has 6 types of icons (castles, crowns, leaves, lightbulbs, factories and clocks), which we will represent arbitrarily using the chars 012345. Using # to represent the black hexagon, we can use four chars to represent the icons on each card. For example, the cards above are
0.. #.. 3.. 1..  -> 03#0 #331 355# 144#
3#0 331 55# 44#

Now, in Innovation, cards in the play area are grouped into piles* which are splayed in one of four ways. For each example we'll use the cards above, assuming the leftmost card, 03#0, is at the top of the pile.
No splay: only the top card is visible
0..
3#0

Splay left: the top card is fully visible, as well as the right third of all cards below
0..|.|.|.|
3#0|1|#|#|

Splay right: the top card is fully visible, as well as the left third of all cards below
1|3|#|0..
4|5|3|3#0

Splay up: the top card is fully visible, as well as the bottom half of all cards below.
0..
3#0
---
331
---
55#
---
44#

The challenge
Input will be a single space-separated string consisting of two parts:

A splay direction, which is one of !<>^, representing no splay, splay left, splay right or splay up respectively.
A non-empty list of cards, each of which is 4 characters long and consisting of the chars 012345#. The leftmost card is at the top of the pile, and each card contains exactly one #.

Answers may be functions, full programs or equivalent. You may choose whether the splay direction is first or last, i.e. choose one of the two formats below:
> 03#0 #331 355# 144#
03#0 #331 355# 144# >

Output will be a list of six numbers representing the count for each icon, e.g. for the example cards above:
! 03#0 #331 355# 144#  ->  2 0 0 1 0 0
< 03#0 #331 355# 144#  ->  2 1 0 1 0 0
> 03#0 #331 355# 144#  ->  2 1 0 3 1 1
^ 03#0 #331 355# 144#  ->  2 1 0 3 2 2

For instance, the no splay case had two 0 icons and one 3 icon showing, giving the first line. Note that we don't count #s, since the black hexagons aren't icons.
You may choose any reasonable and non-ambiguous way of representing the list, e.g. delimiter-separated or using your language's natural list representation.
Test cases
! 113#  ->  0 2 0 1 0 0
< 113#  ->  0 2 0 1 0 0
> 113#  ->  0 2 0 1 0 0
^ 113#  ->  0 2 0 1 0 0
! 000# 12#2  ->  3 0 0 0 0 0
< 000# 12#2  ->  3 0 1 0 0 0
> 000# 12#2  ->  3 1 1 0 0 0
^ 000# 12#2  ->  3 0 2 0 0 0
! 000# 111# 222#  ->  3 0 0 0 0 0
< 000# 111# 222#  ->  3 0 0 0 0 0
> 000# 111# 222#  ->  3 2 2 0 0 0
^ 000# 111# 222#  ->  3 2 2 0 0 0
! 335# #101 21#2 333# 2#20 3#33 4#54 #133 3#33 32#2  ->  0 0 0 2 0 1
< 335# #101 21#2 333# 2#20 3#33 4#54 #133 3#33 32#2  ->  1 1 2 5 1 1
> 335# #101 21#2 333# 2#20 3#33 4#54 #133 3#33 32#2  ->  0 3 3 7 1 1
^ 335# #101 21#2 333# 2#20 3#33 4#54 #133 3#33 32#2  ->  2 4 4 10 1 2

Note that something like ! is invalid input, since the list is guaranteed to be non-empty.

* For the purposes of this challenge, we're ignoring pile colours.

CJam, 44 37 36 bytes
Thanks to Sp3000 for reminding me that I'm overcomplicating things and saving 7 bytes.
rci7%"3>0<2<1>"2/=6,slS%{W$~+}*fe=p;

Test it here.
Explanation
Some observations:

We always want to count the entire first card.
All splays will result in either a prefix or a suffix of the icons removed. ! removes all of them (which is either a prefix or a suffix of four characters), < removes the first three characters, > removes the last two characters, ^ removes the first character.

So all we need is a short way to map the splay mode to the correct truncation:
rci   e# Read the splay mode and convert to its character code.
7%    e# Take modulo 7. This maps "<!>^" to [4 5 6 3], respectively. Modulo 4 those are
      e# are all distinct (namely [0 1 2 3], respectively).
"3>0<2<1>"
      e# Push this string.
2/    e# Split it into chunks of 2, ["3>" "0<" "2<" "1>"]. Each chunk is CJam code which
      e# performs one of the truncations.
=     e# Select the correct snippet. This works, because array indexing is cyclic in CJam.
6,s   e# Push the string "012345".
lS%   e# Read the remainder of the input and split into space-separated tokens.
{     e# Now we're abusing the fold operation to apply our snippet to every card except
      e# the first, while also combining them all back into a single string.
  W%  e#   Copy the bottom of the stack (the truncation snippet).
  ~   e#   Evaluate it.
  +   e#   Append it the string we're building.
}*
fe=   e# For each character in "012345", count the occurrences in our new string.
p     e# Pretty-print the array.
;     e# Discard the truncation snippet which was still at the bottom of the stack.

We can notice that the truncation snippets actually have a lot of structure. Each splay mode maps to one number in [0 1 2 3] (specifically, in order "!^><"), and two of them have > and two have <. I was hoping to find two hashes which magically produce these parts separately, as that would save a bunch of bytes, but so far I wasn't able to find anything. I can map "!^><" to numbers of alternating parity with 31% (to select the correct character from "<>"), but I haven't found anything which neatly maps them [0 1 2 3] in that order. (Except the naive solution of "!^><"# which unfortunately doesn't save any bytes.)
Also note that it's actually a bit more flexible. ! can also be implemented as n> for any n > 3 (discarding everything as a prefix). Unfortunately, I haven't been able to find any simple function for such a map either.

Pyth, 39 36 33 31 bytes
Jtczdm/s+hJm@yk%*%Chz33T19tJ`d6

Try it online. Test suite.
Explanation

Jtczd: split input by spaces, remove the first part, and save the rest to J.
m…6: repeat the following for numbers 0 to 5.

m…tJ: repeat the following for all cards except for the first one.

Chz: get the code point of the first character in the input.
%*%…33T19: map the code points of !<>^ (33, 60, 62, 94) to the numbers 0, 4, 5, 14. The exact calculation performed is cp % 33 * 10 % 19.
yk: get the powerset of the current card. This is a list of all subsequences of the card.
@: get the item of the powerset corresponding to the index calculated before.

+hJ: append the first card to the result.
s: concatenate the processed cards together.
/…`d: count the occurrences of the current number in the result.


text:
Converging Sums of a Fractal Sequence
Background
A fractal sequence is an integer sequences where you can remove the first occurrence of every integer and end up with the same sequence as before.
A very simple such sequence is called Kimberling's paraphrases. You start with the positive natural numbers:
1, 2, 3, 4, 5, 6, 7, 8, 9, ...

Then you riffle in some blanks:
1, _, 2, _, 3, _, 4, _, 5, _, 6, _, 7, _, 8, _, 9, ...

And then you repeatedly fill in the blanks with the sequence itself (including the blanks):
1, 1, 2, _, 3, 2, 4, _, 5, 3, 6, _, 7, 4, 8, _, 9, ...
1, 1, 2, 1, 3, 2, 4, _, 5, 3, 6, 2, 7, 4, 8, _, 9, ...
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, _, 9, ...
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, ...

That's our fractal sequence! Now let's take the partial sums:
1, 2, 4, 5, 8, 10, 14, 15, 20, 23, 29, 31, 38, 42, 50, 51, 60, ...

But what if we iterate this process? "Fractalise" the new sequence (i.e. the partial sums obtained from the steps above):
1, _, 2, _, 4, _, 5, _, 8, _, 10, _, 14, _, 15, _, 20, _, 23, ...
1, 1, 2, _, 4, 2, 5, _, 8, 4, 10, _, 14, 5, 15, _, 20, 8, 23, ...
1, 1, 2, 1, 4, 2, 5, _, 8, 4, 10, 2, 14, 5, 15, _, 20, 8, 23, ...
1, 1, 2, 1, 4, 2, 5, 1, 8, 4, 10, 2, 14, 5, 15, _, 20, 8, 23, ...
1, 1, 2, 1, 4, 2, 5, 1, 8, 4, 10, 2, 14, 5, 15, 1, 20, 8, 23, ...

And take the partial sums again:
1, 2, 4, 5, 9, 11, 16, 17, 25, 29, 39, 41, 55, 60, 75, 76, 96, ...

Rinse, repeat. It turns out that this process converges. Every time you repeat this process, a larger prefix of the sequence will remain fixed. After an infinite amount of iterations, you would end up with OEIS A085765.
Fun fact: This process would converge to the same sequence even if we didn't start from the natural numbers as long as the original sequence starts with 1. If the original sequence starts with any other x, we'd obtain x*A085765 instead.
The Challenge
Given a positive integer N, output the Nth element of the converged sequence.
You may write a program or function, taking input via STDIN (or closest alternative), command-line argument or function argument and outputting the result via STDOUT (or closest alternative), function return value or function (out) parameter.
You may choose whether the index N is 0- or 1-based.
Test Cases
The sequence starts with:
1, 2, 4, 5, 9, 11, 16, 17, 26, 30, 41, 43, 59, 64, 81, 82, 108, 117, 147, 151, 192, 203, 246, 248, 307, 323, 387, 392, 473, 490, 572, 573, 681, 707, 824, 833, 980, 1010, 1161, 1165, 1357, 1398, 1601, 1612, 1858, 1901, 2149, 2151, 2458, 2517

So input 5 should result in output 9.
Here is a naive CJam reference implementation which generates the first N numbers (given N on STDIN). Note that your code should only return the Nth element, not the entire prefix.

So just checking: we are outputting the Nth term of A085765, correct?

@GamrCorps Yes.

CJam (23 22 bytes)
The partial sums are given at the even indexes of the fractal sequence, which is A086450. The recurrence given there as the definition of A086450 is the basis for these implementations.
Using an explicit "stack" (in scare quotes because it's not LIFO):
{),){2md~)\),>+$)}h+,}

Online demo
Dissection
{         e# Anonymous function body; for clarify, pretend it's f(x)
          e# We use a stack [x_0 ... x_i] with invariant: the result is sum_j f(x_j)
  ),      e# Initialise the stack to [0 ... x]
  )       e# Uncons x, because our loop wants one value outside the stack
  {       e# Loop. Stack holds [x_0 ... x_{i-1}] x_i
    2md   e# Split x_i into (x_i)/2 and (x_i)%2
    ~)\   e# Negate (x_i)%2 and flip under (x_i)/2
    ),>   e# If x_i was even, stack now holds [x_0 ... x_{i-1}] [0 1 ... (x_i)/2]
          e# If x_i was odd, stack now holds [x_0 ... x_{i-1}] [(x_i)/2]
    +     e# Append the two arrays
    $     e# Sort to get the new stack
    )     e# Uncons the greatest element in the new stack
  }h      e# If it is non-zero, loop
          e# We now have a stack of zeroes and a loose zero
  +,      e# Count the total number of zeroes, which is equivalent to sum_j f(0)
}

At 23 bytes there's a much more efficient approach, with memoisation:
{2*1a{2md~)\){j}%>:+}j}

Online demo

I'm sure there are some languages in which it would be shorter to implement as f(0) = 1; f(n) = f(n/2) + (n % 2 ? 0 : f(n-2)); return f(2*x), but I can't find a way to get a saving with that approach in CJam.

Python 2, 55 49 42
I have no idea what's going on, but it seems hard to beat the Maple formula from the OEIS page.
This uses 0-based indexing.
f=lambda n,t=0:n<1or f(n/2,n%2)-~-t*f(n-1)

Thanks to @PeterTaylor for -6 bytes.

It's easy to optimise by 6 chars if you don't care about performance. The parts after the first or are effectively g(n,1) = f(n/2,n%2); g(n,0) = f(n-1) + g(n,1); so you can pull out the common g(n,1) to get f=lambda n,t=0:n<1or f(n/2,n%2)+0**t*f(n-1)

Haskell, 65
s l=[0..]>>=(\i->[l!!i,s l!!i])
r=1:(tail$scanl1(+)$s r)
f n=r!!n

Templates Considered Harmful, 124
Fun<If<A<1>,Add<Ap<Fun<Ap<If<Sub<A<1>,Mul<I<2>,Div<A<1>,I<2>>>>,A<0>,A<0,1>>,Div<A<1>,I<2>>>>,A<1>>,Ap<A<0>,Sub<A<1>,T>>>,T>>

This is an anonymous function. It's more or less the same as  my Python answer the Maple formula on the OEIS page, except that I didn't implement modulus, so I had to use n-n/2*2 instead of n%2.
Expanded:
Fun<If<
    A<1>,
    Add<
        Ap<
            Fun<Ap<
                If<
                    Sub<
                        A<1>,
                        Mul<
                            I<2>,
                            Div<A<1>,I<2> >
                        >
                    >,
                    A<0>,
                    A<0,1>
                >,
                Div<A<1>,I<2>>
            >>,
            A<1>
        >,
        Ap<
            A<0>,
            Sub<A<1>, T>
        >
    >,
    T
>>

Mathematica, 47 44 bytes
If[#<1,1,#0[Floor@#/2]+(1-2#~Mod~1)#0[#-1]]&

Matlab 108 103
I am using the fact that the desired series is the partial sum of https://oeis.org/A086450
But the computation complexity of my implementation is far from optimal, even for this simple recurrence.
n=input('')+1;
z=zeros(1,n);z(1)=1;
for k=1:n;
z(2*k)=z(k);
z(2*k+1)=sum(z(1:k+1));
end;
disp(sum(z(1:n)))


text:
Basic Latin character name to character
Let's get back to basics!

Your code, a complete program or function, must convert the official Unicode name of a printable Basic Latin character into the corresponding character. For example, for the input LOW LINE your code must output _.
You only need to take a single character name as input.
You cannot use any preexisting function or library, built-in or otherwise, which offers any logic relating specifically to Unicode character names (e.g. Python's unicodedata, Java's Character.getName, and so on.)
For input other than one of these names, any behavior is acceptable.

This is code golf: shortest code in bytes wins.
To avoid any ambiguity, this is the full set of official character names we'll be using (borrowed from this question):
     SPACE
!    EXCLAMATION MARK
"    QUOTATION MARK
#    NUMBER SIGN
$    DOLLAR SIGN
%    PERCENT SIGN
&    AMPERSAND
'    APOSTROPHE
(    LEFT PARENTHESIS
)    RIGHT PARENTHESIS
*    ASTERISK
+    PLUS SIGN
,    COMMA
-    HYPHEN-MINUS
.    FULL STOP
/    SOLIDUS
0    DIGIT ZERO
1    DIGIT ONE
2    DIGIT TWO
3    DIGIT THREE
4    DIGIT FOUR
5    DIGIT FIVE
6    DIGIT SIX
7    DIGIT SEVEN
8    DIGIT EIGHT
9    DIGIT NINE
:    COLON
;    SEMICOLON
<    LESS-THAN SIGN
=    EQUALS SIGN
>    GREATER-THAN SIGN
?    QUESTION MARK
@    COMMERCIAL AT
A    LATIN CAPITAL LETTER A
B    LATIN CAPITAL LETTER B
C    LATIN CAPITAL LETTER C
D    LATIN CAPITAL LETTER D
E    LATIN CAPITAL LETTER E
F    LATIN CAPITAL LETTER F
G    LATIN CAPITAL LETTER G
H    LATIN CAPITAL LETTER H
I    LATIN CAPITAL LETTER I
J    LATIN CAPITAL LETTER J
K    LATIN CAPITAL LETTER K
L    LATIN CAPITAL LETTER L
M    LATIN CAPITAL LETTER M
N    LATIN CAPITAL LETTER N
O    LATIN CAPITAL LETTER O
P    LATIN CAPITAL LETTER P
Q    LATIN CAPITAL LETTER Q
R    LATIN CAPITAL LETTER R
S    LATIN CAPITAL LETTER S
T    LATIN CAPITAL LETTER T
U    LATIN CAPITAL LETTER U
V    LATIN CAPITAL LETTER V
W    LATIN CAPITAL LETTER W
X    LATIN CAPITAL LETTER X
Y    LATIN CAPITAL LETTER Y
Z    LATIN CAPITAL LETTER Z
[    LEFT SQUARE BRACKET
\    REVERSE SOLIDUS
]    RIGHT SQUARE BRACKET
^    CIRCUMFLEX ACCENT
_    LOW LINE
`    GRAVE ACCENT
a    LATIN SMALL LETTER A
b    LATIN SMALL LETTER B
c    LATIN SMALL LETTER C
d    LATIN SMALL LETTER D
e    LATIN SMALL LETTER E
f    LATIN SMALL LETTER F
g    LATIN SMALL LETTER G
h    LATIN SMALL LETTER H
i    LATIN SMALL LETTER I
j    LATIN SMALL LETTER J
k    LATIN SMALL LETTER K
l    LATIN SMALL LETTER L
m    LATIN SMALL LETTER M
n    LATIN SMALL LETTER N
o    LATIN SMALL LETTER O
p    LATIN SMALL LETTER P
q    LATIN SMALL LETTER Q
r    LATIN SMALL LETTER R
s    LATIN SMALL LETTER S
t    LATIN SMALL LETTER T
u    LATIN SMALL LETTER U
v    LATIN SMALL LETTER V
w    LATIN SMALL LETTER W
x    LATIN SMALL LETTER X
y    LATIN SMALL LETTER Y
z    LATIN SMALL LETTER Z
{    LEFT CURLY BRACKET
|    VERTICAL LINE
}    RIGHT CURLY BRACKET
~    TILDE

Does the program only need to handle one character name?  For example, should COLON COLON output :: , or undefined behaviour?

Edited to clarify.

Why is String.fromCharCode forbidden?

Whoops, I misunderstood what that function does.

How must we handle invalid input, like CLON ?

See the fourth bullet point.

Invalid Perl 5 (breaks rule #3): perl -lpe '$_=eval"\"\\N{$_}\""' = 20 + 2 = 22

IA-32 machine code, 161 160 122 bytes
Hexdump of the code:
33 c0 6b c0 59 0f b6 11 03 c2 b2 71 f6 f2 c1 e8
08 41 80 79 01 00 75 ea e8 39 00 00 00 08 2c 5e
4a bd a3 cd c5 90 09 46 04 06 14 40 3e 3d 5b 23
60 5e 3f 2d 31 32 29 25 2e 3c 7e 36 39 34 33 30
21 2f 26 7d 7c 2c 3b 7b 2a 37 5d 22 35 20 3a 28
5c 27 2b 38 5f 24 5a 3c 34 74 17 3c 1a 74 16 33
c9 86 c4 0f a3 0a 14 00 41 fe cc 75 f6 8a 44 02
0e c3 8a 01 c3 8a 01 04 20 c3

This code uses some hashing. By some brute-force search, I found that the following hash function can be applied to the bytes of the input string:
int x = 0;
while (s[1])
{
    x = (x * 89 + *s) % 113;
    ++s;
}

It multiplies x by 89, adds the next byte (ASCII-code), and takes a remainder modulo 113. It does this on all bytes of the input string except the last one, so e.g. LATIN CAPITAL LETTER A and LATIN CAPITAL LETTER X give the same hash code.
This hash function has no collisions, and the output is in the range 0...113 (actually, by luck, the range is even narrower: 3...108).
The hash values of all relevant strings don't fill that space completely, so I decided to use this to compress the hash table. I added a "skip" table (112 bits), which contains 0 if the corresponding place in the hash table is empty, and 1 otherwise. This table converts a hash value into a "compressed" index, which can be used to address a dense LUT.
The strings LATIN CAPITAL LETTER and LATIN SMALL LETTER give hash codes 52 and 26; they are handled separately. Here is a C code for that:
char find(const char* s)
{
    int hash = 0;
    while (s[1])
    {
        hash = (hash * 89 + *s) % 113;
        ++s;
    }

    if (hash == 52)
        return *s;
    if (hash == 26)
        return *s + 32;

    int result_idx = 0;
    int bit = 0;
    uint32_t skip[] = {0x4a5e2c08, 0xc5cda3bd, 0x04460990, 0x1406};
    do {
        if (skip[bit / 32] & (1 << bit % 32))
            ++result_idx;
        ++bit;
    } while (--hash);

    return "@>=[#`^?-12)%.<~69430!/&}|,;{*7]\"5 :(\\'+8_$"[result_idx];
}

The corresponding assembly language code (MS Visual Studio inline-assembly syntax):
_declspec(naked) char _fastcall find(char* s)
{
    _asm {
        xor eax, eax;
    mycalc:
        imul eax, eax, 89;
        movzx edx, [ecx];
        add eax, edx;
        mov dl, 113;
        div dl;
        shr eax, 8;
        inc ecx;
        cmp byte ptr [ecx + 1], 0;
        jne mycalc;

        call mycont;
        // skip table
        _asm _emit 0x08 _asm _emit 0x2c _asm _emit 0x5e _asm _emit 0x4a;
        _asm _emit 0xbd _asm _emit 0xa3 _asm _emit 0xcd _asm _emit 0xc5;
        _asm _emit 0x90 _asm _emit 0x09 _asm _emit 0x46 _asm _emit 0x04;
        _asm _emit 0x06 _asm _emit 0x14;
        // char table
        _asm _emit '@' _asm _emit '>' _asm _emit '=' _asm _emit '[';
        _asm _emit '#' _asm _emit '`' _asm _emit '^' _asm _emit '?';
        _asm _emit '-' _asm _emit '1' _asm _emit '2' _asm _emit ')';
        _asm _emit '%' _asm _emit '.' _asm _emit '<' _asm _emit '~';
        _asm _emit '6' _asm _emit '9' _asm _emit '4' _asm _emit '3';
        _asm _emit '0' _asm _emit '!' _asm _emit '/' _asm _emit '&';
        _asm _emit '}' _asm _emit '|' _asm _emit ',' _asm _emit ';';
        _asm _emit '{' _asm _emit '*' _asm _emit '7' _asm _emit ']';
        _asm _emit '"' _asm _emit '5' _asm _emit ' ' _asm _emit ':';
        _asm _emit '(' _asm _emit '\\' _asm _emit '\'' _asm _emit '+';
        _asm _emit '8' _asm _emit '_' _asm _emit '$';

    mycont:
        pop edx;
        cmp al, 52;
        je capital_letter;
        cmp al, 26;
        je small_letter;

        xor ecx, ecx;
        xchg al, ah;
    decode_hash_table:
        bt [edx], ecx;
        adc al, 0;
        inc ecx;
        dec ah;
        jnz decode_hash_table;

        mov al, [edx + eax + 14];
        ret;

    capital_letter:
        mov al, [ecx];
        ret;

    small_letter:
        mov al, [ecx];
        add al, 32;
        ret;
    }
}

Some noteworthy implementation details:

It uses a CALL instruction to get a pointer to the code, where the hard-coded table resides. In 64-bit mode, it could use the register rip instead.
It uses the BT instruction to access the skip table
It manages to do the work using only 3 registers eax, ecx, edx, which can be clobbered - so there is no need to save and restore registers
When decoding the hash table, it uses al and ah carefully, so that at the right place ah is decreased to 0, and the whole eax register can be used as a LUT index

JavaScript ES6, 228 236 247 257 267 274 287
Note: 7 chars saved thx @ev3commander
Note 2: better than JAPT after 7 major edits,
n=>n<'L'?"XC!DO$MP&OS'SK*N--FU.ZE0TW2HR3OU4FI5IX6EI8NI9EM;LS=R->IA@MF^AV`MM,NE1EN7LO:".replace(/(..)./g,(c,s)=>~n.search(s)?n=c[2]:0)&&n:'~  / ;  |?"\\ ) }]_+ #% < ( {['[(n<'Q')*13+n.length-(n>'T')-4]||n[21]||n[19].toLowerCase()

Run the snippet to test

F=n=>
  n<'L'?"XC!DO$MP&OS'SK*N--FU.ZE0TW2HR3OU4FI5IX6EI8NI9EM;LS=R->IA@MF^AV`MM,NE1EN7LO:"
  .replace(/(..)./g,(c,s)=>~n.search(s)?n=c[2]:0)&&n:
  '~  / ;  |?"\\ ) }]_+ #% < ( {['[(n<'Q')*13+n.length-(n>'T')-4]
  ||n[21]||n[19].toLowerCase()

//TEST
console.log=x=>O.innerHTML+=x+'\n'
;[
['&','AMPERSAND'],
['\'','APOSTROPHE'],
['*','ASTERISK'],
['^','CIRCUMFLEX ACCENT'],
[':','COLON'],
[',','COMMA'],
['@','COMMERCIAL AT'],
['8','DIGIT EIGHT'],
['5','DIGIT FIVE'],
['4','DIGIT FOUR'],
['9','DIGIT NINE'],
['1','DIGIT ONE'],
['7','DIGIT SEVEN'],
['6','DIGIT SIX'],
['3','DIGIT THREE'],
['2','DIGIT TWO'],
['0','DIGIT ZERO'],
['$','DOLLAR SIGN'],
['=','EQUALS SIGN'],
['!','EXCLAMATION MARK'],
['.','FULL STOP'],
['`','GRAVE ACCENT'],
['>','GREATER-THAN SIGN'],
['-','HYPHEN-MINUS'],
['A','LATIN CAPITAL LETTER A'],
['B','LATIN CAPITAL LETTER B'],
['C','LATIN CAPITAL LETTER C'],
['D','LATIN CAPITAL LETTER D'],
['E','LATIN CAPITAL LETTER E'],
['F','LATIN CAPITAL LETTER F'],
['G','LATIN CAPITAL LETTER G'],
['H','LATIN CAPITAL LETTER H'],
['I','LATIN CAPITAL LETTER I'],
['J','LATIN CAPITAL LETTER J'],
['K','LATIN CAPITAL LETTER K'],
['L','LATIN CAPITAL LETTER L'],
['M','LATIN CAPITAL LETTER M'],
['N','LATIN CAPITAL LETTER N'],
['O','LATIN CAPITAL LETTER O'],
['P','LATIN CAPITAL LETTER P'],
['Q','LATIN CAPITAL LETTER Q'],
['R','LATIN CAPITAL LETTER R'],
['S','LATIN CAPITAL LETTER S'],
['T','LATIN CAPITAL LETTER T'],
['U','LATIN CAPITAL LETTER U'],
['V','LATIN CAPITAL LETTER V'],
['W','LATIN CAPITAL LETTER W'],
['X','LATIN CAPITAL LETTER X'],
['Y','LATIN CAPITAL LETTER Y'],
['Z','LATIN CAPITAL LETTER Z'],
['a','LATIN SMALL LETTER A'],
['b','LATIN SMALL LETTER B'],
['c','LATIN SMALL LETTER C'],
['d','LATIN SMALL LETTER D'],
['e','LATIN SMALL LETTER E'],
['f','LATIN SMALL LETTER F'],
['g','LATIN SMALL LETTER G'],
['h','LATIN SMALL LETTER H'],
['i','LATIN SMALL LETTER I'],
['j','LATIN SMALL LETTER J'],
['k','LATIN SMALL LETTER K'],
['l','LATIN SMALL LETTER L'],
['m','LATIN SMALL LETTER M'],
['n','LATIN SMALL LETTER N'],
['o','LATIN SMALL LETTER O'],
['p','LATIN SMALL LETTER P'],
['q','LATIN SMALL LETTER Q'],
['r','LATIN SMALL LETTER R'],
['s','LATIN SMALL LETTER S'],
['t','LATIN SMALL LETTER T'],
['u','LATIN SMALL LETTER U'],
['v','LATIN SMALL LETTER V'],
['w','LATIN SMALL LETTER W'],
['x','LATIN SMALL LETTER X'],
['y','LATIN SMALL LETTER Y'],
['z','LATIN SMALL LETTER Z'],
['{','LEFT CURLY BRACKET'],
['(','LEFT PARENTHESIS'],
['[','LEFT SQUARE BRACKET'],
['<','LESS-THAN SIGN'],
['_','LOW LINE'],
['#','NUMBER SIGN'],
['%','PERCENT SIGN'],
['+','PLUS SIGN'],
['?','QUESTION MARK'],
['"','QUOTATION MARK'],
['\\','REVERSE SOLIDUS'],
['}','RIGHT CURLY BRACKET'],
[')','RIGHT PARENTHESIS'],
[']','RIGHT SQUARE BRACKET'],
[';','SEMICOLON'],
['/','SOLIDUS'],
[' ','SPACE'],
['~','TILDE'],
['|','VERTICAL LINE'],
].forEach(t=>{
  var r=F(t[1]),ok=r==t[0]
  //if (!ok) // uncomment to see just errors
  console.log(r+' ('+t[0]+') '+t[1]+(ok?' OK':' ERROR'))
})
console.log('DONE')

Just... how? Well done.

Actually, besides the alphabet, there is no char starting with "LA"

@ev3commander yes, but here I manage LAT, RIG and LEF and 2 chars seems too few, having LEFT and LESS

Ohh. I just skimmed and didn't see the RIG/LEF part.

@ev3commander on second thought you have a point! I can merge handling LESS and LEFT and save 4 bytes. Thx

Japt, 230 bytes
V=U¯2;Ug21 ªU<'R©Ug19 v ªV¥"DI"©`ze¿twâ¿¿¿¿e¿i`u bUs6,8)/2ªUf"GN" ©"<>+=$#%"g`¤grp¤qºnupe`u bV /2 ªUf"T " ©"[]\{}()"g"QSUCAP"bUg6) ªUf" M" ©"!\"?"g"COE"bUg2) ªV¥"CO"©",:@"g"ANE"bUg4) ª" &'*-./\\;~^`_|"g`spaµpÂ¿è±¢¿Èögrlove`u bV /2

Each ¿ represents an unprintable Unicode char. Try it online!
Ungolfed:
V=Us0,2;Ug21 ||U<'R&&Ug19 v ||V=="DI"&&"zeontwthfofisiseeini"u bUs6,8)/2||Uf"GN" &&"<>+=$#%"g"legrpleqdonupe"u bV /2 ||Uf"T " &&"[]\{}()"g"QSUCAP"bUg6) ||Uf" M" &&"!\"?"g"COE"bUg2) ||V=="CO"&&",:@"g"ANE"bUg4) ||" &'*-./\\;~^`_|"g"spamapashyfusoreseticigrlove"u bV /2

This was really fun. I've split up the character names into several large chunks:
0. Take first two letters
V=Us0,2; sets variable V to the first two letters of U, the input string. This will come in handy later.
1. Capital letters
This is the easiest: the capital letters are the only ones that have a character at position 21, which all happen to be the correct letter and case. Thus, Ug21 is sufficient.
2. Lowercase letters
Another fairly easy one; the only other name that has a character at position 19 is RIGHT SQUARE BRACKET, so we check if the name is comes before R with U<'R, then if it is (&&), we take the 19th char with Ug19 and cast it to lowercase with v.
3. Digits
These names all start with DI (and fortunately, none of the others), so if V=="DI", we can turn it into a digit. The first letters of some of the digits' names are the same, but the first two letters are sufficient. Combining these into one string, we get ZEONTWTHFOFISISEEINI. Now we can just take the index b of the first two chars in the digit's name with Us6,8)and divide by two.
4. SIGN
There are seven names that contain SIGN:
<    LESS-THAN SIGN
>    GREATER-THAN SIGN
+    PLUS SIGN
=    EQUALS SIGN
$    DOLLAR SIGN
#    NUMBER SIGN
%    PERCENT SIGN

First we check that it the name contains the word SIGN. It turns out GN is sufficient; Uf"GN" returns all instances of GN in the name, which is null if it contains 0 instances, and thus gets skipped.
Now, using the same technique as with the digits, we combine the first two letters into a string LEGRPLEQDONUPE, then take the index and divide by two. This results an a number from 0-6, which we can use to take the corresponding character from the string <>+=$#%.
5. MARK
There are three characters that contain MARK:
!    EXCLAMATION MARK
"    QUOTATION MARK
?    QUESTION MARK

Here we use the same technique as with SIGN.  M is enough to differentiate these three from the others. To translate to a symbol, this time checking one letter is enough: the character at position 2 is different for all three characters. This means we don't have to divide by two when choosing the correct character.
6. LEFT/RIGHT
This group contains the brackets and parentheses, []{}(). It would be really complicated to capture both LEFT and RIGHT, but fortunately, they all contain the string T . We check this with the same technique as we did with SIGN. To translate to a symbol, as with MARK, checking one letter is enough; the character at position 6 is unique for all six.
7. CO
The rest of the chars are pretty unique, but not unique enough. Three of them start with CO: COMMA, COLON, and COMMERCIAL AT. We use exactly the same technique as we did with the brackets, choosing the proper symbol based on the character at position 4 (A, N, or E).
8. Everything else
By now, the first two characters are different for every name. We combine them all into one big string SPAMAPASHYFUSORESETICIGRLOVE and map each pair to its corresponding char in  &'*-./\;~^`_|.
9. Final steps
Each of the parts returns an empty string or null if it's not the correct one, so we can link them all from left to right with ||. The || operator returns the left argument if it's truthy, and the right argument otherwise. Japt also has implicit output, so whatever the result, it is automatically sent to the output box.
Questions, comments, and suggestions welcome!

Great answer and great explanation. But you forgot to mention the handling or MARK (!?") in the explanation

@edc65 Whoops, thanks! I've added in a section on MARK chars.

spamapashyfusoreseticigrlove = Spam a pashy for so reset icy girl love ... +1

No, that's very much still golfed.

Python 2, 237 bytes
Get the hash of the string and modulo divide it by 535. Subsequently convert it to a unicode character with that number. The position of the unicode character in a precompiled list of unicode characters is subsequently converted to the ascii character.
print chr(u"""ǶŀȎdȊÏöǖIhȏƜǓǱǠƣƚǆƩC+ĶÅĠěóƋŎªƱĳůŰűŪūŬŭŶŷŸŹŲųŴŵžſƀƁźŻżŽƆƇƈŖÐŗǀǼǿǾǹǸǻǺȅȄȇȆȁȀȃȂǭǬǯǮǩǨǫǪǵǴǷNȌ~B""".index(unichr(hash(raw_input())%535))+32)

Javascript, 501 499 469 465 451 430 bytes
a=prompt();c="5SACEgEARKeQARKbNIGNbDIGNcPIGN9AANDaAPHEgLSIShRSIS8AISK9PIGN5CMMAcHNUS9FTOP7SDUSaDERO9DONE9DTWObDREEaDOURaDIVE9DSIXbDVENbDGHTaDINE5CLON9SLONeLIGNbEIGNhGIGNdQARKdC ATjLKETfRDUSkRKEThCENT8LINEcGENTiLKETdVINEjRKET5TLDE".match(/.{5}/g).indexOf(a.length.toString(36)+a[0]+a.slice(-3));if(c>=33)c+=26;if(c>=65)c+=26;alert(a.length==20&&a[0]=="L"?a.slice(-1).toLowerCase():a.length>21?a.slice(-1):String.fromCharCode(32+c))

Explanation:
That long string is a compressed list. a.length.toString(36)+a[0]+a.slice(-3) determines how, if at all, the string will be represented in the list. Also, special logic for letters. (with strings, a[0] is a builtin shorthand for a.charAt(0), by the way)

If you replaced _ with +, you could Base64-compress the list.

@ETHproductions base64 makes things longer, not shorter.

@ETHproductions Does Javascript have Base64?

@SuperJedi224 Yes it does, but Blacklight is correct unless the base 64 is replacing a number that could have been expressed in a lower base, especially binary.

You can use btoa("abc") to compress text by 25% (as long as it is valid base-64 text, which it would be after replacing _ with -), then atob("compressed stuff") in your actual code.

If you have a string containing only base64 symbols, you can use base64 decoding to obtain a string of chars in range 0..255 that will be shorter. It's difficult to manage here at SO because some chars (code 0..31 and 128...159) are not handled by SO editor

atob compression example http://codegolf.stackexchange.com/questions/32151/convert-1-2-3-4-5-6-7-8-and-9-to-one-two-three-etc/32163#32163

PowerShell, 603 547 464 bytes
$a=-split$args
$b=switch -W($a[0]){
"LEFT"{switch -w($a[1]){"C*"{"{"}"P*"{"("}"S*"{"["}}}
"RI*"{switch -w($a[1]){"C*"{"}"}"P*"{")"}"S*"{"]"}}}
"LA*"{("$($a[3])".ToLower(),$a[3])[$a[1]-like"C*"]}
"DI*"{@{ONE=1;TWO=2;THREE=3;FOUR=4;FIVE=5;SIX=6;SEVEN=7;EIGHT=8;NINE=9;ZERO="0"}[$a[1]]}
"COMME*"{"@"}
"APO*"{"'"}
}
$c='COM,LES<GRA`GRE>QUE?QUO"COL:REV\LOW_EXC!EQU=DOL$AMP&AST*PER%PLU+SEM;SOL/SPA CIR^HYP-FUL.NUM#TIL~VER|'
($b,$c[$c.IndexOf($a[0][0..2]-join'')+3])[!$b]

(LineFeed counts the same one byte as ;, so I'll leave the breaks in for readability)
Edit 1 - Took many elements out of the switch statement and instead populated a hashtable for lookups.
Edit 2 - Oh yeah ... indexing into a string, that's the way to go ...
Essentially takes the input, splits it on spaces, and does a wildcard switch on the first word to filter out the goofy ones. Sets the result of that to $b. If $b doesn't exist, the string $c gets evaluated on the first three letters of the first word and outputs the character immediately following, otherwise we output $b.
Some tricks include the LATIN CAPITAL LETTER R which indexes into an array based on whether the second word is CAPITAL, and outputs the corresponding uppercase/lowercase letter. The other "trick" is for the DIGITs, by indexing into a hashtable. Note that it's not shorter to do the same index-into-a-string trick here (it's actually longer by one byte).

I'm beating you again.

Javascript, 416 411 389 bytes
l=(E)=>{return E=E.replace(/LA.*N|BR.*T|SIGN|MARK| |TION/g,"").replace(/(.).*(.{3})/,"$1$2"),E.match("CER")?E[3]:E.match("SER")?E[3].toLowerCase():(a="SACE EAMA!QOTA\"NBER#DLAR$PENT%AAND&APHE'AISK*PLUS+CMMA,HNUS-FTOP.SDUS/CLON:SLON;LHAN<EALS=GHAN>QUES?CLAT@RDUS\\CENT^LINE_GENT`VINE|LSIS(RSIS)LARE[RARE]LRLY{RRLY}TLDE~DERO0DONE1DTWO2DREE3DOUR4DIVE5DSIX6DVEN7DGHT8DINE9",a[a.indexOf(E)+4])}

This is a more readable format(explanation coming later):
function l(k){
    k=k.replace(/LA.*N|BR.*T|SIGN|MARK| |TION/g,'').replace(/(.).*(.{3})/,'$1$2')
    if(k.match('CER')) return k[3];
    if(k.match('SER')) return k[3].toLowerCase();
    a="SACE EAMA!QOTA\"NBER#DLAR$PENT%AAND&APHE'AISK*PLUS+CMMA,HNUS-FTOP.SDUS/CLON:SLON;LHAN<EALS=GHAN>QUES?CLAT@RDUS\\CENT^LINE_GENT`VINE|LSIS(RSIS)LARE[RARE]LRLY{RRLY}TLDE~DERO0DONE1DTWO2DREE3DOUR4DIVE5DSIX6DVEN7DGHT8DINE9"
    return a[a.indexOf(k)+4];
}

Minus 5 bytes from combining key and value strings.
Explanation: The regular expressions on the first line reduce the inputs into unique 4 character keys. Note that uniqueness is only guaranteed for the specific set of names specified in the challenge, and duplicates would be very common for normal English! Even for this challenge, I had to remove common words like bracket and sign to get a unique set.
To return the character, I check to see if it's a latin character by check for the strings "SER" and "cer", and return the last character of the input, in lowercase for ser.
For everything else, I refer to a string that contains all of the 4 character keys, followed by the correct character. I then use indexof and substring character indices to pull and return the character.
Edit: Used more wildcards to reduce regex size, replaced substr with character indices and shaved off antoher twenty chars. Rule sticklers will note that this final update is posted after the challenge has ended, however I don't think it changed my ranking. This is just practice for a novice.

Python 3, 148 bytes
lambda s:chr(83-b'gfhtg\32}urgx_}3qeo|e~cwu~S~q~I,vqG\34jc}d*9~~_L|p~~~~~JJy'[sum(b'  !" *1! "2;D$# ! # !!( '[ord(c)%25]-32for c in s[:-1])]+ord(s[-1]))

For your viewing convenience, I’ve replaced two non-printable bytes with the octal escape codes \32 and \34; undo this to get the 148 byte function.
I computed parts of this hash function with GPerf.

Perl 6,  348  242 bytes

{
  /NI/??9!!chr 32+
  '0A40W00SV0M20LR0O20IJ0LH0WH0YS0H20ID0A50P10IH0F70K10HF0I30LL0JX0JF0HX0LU0LE0JF0AJ0IX0RK0M40XF0QR0PD15Z16016116216316416516616716816916A16B16C16D16E16F16G16H16I16J16K16L16M16N16O1140V313F0XS0FU0N712A12B12C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q12R12S12T12U12V12W12X12Y12Z0ZA0PU11L0AA'
  .comb(3).map({:36($_)}).first(:k,[+] .ords)
} # 348

{chr 32+"\x95ǐǠŬšƉĘŗȌȴĎĽ\x96ŖŁöģěĈśŊčĂĹŔĸ¤ĦƱŮȃƿƍʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊʠʡʢʣʤɝǚʅǥâĿʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛɱɲɳɴɵțųɃ\x9b".ords.first: :k,[+] .ords.map(*%43)}

{
  chr 32+
  "\x95ǐǠŬšƉĘŗȌȴĎĽ\x96ŖŁöģěĈśŊčĂĹŔĸ¤ĦƱŮȃƿƍʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊʠʡʢʣʤɝǚʅǥâĿʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛɱɲɳɴɵțųɃ\x9b"
  .ords.first: :k,[+] .ords.map(*%43)
}

usage:
my &code = {...}

# testing
my $test = [~] (' '..'~')».uniname».&code;
my $comparison = [~] ' '..'~';
say $test eq $comparison; # True

say code 'HYPHEN-MINUS'; # -


text:
¿xu ti te gismytermorna? (Is it a valid gismu?)
(Literally: "Does this follow/realize the gismu-form?")
Premise
The language Lojban is a constructed language, meaning in part that all of its words have been created rather than allowed to develop naturally. The semantic base of Lojban are its gismu, or root words, which were synthesized by combining roots from widely spoken natural languages like Chinese, Hindi, and English. All gismu are 5 letters long and follow a certain strict form.
Information
For our purposes, the Lojban alphabet is:
abcdefgijklmnoprstuvxz

That is, the Roman alphabet without hqwy.
This alphabet can be divided into four categories:

Vowels aeiou
Sonorant consonants lmnr
Unvoiced consonants ptkfcsx. When voiced, these become respectively the...
Voiced consonants bdgvjz (No voiced consonant corresponds to x.)

To be a valid gismu, a 5-char-long string must:

Be in one of the consonant-vowel patterns CVCCV or CCVCV, where C represents a consonant, and V represents a vowel.
Follow consonant-matching rules.

Consonant-matching rules for CCVCV words:
The first two characters must constitute one of the following 48 pairs (source):
ml mr
pl pr
bl br
   tr                   tc ts
   dr                   dj dz
kl kr
gl gr
fl fr
vl vr
cl cr cm cn cp ct ck cf
      jm    jb jd jg jv
sl sr sm sn sp st sk sf
      zm    zb zd zg zv
xl xr

Note that this looks rather nicer when separated into voiced and unvoiced pairs. In particular, every voiced-voiced pair is valid iff the corresponding unvoiced-unvoiced pair is valid. This does not extend to pairs with a sonorant consonant; cl is valid but jl is not.
Consonant-matching rules for CVCCV words (source):
The third and fourth characters must follow the following rules:

It is forbidden for both consonants to be the same [...]
It is forbidden for one consonant to be voiced and the other unvoiced. The consonants “l”, “m”, “n”, and “r” are exempt from this
  restriction. As a result, “bf” is forbidden, and so is “sd”, but both
  “fl” and “vl”, and both “ls” and “lz”, are permitted.
It is forbidden for both consonants to be drawn from the set “c”, “j”, “s”, “z”.
The specific pairs “cx”, “kx”, “xc”, “xk”, and “mz” are forbidden.

Note that there are 179 possible pairs.
Challenge
Determine if the given string follows the gismu formation rules. This is code-golf, so the shortest solution in bytes wins.
Input: A string of length 5 from the Lojban alphabet.
Output: A truthy value if the string can be a gismu and a falsey value otherwise.
Test cases
Valid:
gismu
cfipu
ranxi
mupno
rimge
zosxa

Invalid:
ejram
xitot
dtpno
rcare
pxuja
cetvu

More test cases: this text file contains all valid gismu, one per line.
I don't really know Lojban, so I suspect the title translation is wrong. Help is appreciated.

Note that Lojban pronunciation is phonetic, so gismu is pronounced with a hard g, like in GIF.

I don't know if that's a good example, because the official pronunciation of GIF is like Jiff. :p

Side question: Since both s and k are part of the language, what pronunciation does c has?

@Fatalize the unvoiced version of j would be ch in English, so I assume it is that. The letter C is used for the CH sound in Malay, so the words "capati" and "antiseptik" sound exactly like their English equivalents "chapati" and "antiseptic". Source: holidays in Malaysia

@Fatalize: It's "sh".

@Deusovi it seems you are right. The reason I got it wrong is because j is not pronounced as English J, but rather as French J (without the plosive at the beginning.) From one of the linked pages The regular English pronunciation of “James”, which is [dʒɛjmz], would Lojbanize as “djeimz.”, which contains a forbidden consonant pair......[additional rule to avoid this] so we see that the plosive D needs to be added in. The unvoiced version of French J is indeed SH. The IPA symbols (for those who understand them) are on the wikipedia page.

tag kolmogorow-complexity?

I think a better translation for the title might be just .i xu gismu, or if you want to preserve the "valid" part maybe .i xu drani loka gismu [kei fo lotu'a jboge'a].

@Doorknob冰 I think "gismu" implies that it's one of the actual words that have been assigned meaning—but let me do some more research.

Ah, right, I didn't consider that. You're probably right (I'm still only a learner). .ui

Ruby, 302 252 bytes
c='[cjsztdpbfvkgxmnlr]'
v=c+'[aeiou]'
z=!1
n=/#{c+v+v}/=~(s=gets.chop)*2
(n==0||n==2)&&289.times{|k|q=[i=k%17,j=k/17].max
z||=(x=s[n,2])==c[j+1]+c[i+1]&&['UeUeJOJOJOJOETJ
:'[i].ord-69>>j&1-j/14>0,i!=j&&q>3&&(k%2<1||q>12)&&!'mzxcxkx'.index(x)][n/2]}
p z

A few more bytes could be saved as follows:
Initialize z to false using z=!c='[cjsztdpbfvkgxmnlr]'. This works but gives the warning warning: found = in conditional, should be ==.
Change from a program to a function (I left it as a program because according to the question, shortest "program" in bytes wins.)
Summary of changes from first post
Major overhaul of regex/matching part.
Constant 72 changed to 69 so that the lowest ASCII code in the magic string is 10 instead of 13. This enables a literal newline to be used in the golfed version instead of an escape sequence.
Magic string 'mzxcxkx' replaces arithmetic rules for the 5 prohibited characters in the CVCCV type table.
ungolfed version
added whitespace and changed newline in magic string to a \n
c='[cjsztdpbfvkgxmnlr]'                                   #c=consonants
v=c+'[aeiou]'                                             #v=consonant+vowel
z=!1                                                      #Set z to false (everything is truthy in Ruby except nil and false.)
n=/#{c+v+v}/=~(s=gets.chop)*2                             #Get input and duplicate it. do regex match, n becomes the index of the double consonant.
(n==0||n==2)&&                                            #If n==0 (ccvcv) or n==2 (cvccv)
   289.times{|k|                                          #iterate 17*17 times
     q=[i=k%17,j=k/17].max                                #generate row and column, find their maximum.
     z||=                                                 #OR z with the following expression:
     (x=s[n,2])==c[j+1]+c[i+1]&&                          #double consonant == the pair corresponding to j,i AND either
       ["UeUeJOJOJOJOETJ\n:"[i].ord-69>>j&1-j/14>0,       #this expression or
       i!=j&&q>3&&(k%2<1||q>12)&&!'mzxcxkx'.index(x)][n/2]#this expresson, depending on the value of n/2
   }
p z                                                       #print output

Explanation of matching
The two characters in the input string s[n,2]are compared with the character pair of the iterating loop. If they match and the consonant-vowel regex pattern is correct, the row and column values i,j are checked for validity. Careful ordering of the consonants helps here.
For CVCCV:
i!=j                        It is forbidden for both consonants to be the same
(k%2<1||q>12)               It is forbidden for one consonant to be voiced and the other unvoiced. The consonants “l”, “m”, “n”, and “r” are exempt from this restriction. As a result, “bf” is forbidden, and so is “sd”, but both “fl” and “vl”, and both “ls” and “lz”, are permitted.
q>3                         It is forbidden for both consonants to be drawn from the set “c”, “j”, “s”, “z”.
!'mzxcxkx'.index(x)         The specific pairs “cx”, “kx”, “xc”, “xk”, and “mz” are forbidden.

For CCVCV
A bitmap for each column of the table below is encoded into the magic string, from which 69 is subtracted. For all columns except the last two, only 6 bits are required. For the last two, the higher order bits need to be 1, so a negative number is generated (characters \n and :) in order to have leading 1's instead of leading zeroes. We don't want to include the last three rows of the table though, so instead of rightshift and ANDing by 1, we rightshift and AND by 1-j/14 which normally evaluates to 1, but evaluates to 0 for the last 3 rows.
The following program (with the same expressions as the submission) was used to generate the tables below (uncomment whichever if line is required for the table you want.
c='[cjsztdpbfvkgxmnlr]'
z=0
289.times{|k|
  q=[i=k%17,j=k/17].max
  r=c[j+1]+c[i+1]
  #if i!=j && q>3 && (k%2<1||q>12) && !'mzxcxkx'.index(r)
  #if "UeUeJOJOJOJOETJ\n:"[i].ord-69>>j&1-j/14>0
    print r,' '
    z+=1
  else
    print '   '
  end
  i==16&&puts
}
puts z

            ct    cp    cf    ck       cm cn cl cr
               jd    jb    jv    jg    jm jn jl jr
            st    sp    sf    sk    sx sm sn sl sr
               zd    zb    zv    zg    zm zn zl zr
tc    ts          tp    tf    tk    tx tm tn tl tr
   dj    dz          db    dv    dg    dm dn dl dr
pc    ps    pt          pf    pk    px pm pn pl pr
   bj    bz    bd          bv    bg    bm bn bl br
fc    fs    ft    fp          fk    fx fm fn fl fr
   vj    vz    vd    vb          vg    vm vn vl vr
kc    ks    kt    kp    kf             km kn kl kr
   gj    gz    gd    gb    gv          gm gn gl gr
      xs    xt    xp    xf             xm xn xl xr
mc mj ms    mt md mp mb mf mv mk mg mx    mn ml mr
nc nj ns nz nt nd np nb nf nv nk ng nx nm    nl nr
lc lj ls lz lt ld lp lb lf lv lk lg lx lm ln    lr
rc rj rs rz rt rd rp rb rf rv rk rg rx rm rn rl
179

            ct    cp    cf    ck       cm cn cl cr
               jd    jb    jv    jg    jm
            st    sp    sf    sk       sm sn sl sr
               zd    zb    zv    zg    zm
tc    ts                                        tr
   dj    dz                                     dr
                                             pl pr
                                             bl br
                                             fl fr
                                             vl vr
                                             kl kr
                                             gl gr
                                             xl xr
                                             ml mr

48

I changed the wording to allow functions; sorry it took so long.

JavaScript (ES6), 366 352 bytes
g=>((q=3,w=2,r=0,f="mzcscjzjxcxkx",c="bdgvjzptkfcsxlmnr",d=[...c],v="aeiou")[m="match"](g[1])?d.map((a,i)=>d.map((b,j)=>a==b|(i<6&j>5&j<13|j<6&i>5&i<13)||f[m](a+b)||(p+=","+a+b)),p="",q=0,r=w--)&&p:"jbl,zbr,tstcl,cmr,cn,cr,jdr,cfl,sfr,jgl,zgr,zdjml,ckl,skr,cpl,spr,sl,sm,sn,sr,ctr,jvl,zvr,xl,xr,dzm")[m](g[r]+g[r+1])&&c[m](g[q])&&v[m](g[w])&&v[m](g[4])

Explanation
Returns an array containing the last letter (truthy) if it is a valid gismu or null if it is not.
A lot of the size comes from the hard-coded CCVCV pairs (even after condensing them). It might be possible to find a pattern to generate them but I've spent way too much time on this already! xD
g=>
  (
    // Save the positions to check for the consonant, vowel and pair respectively
    (q=3,w=2,r=0,                       // default = CCVCV format
    f="mzcscjzjxcxkx",                  // f = all forbidden pairs for CVCCV pairs
    c="bdgvjzptkfcsxlmnr",              // c = consonants
    d=[...c],                           // d = array of consonants
    v="aeiou")                          // v = vowels
    [m="match"](g[1])?                  // if the second character is a vowel

      // Generate CC pairs of CVCCV
      d.map((a,i)=>                     // iterate over every possible pair of consonants
        d.map((b,j)=>
          a==b|                         // rule 1: consonants cannot be the same
          (i<6&j>5&j<13|j<6&i>5&i<13)|| // rule 2: pair cannot be voiced and unvoiced
          f[m](a+b)||                   // rule 3 & 4: certain pairs are forbidden
            (p+=","+a+b)                // if it follows all the rules add the pair
        ),
        p="",                           // p = comma-delimited valid CVCCV pairs
        q=0,r=w--                       // update the match positions to CVCCV format
      )&&p
    :
      // CC pairs of CCVCV (condensed so that valid pairs like "jb", "bl" and
      //     "zb" can be matched in this string but invalid pairs like "lz" cannot)
      "jbl,zbr,tstcl,cmr,cn,cr,jdr,cfl,sfr,jgl,zgr,zdjml,ckl,skr,cpl,spr,sl,sm,sn,sr,ctr,jvl,zvr,xl,xr,dzm"

  // Match the required format
  )[m](g[r]+g[r+1])&&c[m](g[q])&&v[m](g[w])&&v[m](g[4])

Test

var solution = g=>((q=3,w=2,r=0,f="mzcscjzjxcxkx",c="bdgvjzptkfcsxlmnr",d=[...c],v="aeiou")[m="match"](g[1])?d.map((a,i)=>d.map((b,j)=>a==b|(i<6&j>5&j<13|j<6&i>5&i<13)||f[m](a+b)||(p+=","+a+b)),p="",q=0,r=w--)&&p:"jbl,zbr,tstcl,cmr,cn,cr,jdr,cfl,sfr,jgl,zgr,zdjml,ckl,skr,cpl,spr,sl,sm,sn,sr,ctr,jvl,zvr,xl,xr,dzm")[m](g[r]+g[r+1])&&c[m](g[q])&&v[m](g[w])&&v[m](g[4])
<input type="text" id="input" value="gismu" />
<button onclick="result.textContent=solution(input.value)">Go</button>

Javascript ES6, 240 bytes
x=>eval(`/${(c='[bcdfgjklmnprstvxz]')+c+(v='[aeiou]')+c+v}/${t='.test(x)'}?/^[bfgkmpvx][lr]|[cs][fklmnprt]|d[jrz]|[jz][bdgmv]/${t}:/${c+v+c+c+v}/${t}?!/^..((.)\\2|${V='[bdgvjz]'}${U='[ptkfcsx]'}|${U+V}|[cjsz][cjsz]|cx|kx|xc|xk|mz)/${t}:!1`)

I guess this is my work now.