text:
Palindrome Reversal-Addition
The process of Reversal-Addition is where a number is added to it's reverse until the number created is a palindrome. For example, if we start with 68, the process would be:
$$68 + 86 \to 154 + 451 \to 605 + 506 \to 1111$$
As you can see, this took 3 additions to get to a palindromic number. If we were to start with \$89\$, we would need 24 steps (which you can see the breakdown here).
The world record for the most steps taken before a palindrome is reached is \$261\$, which occurs for the number \$1186060307891929990\$, producing a number larger than \$10^{118}\$. However, there have been quite a few numbers which we have not been able to get a palindrome. These are called Lychrel numbers.
Since we are working in base 10, we can really only call them candidates, because there exists no proof that these numbers never reach a palindrome. For example, the smallest base-10 Lychrel candidate is \$196\$, and has gone through well over a billion iterations. If the palindrome does exist, it is much larger than \$10^{10^{8.77}}\$. As comparison, if that many 1s was inscribed on atoms, we would need \$2.26772×10^{588843575}\$ universes worth of atoms to write it out, assuming it exists.
Your Task
Create a program or function that takes an integer input and returns or prints the number of steps required to reach a palindrome. You will not be required to deal with Lychrel candidates (i.e. Your program, when given a Lychrel candidate, is allowed to either throw an error or run forever).
Test Cases:
                  f(0) => 0
                 f(11) => 0
                 f(89) => 24
                f(286) => 23
          f(196196871) => 45
         f(1005499526) => 109
f(1186060307891929990) => 261

Rules

No standard loopholes.

Bonuses

If you print out each addition step, formatted n + rev(n) = m, you may multiply your score by 0.75. The sums should print out before the number of steps.
If your code can detect if a number is a Lychrel candidate, you may multiply your score by 0.85. In this case it is sufficient to assume anything that takes more than 261 iterations is a Lychrel candidate. Either return nothing, or anything that is not a number that can be mistaken for a correct answer (etc: any string or a number not in the range 0-261). Any error does not count as valid output (ex. maximum recursion depth exceeded) and can not be used in the detection.
If you complete both bonuses, multiply by 0.6.

This is code-golf, so least number of bytes wins.

This code snippet shows an example solution in Python 3 with both bonuses.
def do(n,c=0,s=''):
  m = str(n)
  o = m[::-1]
  if c > 261:
    return "Lychrel candidate"
  if m == o:
    print(s)
    return c
  else:
    d = int(m)+int(o)
    s+="%s + %s = %s"%(m,o,str(d))
    return do(d,c+1,s)

Related

Is the *0.6 bonus on top of the others? Or is it just that?

@Maltysen Just the 0.6.

When printing out the sums should we print 10 + 01 = 11 or 10 + 1 = 11 or is it up to us?

@Martin Büttner You can do either of the two you specified.

For the lychrel detector, can I print out 262?

Or like 999 or something else similarly ridculous?

@Maltysen I've updated the thread to make this clearer, you can print any number that can't be a possible value, since we assume anything over 261 is a Lychrel candidate, and it's not possible to go below 0.

I read that as Palindrome Reversal-Addiction (like OCD) and I thought that's the most pointless thing! Palindromes don't need to be reversed!

If the seed number ends in '0', I assume it's reverse drops the leading zeros? E.g. if the seed is 50,  the first calculation will be 50 + 5  i.e. 55. If the seed is 300, the first calculation will be 300 + 3 = 303?

@SteveIves Yes.

Pyth, 12 bytes
f_I`~+Qs_`Q0

Try it online: Demonstration or Test harness
This uses a quite new feature (only 17 hours old).
Explanation
               implicit: Q = input number
f          0   repeat the following expression until it
               evaluates to true and return the number of steps
         `Q       convert Q to string
        _         reverse the digits
       s          convert to int
     +Q           add Q
    ~             assign the result to Q
                  (this returns the old value of Q)
   `              convert the old value of Q to a string
 _I               and check if it's invariant under the operation reverse

edit:
Changed the code a little bit. The old version was
fqKs_`Q~+QK0

Same byte count, but the new one is way cooler.

Bonuses at a score of 12. Good luck!

@Dennis Your right. That was a ridiculous intention. The best I have is 13.6 using the Lychrel detection.

Python, 51
def f(n):r=int(str(n)[::-1]);return n-r and-~f(n+r)

For Python 2, backticks can't replace str() because of the L attached to long literals.
Here's an alternate version with score 64 * 0.85 = 54.4:
def f(n,c=262):r=int(str(n)[::-1]);return c*(n-r)and-~f(n+r,c-1)

And an alternate version for Python 3 with score 88 * 0.6 = 52.8:
def f(n,c=262):r=int(str(n)[::-1]);return c*(n-r)and-~f(n+r,print(n,'+',r,'=',n+r)or~-c)

This is just insane.. nice work!

CJam, 23 22 20.4 bytes
ri{__sW%i+}261*]{s_W%=}#

The code is 24 bytes long and prints -1 for Lychrel candidates.
Try it online.
How it works
ri                       e# Read an integer from STDIN.
  {       }261*          e# Do the following 261 times:
   __                    e#   Push two copies of the integer on the stack.
     sW%i                e#   Cast to string, reverse and cast back to integer.
         +               e#   Add the copy and the reversed copy of the integer.
               ]         e# Wrap all 262 results in an array.
                {     }# e# Push the index of the first element such that:
                 s       e#   The string representation equals...
                  _W%=   e#   the reversed string representation.

If {}# is successful, the index is also the number of steps. If, on the other hand, the array does not contain a palindrome, {}# will push -1.

Java, 200*0.6 = 120
import java.math.*;int f(BigInteger a){int s=-1;for(String b,c;(b=a+"").equals(c=new StringBuffer(b).reverse()+"")!=s++<999;)System.out.println(b+" + "+c+" = "+(a=a.add(new BigInteger(c))));return s;}

This is a simple loop that does just what it says on the box, but with some golf added. Returns 1000 for Lychrel candidates to get the detection bonus. Turns out I was able to print for not too many characters (for Java at least) and snag that bonus as well. The best I could do without bonus code was 156, so it was well worth it.
With some line breaks:
import java.math.*;
int f(BigInteger a){
    int s=-1;
    for(String b,c;(b=a+"").equals(c=new StringBuffer(b).reverse()+"")!=s++<999;)
        System.out.println(b+" + "+c+" = "+(a=a.add(new BigInteger(c))));
    return s;
}

Old Answer: 171*0.85 = 145.35 bytes
import java.math.*;int f(BigInteger a){int s=-1;for(String b,c;(b=a+"").equals(c=new StringBuffer(b).reverse()+"")!=s++<262;)a=a.add(new BigInteger(c));return s>261?-1:s;}

I guess you worked on this while it was in the sandbox still :P I'm rethinking the bonus amounts, since I realized even in Python (a relatively concise language compared to C#/Java) the bonuses don't help. I think I'll make it relative to the length of the program so that golfing languages don't end up with a <10 byte score.

I've updated the bonus rules, so your new score is 145.35 :)

Save a byte, remove the semicolon at the end of the for definition, it's not required, so after s++<999

@ChristopherWirt In what compiler/version? Mine gives a syntax error without it.

Ruby, (80+2)*0.6 =~ 49.2
With flags -nl, run
p (0..261).find{$_[b=$_.reverse]||puts($_+' + '+b+' = '+$_="#{$_.to_i+b.to_i}")}

Output looks like
 $ ruby -nl lychrel.rb
89
89 + 98 = 187
187 + 781 = 968
968 + 869 = 1837
1837 + 7381 = 9218
9218 + 8129 = 17347
17347 + 74371 = 91718
91718 + 81719 = 173437
173437 + 734371 = 907808
907808 + 808709 = 1716517
1716517 + 7156171 = 8872688
8872688 + 8862788 = 17735476
17735476 + 67453771 = 85189247
85189247 + 74298158 = 159487405
159487405 + 504784951 = 664272356
664272356 + 653272466 = 1317544822
1317544822 + 2284457131 = 3602001953
3602001953 + 3591002063 = 7193004016
7193004016 + 6104003917 = 13297007933
13297007933 + 33970079231 = 47267087164
47267087164 + 46178076274 = 93445163438
93445163438 + 83436154439 = 176881317877
176881317877 + 778713188671 = 955594506548
955594506548 + 845605495559 = 1801200002107
1801200002107 + 7012000021081 = 8813200023188
24

If given 196, it prints the first 261 addition steps and then nil.
Nothing too tricky here. We check whether $_ (which is initialized to the input) contains its reverse, which is only possible if they're equal since they're the same size. If it is, we print the step number and exit, otherwise, we display and execute the addition step, storing the new value in $_ (I unfortunately can't just eval the string I'm displaying because it interprets a reversed number with a trailing 0 as an octal literal). puts returns a falsey value so the loop continues.

" + #{b} = " saves a byte.

And it seems within the rules to drop the -l if we put the number into a file without a trailing newline and pipe it in?

CJam, 24 bytes
0q{__W%#}{_W%~\~+s\)\}w;

Test it here.
Explanation
0q     e# Push a zero (the counter) and read input.
{      e# While this block leaves something truthy on the stack...
  __   e#   Make two copies of the current number (as a string).
  W%   e#   Reverse the second copy.
  #    e#   Check that they are not equal.
}{     e# ... run this block.
  _W%  e#   Make a copy of the current number and reverse it.
  ~\~  e#   Evaluate both N and its reverse.
  +s   e#   Add them and turn the sum into a string.
  \)\  e#   Pull up the counter, increment it, and push it back down again.
}w
;      e# Discard the palindrome to leave the counter on the stack.

For more information about why # can be used to check string inequality, see this tip.

Didn't see your answer before posting. That's a clever use of #.

Pyth - 19 bytes
Uses while loop and a counter. There is probably a smaller algorithm than this, but this is pretty short.
Wnz_z=z`+szs_z=hZ;Z

Try it online here.

Very small indeed! Well done :)

Julia, 129 120 bytes * 0.6 = 72
i->(i=big(i);n=0;d=digits;while d(i)!=reverse(d(i))&&n<262 t=BigInt(join(d(i)));println(i," + ",t," = ",i+=t);n+=1end;n)

This creates an unnamed function which takes an integer as input and returns an integer, meanwhile printing each step. Lychrel candidates have a return value of 262. To call this, give it a name, e.g. f=i->....
Note that omitting code relating only to the bonuses, this solution would be 84 bytes.
Ungolfed + explanation:
function f(i)
    # Convert the input to a big integer
    i = big(i)

    # Initialize a step counter to 0
    n = 0

    # While the number is not a palindrome and we haven't exceeded 261 steps...
    while digits(i) != reverse(digits(i)) && n < 262

        # Get the reverse of the integer
        # Note that we aren't using reverse(); this is because digits()
        # returns an array of the digits in reverse order.
        t = BigInt(join(digits(i)))

        # Print the step and increment i
        println(i, " + ", t, " = ", i += t)

        # Count the step
        n += 1
    end

    # Return the number of steps or 262 for Lychrel candidates
    n
end

Examples:
julia> f(286)
286 + 682 = 968
968 + 869 = 1837
1837 + 7381 = 9218
9218 + 8129 = 17347
17347 + 74371 = 91718
91718 + 81719 = 173437
173437 + 734371 = 907808
907808 + 808709 = 1716517
1716517 + 7156171 = 8872688
8872688 + 8862788 = 17735476
17735476 + 67453771 = 85189247
85189247 + 74298158 = 159487405
159487405 + 504784951 = 664272356
664272356 + 653272466 = 1317544822
1317544822 + 2284457131 = 3602001953
3602001953 + 3591002063 = 7193004016
7193004016 + 6104003917 = 13297007933
13297007933 + 33970079231 = 47267087164
47267087164 + 46178076274 = 93445163438
93445163438 + 83436154439 = 176881317877
176881317877 + 778713188671 = 955594506548
955594506548 + 845605495559 = 1801200002107
1801200002107 + 7012000021081 = 8813200023188
23

julia> f(1186060307891929990)
(steps omitted)
261

julia> f(196)
(steps omitted)
262

julia> f(11)
0

Saved 2 bytes thanks to Geobits!

K, 25 bytes
#1_{~x~|x}{$. x,"+",|x}\$

Not very elegant. The overall form ({monad 1}{monad 2}\x) is K's equivalent of a general "while" loop, where the first monad is the halting condition and the second is an iteratively applied function to the argument x. The first monad ({~x~|x}) is the negation of the classic "is x a palindrome" phrase. The second monad concatenates together a string representing x plus the reverse of x, evaluates it and then casts the result back into a string with $.
A sample run showing intermediate results:
  {~x~|x}{$. x,"+",|x}\$68
("68"
 "154"
 "605"
 "1111")

Doing formatted output as requested for the bonus would be very clumsy and add a significant amount of code.

CJam, 23 bytes
Wl{\)\__W%_@#\i@i+s\}g;

Still only a few days into CJam, so I'm fairly happy to be at least in the same range as some of the pros. :) I did use Martin's string comparison trick that he also posted in the CJam hints. I also peeked at Dennis' solution to figure out how to reverse a string.
Explanation:
W    Initialize counter, will keep this at bottom of stack.
     Start counting at -1 because the counter will be incremented in the
     last pass through the loop, when the palindrome is detected.
l    Get input.
{    Start block of while loop.
\)\  Increment counter. Need to swap before/after because it's one below top of stack.
__   Copy current value twice. Need 3 copies in total:
       * one for reversal
       * one for comparison
       * one for addition with reverse
W%   Reverse value.
_    Copy the reverse value once because we need 2 copies:
       * one for comparison
       * one for addition with original value
@    Rotate one copy of original value to top.
#    Test for non-equality with reverse, using Martin's trick.
\i   Swap reverse value to top, and convert it to int.
@i   Rotate remaining copy of original value to top, and convert it to int.
+s   Add the values, and convert result to string.
\    Swap, so that comparison result is at top of stack for while loop test.
}g   End of while loop.
;    Current value sits at top of stack. Pop it, leaving only counter.

Test it online

Haskell, 66 53 bytes
r=reverse.show
f x|show x==r x=0|1<2=1+f(x+read(r x))

Usage example:
*Main> map f [0,11,89,286,196196871,1005499526,1186060307891929990]
[0,0,24,23,45,109,261]

I've never used Haskell before, but would you be able to do r=reverse x? That would change your second line to f x|x==r=0|1<2=1+f(show$read x+read(r)), and save 2 bytes.

@Vioz-: No, that's not possible, because x wouldn't be in scope. However, f x|x==r=0 .... read(r)) where r=reverse x would work, but it's longer.

Clojure, 94 bytes
(fn[x](#(let[r(bigint(apply str(reverse(str %1))))] (if(= %1 r)%2(recur(+ %1 r)(inc %2))))x 0))

This is my first attempt to code golf, so please tell me if I'm doing anything wrong.
With some spaces:
(fn [x]
(#(let [r (bigint (apply str (reverse (str %1))))]
  (if (= %1 r) %2 (recur (+ %1 r) (inc %2)))) x 0))

Simple recursion of the inner function. It takes two arguments, the integer %1 and an index %2. If %1 is a palindrome, the index gets returned. Otherwise, the function calls itself with the sum and the incremented index. The outer function initializes the index with zero.
A sample:
repl=> ((fn[x](#(let[r(bigint(apply str(reverse(str %1))))](if(= %1 r)%2(recur(+ %1 r)(inc %2))))x 0)) 1186060307891929990)
261

Ruby, 44
f=->n{n==(r=n.to_s.reverse.to_i)?0:f[n+r]+1}

Needs Ruby 1.9 or higher for -> lambda syntax.

Boost.Build, 304 bytes
Not really a language. Still cool.
import sequence ;
import regex ;
rule r ( n ) {
m = "([0-9]?)" ;
return [ sequence.join [ sequence.reverse [ regex.match "$(m)$(m)$(m)$(m)$(m)$(m)$(m)$(m)$(m)" : $(n) ] ] : "" ] ;
}
rule x ( n ) {
i = 0 ;
while $(n) != [ r $(n) ] {
n = [ CALC $(n) + [ r $(n) ] ] ;
i = [ CALC $(i) + 1 ] ;
}
echo $(i) ;
}

Pretty straightforward, other than the elaborate regex-based hack I used to reverse the string.

Jelly, 12 bytes
ṚḌ+ƊŒḂ¬$Ð¿L’

Try it online!
Jelly really needs an "until" builtin
How it works
ṚḌ+ƊŒḂ¬$Ð¿L’ - Main link. Takes n on the left
        Ð¿   - While loop, gathering each step into a list to return:
       $     -   Condition:
    ŒḂ       -     Is palindrome?
      ¬      -     Not
   Ɗ         -   Body:
Ṛ            -     Reverse
 Ḍ           -     Cast back to integer
  +          -     Add
          L  - Count number of steps
           ’ - Decrement to account for the final step

Husk has an "until" builtin, but it returns a single value lmao

Husk, 9 bytes
L↑S≠↔¡S+↔

Try it online!
Explanation
L↑S≠↔¡S+↔
     ¡    apply the following infinitely:
      S+↔ number + its reverse
 ↑        take the longest prefix of items where
  S≠↔     number ≠ its reverse
L         return its length

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


text:
Find primitive semiperfect numbers
Semiperfect numbers
A semiperfect/pseudoperfect number is an integer equal to the sum of a part of or all of its divisors (excluding itself). Numbers which are equal to the sum of all of their divisors are perfect.
Divisors of 6 : 1,2,3
      6 = 1+2+3 -> semiperfect (perfect)
Divisors of 28 : 1,2,4,7,14
      28 = 14+7+4+2+1 -> semiperfect (perfect)
Divisors of 40 : 1,2,4,5,8,10,20
      40 = 1+4+5+10+20 or 2+8+10+20 -> semiperfect

Primitive
A primitive semiperfect number is a semiperfect number with no semiperfect divisors (except itself :))
Divisors of 6 : 1,2,3
      6  = 1+2+3 -> primitive
Divisors of 12 : 1,2,3,4,6
      12 = 2+4+6 -> semiperfect

As references, please use the OEIS series A006036 for primitive semiperfect numbers, and A005835 for semiperfects.
Goal
Write a program or a function in any language.
It will take as input a number n as a function parameter or from STDIN/your language's closest alternative, and will output all the primitive semi-perfect numbers from 1 to n (inclusive).
The output must be formated as 6[separator]20[separator]28[separator]88... where [separator] is either as newline, a space or a comma. There must not be a starting [separator] nor a ending one.
Edit : you can leave a trailing newline
Examples
input :
5

output :
input :
20

output :
6
20

input :
100

output :
6 20 28 88

Scoring
This is code-golf, so the shortest code in bytes win.
Don't try to fool us with loopholes please :).
I'd be glad you could leave an explanation of your golfed code once you think you're done golfing it!
As this challenge already have some nice answers, and is slowly getting quiet, I'll put an end to it. The winner of this code-golf will be decided on Monday 29th, 00:00 GMT. Well done to all of you that have answered, and good luck to those who will try to beat them :)

Pyth, 28 27 bytes
VQI}KhNsMyJf!%KTSNI!@JYeaYK

1 byte thanks to @Jakube
Demonstration.
VQI}KhNsMyJf!%KTSNI!@JYeaYK
                                Implicit:
                                Y = []
                                Q = eval(input())
VQ                              for N in range(Q):
    KhN                         K = N+1
           f    SN              filter T over range(1, N)
            !%KT                the logical not of K%T.
                                This is the list of divisors of K.
          J                     Store the list in J.
         y                      Create all of its subsets.
       sM                       Map each subset to its sum.
  I}K                           If K is in that list: (If K is semiperfect)
                  I!@JY         If the intersection of J (the divisors)
                                and Y (the list of primitive semiperfect numbers)
                                is empty:
                        aYK     Append K to Y
                       e        And print its last element, K.

@AlexA. Thanks! It is necessary to append K to Y to build Y, which is needed elsewhere. However, I could do the printing separately, such as with aYKK instead of eaYK. It's 4 bytes either way, however.

JavaScript (ES6) 172
Run the snippet below to test

f=
v=>eval("for(n=h=[];n++<v;!t*i&&n>1?h[n]=1:0){for(r=[l=i=t=1];++i<n;)n%i||(h[i]?t=0:l=r.push(i));for(i=0;t&&++i<1<<l;)r.map(v=>i&(m+=m)?t-=v:0,t=n,m=.5)}''+Object.keys(h)")

// Less golfed

ff=v=>
{
   h=[]; // hashtable with numbers found so far

   for (n=1; n <= v; n++)
   {
      r=[1],l=1; // r is the list of divisors, l is the length of this list
      t=1; // used as a flag, will become 0 if a divisor is in h
      for(i=2; i<n; i++)
      {
         if (n%i == 0)
            if (h[i])
               t = 0; // found a divisor in h, n is not primitive
            else
               l = r.push(i); // add divisor to r and adjust l
      }
      if (t != 0) // this 'if' is merged with the for below in golfed code
      {
         // try all the sums, use a bit mask to find combinations
         for(i = 1; t != 0 && i < 1<<l; i++)
         {
            t = n; // start with n and subtract, if ok result will be 0
            m = 0.5; // start with mask 1/2 (nice that in Javascript we can mix int and floats)
            r.forEach( v=> i & (m+=m) ? t -= v : 0);
         }
         if (t == 0 && n > 1) h[n] = 1; // add n to the hashmap (the value can be anything)
      }
   }
   // the hashmap keys list is the result
   return '' + Object.keys(h) // convert to string, adding commas
}

(test=()=> O.textContent=f(+I.value))();
<input id=I type=number oninput="test()" value=999>

Julia, 161 149 bytes
n->(S(m)=!isempty(filter(i->i==unique(i)&&length(i)>1&&all(j->m%j<1,i),partitions(m)));for i=2:n S(i)&&!any(S,filter(k->i%k<1,1:i-1))&&println(i)end)

This creates an unnamed function that accepts an integer as input and prints the numbers to STDOUT separated by a newline. To call it, give it a name, e.g. f=n->....
Ungolfed + explanation:
# Define a function that determines whether the input is semiperfect
# (In the submission, this is defined as a named inline function within the
# primary function. I've separated it here for clarity.)

function S(m)
    # Get all integer arrays which sum to m
    p = partitions(m)

    # Filter the partitions to subsets of the divisors of m
    d = filter(i -> i == unique(i) && length(i) > 1 && all(j -> m % j == 0, i), p)

    # If d is nonempty, the input is semiperfect
    !isempty(d)
end

# The main function

function f(n)
    # Loop through all integers from 2 to n
    for i = 2:n
        # Determine whether i is semiperfect
        if S(i)
            # If no divisors of i are semiperfect, print i
            !any(S, filter(k -> i % k == 0, 1:i-1) && println(i)
        end
    end
end

Examples:
julia> f(5)

julia> f(40)
6
20
28

CJam, 54 bytes
This solution feels a bit awkward, but since there have been few answers, and none in CJam, I thought I'd post it anyway:
Lli),2>{_N,1>{N\%!},_@&!\_,2,m*\f{.*:+}N#)e&{N+}&}fNS*

A good part of the increment over the posted Pyth solution comes from the fact that, as far as I could find, CJam does not have an operator to enumerate all subsets of a set. So it took some work to complete that with available operators. Of course, if there actually is a simple operator I missed, I'll look kind of silly. :)
Explanation:
L     Start stack with empty list that will become list of solutions.
li    Get input N and convert to int.
),2>  Build list of candidate solutions [2 .. N].
{     Start for loop over all candidate solutions.
_     Copy list of previous solutions, needed later to check for candidate being primitive.
N,1>  Build list of possible divisors [1 .. N-1].
{N\%!},  Filter list to only contain actual divisors of N.
_     Check if one of divisors is a previous solution. Start by copying divisor list.
@     Pull copy of list with previous solutions to top of stack
&!    Intersect the two lists, and check the result for empty. Will be used later.
\     Swap top two elements, getting divisor list back to top.
_,    Get length of divisor list.
2,    Put [0 1] on top of stack.
m*    Cartesian power. Creates all 0/1 sequences with same length as divisor list.
\     Swap with divisor list.
f{.*:+}  Calculate element by element product of all 0/1 sequences with divisors,
         and sum up the values (i.e. dot products of 0/1 sequences with divisors).
         The result is an array with all possible divisor sums.
N#)  Find N in list of divisor sums, and covert to truth value.
e&   Logical and with earlier result from primitive test.
{N+}&  Add N to list of solutions if result is true.
}fN  Phew! We finally made it to the end of the for loop, and have a list of solutions.
S*   Join the list of solutions with spaces in between.

Try it online

PHP, 263 Bytes
function m($a,$n){for($t=1,$b=2**count($a);--$b*$t;$t*=$r!=$n,$r=0)foreach($a as$k=>$v)$r+=($b>>$k&1)*$v;return$t;}for($o=[];$i++<$argn;m($d,$i)?:$o=array_merge($o,range($r[]=$i,3*$argn,$i)))for($d=[],$n=$i;--$n*!in_array($i,$o);)$i%$n?:$d[]=$n;echo join(",",$r);

Try it online!
Expanded
function m($a,$n){
  for($t=1,$b=2**count($a);--$b*$t;$t*=$r!=$n,$r=0) #loop through bitmasks
    foreach($a as$k=>$v)$r+=($b>>$k&1)*$v; # loop through divisor array
  return$t;} # returns false for semiperfect numbers
for($o=[];$i++<$argn;
m($d,$i)?
  :$o=array_merge($o,range($r[]=$i,3*$argn,$i))) # Make the result array and the array of multiples of the result array
  for($d=[],$n=$i;--$n*!in_array($i,$o);) # check if integer is not in multiples array
    $i%$n?:$d[]=$n; # make divisor array
echo join(",",$r); #Output

Jelly, 22 bytes
ÆDṖŒPS€i
ÆDÇ€TL’
RÇÐḟY

Try it online!
Explanation
ÆDṖŒPS€i - helper function to check if input is a semiperfect number
ÆD       - list of divisors of input
  Ṗ      - except for the last one (the input)
   ŒP    - power set = every possible subset of divisors
     S€  - sum of each subset
       i - return truthy iff input is one of these

ÆDÇ€TL’ - helper function to check if input is a primitive semiperfect number
ÆD       - list of divisors of input
  Ç€     - replace each with if they are a semiperfect number, based on
           the above helper function. If input is a primitive semiperfect
           number, we get something like [0,0,0,0,0,94].
    T    - get all truthy values.
     L’  - return falsy iff there is only one truthy value

RÇÐḟY    - main link
R        - Range[input]
 ÇÐḟ     - Filter out those elements which are not primitive semiperfect
           numbers, based on the helper function
    Y    - join by newlines.

source: Stack Exchange

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

sort: votes


text:
Naturally linear Diophantine equations
A linear Diophantine equation in two variables is an equation of the form ax + by = c, where a, b and c are constant integers and x and y are integer variables.
For many naturally occurring Diophantine equations, x and y represent quantities that cannot be negative.
Task
Write a program or function that accepts the coefficients a, b and c as input and returns an arbitrary pair of natural numbers (0, 1, 2, …) x and y that verify the equation ax + by = c, if such a pair exists.
Additional rules

You can choose any format for input and output that involves only the desired integers and, optionally, array/list/matrix/tuple/vector notation of your language, as long as you don't embed any code in the input.
You may assume that the coefficients a and b are both non-zero.
Your code must work for any triplet of integers between -260 and 260; it must finish in under a minute on my machine (Intel i7-3770, 16 GiB RAM).
You may not use any built-ins that solve Diophantine equations and thus trivialize this task, such as Mathematica's FindInstance or FrobeniusSolve.
Your code may behave however you want if no solution can be found, as long as it complies with the time limit and its output cannot be confused with a valid solution.
Standard code-golf rules apply.

Examples

The examples below illustrate valid I/O for the equation 2x + 3y = 11, which has exactly two valid solutions ( (x,y) = (4,1) and (x,y) = (1,3) ).
Input:  2 3 11
Output: [4 1]

Input:  (11 (2,3))
Output: [3],(1)

The only valid solution of 2x + 3y = 2 is the pair (x,y) = (1,0).
The examples below illustrate valid I/O for the equation 2x + 3y = 1, which has no valid solutions.
Input:  (2 3 1)
Output: []

Input:  1 2 3
Output: -1

Input:  [[2], [3], [1]]
Output: (2, -1)

For (a, b, c) = (1152921504606846883, -576460752303423433, 1), all correct solutions (x,y) satisfy that (x,y) = (135637824071393749 - bn, 271275648142787502 + an) for some non-negative integer n.

I think it might be good to place a bit more emphasis on nonnegative integers, and that the second example in fact has no solution.

intput 1 2 3 has a valid output though... [ 1, 1 ]

@JackAmmo: All examples in the second code block correspond to 2x + 3y = 1.

In ax+bx=k it seems to me to understand that the solution has to be x>=0 and y>=0. So who are such x,y>=0 solutions of 38x+909y=3?

In such case probably I have to return that not exist solution...

@RosLuP Your code may behave however you want if no solution can be found, as long as it complies with the time limit and its output cannot be confused with a valid solution. The third list item of the Examples section shows some possible outputs. Crashing would also be acceptable.

Test cases are few, 'crashing' or raise exceptions should be something never to do

Pyth, 92 bytes
I!%vzhK%2u?sm,ed-hd*ed/F<G2cG2@G1G+~Q,hQ_eQj9 2)J*L/vzhKtKeoSNm-VJ/RhK_*LdQsm+LdtM3/V*LhK_JQ

It's quite a monster.
Try it online: Demonstration. The input format is c\n[a,b] and the output format is [x,y].
In the case that no integer solution exists, I'll print nothing, and in the case that no natural integer solution exists, I'll simply print a random integer solution.
Explanation (Rough Overview)

At first I'll find an integer solution to the equation ax + by = gcd(a,b) by using the Extended Euclidean algorithm.
Then I'll modify the solution (my multiplying a and b with c/gcd(a,b)) to get an integer solution of ax + by = c. This works, if c/gcd(a,b) is an integer. Otherwise there doesn't exist a solution.
All the other integer solutions have the form a(x+n*b/d) + b(y-n*a/d) = c  with d = gcd(a,b) for integer n. Using the two inequalities x+n*b/d >= 0 and y-n*a/d >= 0 I can determine 6 possible values for n. I'll try all 6 of them and print the solution with the highest lowest coefficient.

Explanation (Detailed)
The first step is to find an integer solution to the equation ax' + by' = gcd(a,b). This can be done by using the extended Euclidean algorithm. You can get an idea on how it works at Wikipedia. The only difference is, that instead of using 3 columns (r_i s_i t_i) I'll use 6 columns (r_i-1 r_i s_i-1 s_i t_i-1 t_i). This way I don't have to keep the last two rows in memory, only the last one.
K%2u?sm,ed-hd*ed/F<G2cG2@G1G+~Q,hQ_eQj9 2)   implicit: Q = [a,b] (from input)
                                     j9 2    convert 9 to base 2: [1,0,0,1]
                            + Q              add to Q => [a,b,1,0,0,1]
                                             this is the initial row
   u                                     )   start with G = ^ and update G repeatedly
                                             by the following expression, until
                                             the value of G doesn't change anymore
    ?                   @G1                    if G[1] != 0:
                     cG2                         split G into parts of 2
      m                                          map the parts d to:
       ,                                           the pair
        ed                                           d[1]
          -hd*ed/F<G2                                d[0]-d[1]*G[0]/G[1]
     s                                           unfold
                                               else:
                           G                     G (don't change it, stop criterion for u)
 %2                                          take every second element
                                             we get the list [gcd(a,b),x',y']
K                                            store this list in K
                             ~Q,hQ_eQ        afterwards change Q to [Q[0],-Q[1]] = [a,-b]
                                             This will be important for the other parts.

Now I want to find a solution to ax + by = c. This is possible only, when c mod gcd(a,b) == 0. If this equation is satisfied, I simply multiplying x',y' with c/gcd(a,b).
I!%vzhK...J*L/vzhKtK   implicit: z = c in string format (from input)
  %vzhK                evaluated(z) mod K[0] (=gcd(a,b))
I!                     if not ^ than:
             /vzhK        c/K[0]
           *L     tK      multipy ^ to each element in K[1:] (=[x',y'])
          J               and store the result in J, this is now [x,y]

We have an integer solution for ax + by = c. Notice, that x, y or both may be negative. So our goal is to transform these to non-negative.
The nice thing about Diophantine equations is, that we can describe all solution using only one initial solution. If (x,y) is a solution, that all other solutions are of the form (x-n*b/gcd(a,b),y+n*a/gcd(a,b)) for n integer.
Therefore we want to find a n, where x-n*b/gcd(a,b) >= 0 and y+n*a/gcd(a,b >= 0. After some transformation we end up with the two inequalities n >= -x*gcd(a,b)/b and n >= y*gcd(a,b)/a. Notice that the inequality symbol might look in the other direction due the division with a potential negative a or b. I don't care that much about it, I simply say that one number of -x*gcd(a,b)/b - 1, -x*gcd(a,b)/b, -x*gcd(a,b)/b + 1 definitly satisfies inequality 1, and one number of y*gcd(a,b)/a - 1, y*gcd(a,b)/a, y*gcd(a,b)/a + 1 satisfies inequality 2. It there is a n, that satisfies both inequalities, one of the 6 numbers also does.
Then I calculate the new solutions (x-n*b/gcd(a,b),y+n*a/gcd(a,b)) for all 6 possible values of n. And I print the solution with the highest lowest value.
eoSNm-VJ/RhK_*LdQsm+LdtM3/V*LhK_JQ
                               _J    reverse J => [y,x]
                           *LhK      multiply each value with K[0] => [y*gcd,x*gcd]
                         /V      Q   vectorized division => [y*gcd/a,-x*gcd/b]
                  m                  map each d of ^ to:
                      tM3              [-1,0,1]
                   +Ld                 add d to each ^
                 s                   unfold
                                     these are the possible values for n
    m                                map each d (actually n) of ^ to:
             *LdQ                      multiply d to Q => [a*n,-b*n]
            _                          reverse => [-b*n,a*n]
        /RhK                           divide by K[0] => [-b*n/gcd,a*n/gcd]
     -VJ                               vectorized subtraction with J
                                       => [x+b*n/gcd,y-a*n/gcd]
 oSN                                 order the solutions by their sorted order
e                                    print the last one

The sort by their sorted order thing works the following way. I'm using the example 2x + 3y = 11
I sort each of the 6 solutions (this are called keys), and sort the original solutions by their keys:
solutions: [1, 3], [4, 1], [7, -1], [-5, 7], [-2, 5], [1, 3]
keys:      [1, 3], [1, 4], [-1, 7], [-5, 7], [-2, 5], [1, 3]
sort by key:
solutions: [-5, 7], [-2, 5], [7, -1], [1, 3], [1, 3], [4, 1]
keys:      [-5, 7], [-2, 5], [-1, 7], [1, 3], [1, 3], [1, 4]

This sorts a complete non-negative solution to the end (if there is any).

after Dennis' remarks, that made my previous idea upside-down, i had to change the code from its roots and it took me long term debugging, and cost me twice n° of bytes :'(.

Matlab (660)
a=input('');b=input('');c=input('');if((min(a*c,b*c)>c*c)&&a*c>0&&b*c>0)||(a*c<0&&b*c<0),-1,return,end,g=abs(gcd(a,b));c=c/g;a=a/g;b=b/g;if(c~=floor(c)),-1,return,end,if(c/a==floor(c/a)&&c/a>0),e=c/a-b;if(e>0),e,a,return,else,c/a,0,return,end,end,if(c/b==floor(c/b)&&c/b>0),e=c/b-a;if(e>0),b,e,return,else,0,c/b,return,end,end,f=max(abs(a),abs(b));if f==abs(a),f=b;b=a;a=f;g=0.5;end,e=(c-b)/a;f=(c-2*b)/a;if(e<0&&f<e),-1,elseif(e<0&&f>e),for(i=abs(c*a):abs((c+1)*a)),e=(c-i*b);if(mod(e,a)==0)if(g==0.5),i,e/a;else,e/a,i,end,return,end,end,else for(i=1:abs(a)),e=(c-i*b);if(e/a<0),-1,elseif(mod(e,a)==0),if(g==0.5),i,e/a,else,e/a,i,end,return,end,end,end,-1

Well , i know its not golfed, since that type of languages isnt adapted for code length reduction, but, i can ensure that time-complexity is at its best.

Explanation:

the code takes three invariants a,b,c as input, these last ones are subdued to couple of conditions before proceeding to calculate:
1- if (a+b>c) and (a,b,c>0) no solution!
2- if (a+b < c) ,(a,b,c<0) no solution!
3- if (a, b) have common opposite signs of c : no solution!
4- if GCD(a,b) dosnt divide c, then no solution again! , otherwise, divide all variants by GCD.
after this , we have to check another condition out, it should ease and shorteb the way to desired solution.
5- if c divide a or b , solution s= (x or y)=(c-[ax,yb])/[b,a]=C/[b,a]+[ax,yb]/[b,a]=S+[ax,yb]/[b,a] where S is natural so ax/b or by/a would have henceforth non-negative direct solutions which are respectively x=b or y=a . (notice that solutions can be just nil values in case previous arbitrary solutions are revealed negatives)
when the program reaches this stage, a narrower range of solutions for x=(c-yb)/a is swept instead, thanks to congruence, of sweeping larger ranges of numbers ,which is come accross repetitively by regular cycles. the largest search field is [x-a,x+a] where a is the divisor.

TRY IT

euuh , large numbers issue , gonna fix that (wonder when lol)

I think its still minor bug to fix, about large integers, i still dont get why dividing 1152921504606846800.000000/576460752303423420.000000 comes out with natural number 2 ,though this last result is rounded .

ohh . i forgot to fix that bugging bug :p thanks for noticing it @Jakube

Axiom, 460 bytes
w(a,b,x,u)==(a=0=>[b,x];w(b rem a,a,u,x-u*(b quo a)))
d(a,b,k)==(o:List List INT:=[];a=0 and b=0=>(k=0=>[1,1];[]);a=0=>(k=0=>[[1,0]];k rem b=0=>[1,k quo b];[]);b=0=>(k=0=>[[0,1]];k rem a=0=>[k quo a,1];[]);r:=w(a,b,0,1);q:=k quo r.1;(y,x,u,v):=(q*(r.1-r.2*a)quo b,q*r.2,b quo r.1,a quo r.1);m:=min(80,4+abs(k)quo min(abs(a),abs(b)));l:=y quo v;x:=x+l*u;y:=y-l*v;for n in -m..m repeat(t:=x+n*u;z:=y-n*v;t>=0 and z>=0 and t*a+z*b=k=>(o:=cons([t,z],o)));sort(o))

ungolf and some test
-- input a b and k for equation a*x+b*y=k
-- result one List of List of elments [x,y] of solution of
-- that equation with x and y NNI (not negative integers)
-- or Void list [] for no solution
diopanto(a,b,k)==
  o:List List INT:=[]
  a=0 and b=0=>(k=0=>[1,1];[])
  a=0=>(k=0=>[[1,0]];k rem b=0=>[1,k quo b];[])
  b=0=>(k=0=>[[0,1]];k rem a=0=>[k quo a,1];[])
  r:=w(a,b,0,1)
  q:=k quo r.1
  (y,x,u,v):=(q*(r.1-r.2*a)quo b,q*r.2,b quo r.1,a quo r.1)
  m:=min(80,4+abs(k)quo min(abs(a),abs(b)))
  l:=y quo v           -- center the interval
  x:=x+l*u; y:=y-l*v
  for n in -m..m repeat
     t:=x+n*u;z:=y-n*v
     t>=0 and z>=0 and t*a+z*b=k=>(o:=cons([t,z],o))
  sort(o)

 ------------------------------------------------------
(4) -> d(0,-9,0)
   (4)  [[1,0]]
                                                  Type: List List Integer
(5) -> d(2,3,11)
   (5)  [[4,1],[1,3]]
                                                  Type: List List Integer
(6) -> d(2,3,2)
   (6)  [[1,0]]
                                                  Type: List List Integer
(7) -> d(2,3,1)
   (7)  []
                                                  Type: List List Integer
(8) -> d(1152921504606846883,-576460752303423433,1)
   (8)
   [[135637824071393749,271275648142787502],
    [712098576374817182,1424197152749634385],
    [1288559328678240615,2577118657356481268],
    [1865020080981664048,3730040161963328151],
    [2441480833285087481,4882961666570175034]]
                                                  Type: List List Integer

In the other 'solutions' possible there was a bug because
it tried to save the infinite solutions in one List; now it is
imposed the limit of 80 solutions max

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


text:
5318008 - Fun with Calculators
In schools across the world, children type a number into their LCD calculator, turn it upside down and erupt into laughter after creating the word 'Boobies'. Of course, this is the most popular word, but there are many other words which can be produced.
All words must be less than 10 letters long, however (the dictionary does contain words long than this however, so you must perform a filter in your program). In this dictionary, there are some uppercase words, so convert the all words the lowercase.
Using, an English language dictionary, create a list of numbers which can be typed into an LCD calculator and makes a word. As with all code golf questions, the shortest program to complete this task wins.
For my tests, I used the UNIX wordlist, gathered by typing:
ln -s /usr/dict/words w.txt

Or alternatively, get it here.

For example, the image above was created by typing the number 35007 into the calculator and turning it upside down.
The letters and their respective numbers:

b: 8
g: 6
l: 7
i: 1
o: 0
s: 5
z: 2
h: 4
e: 3

Note that if the number starts with a zero, a decimal point is required after that zero. The number must not start with a decimal point.
I think this is MartinBüttner's code, just wanted to credit you for it :)

/* Configuration */

var QUESTION_ID = 51871; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";

/* App */

var answers = [], page = 1;

function answersUrl(index) {
  return "http://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      if (data.has_more) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SIZE_REG = /\d+(?=[^\d&]*(?:<(?:s>[^&]*<\/s>|[^&]+>)[^\d&]*)*$)/;
var NUMBER_REG = /\d+/;
var LANGUAGE_REG = /^#*\s*([^,]+)/;

function shouldHaveHeading(a) {
  var pass = false;
  var lines = a.body_markdown.split("\n");
  try {
    pass |= /^#/.test(a.body_markdown);
    pass |= ["-", "="]
              .indexOf(lines[1][0]) > -1;
    pass &= LANGUAGE_REG.test(a.body_markdown);
  } catch (ex) {}
  return pass;
}

function shouldHaveScore(a) {
  var pass = false;
  try {
    pass |= SIZE_REG.test(a.body_markdown.split("\n")[0]);
  } catch (ex) {}
  return pass;
}

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  answers = answers.filter(shouldHaveScore)
                   .filter(shouldHaveHeading);
  answers.sort(function (a, b) {
    var aB = +(a.body_markdown.split("\n")[0].match(SIZE_REG) || [Infinity])[0],
        bB = +(b.body_markdown.split("\n")[0].match(SIZE_REG) || [Infinity])[0];
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  answers.forEach(function (a) {
    var headline = a.body_markdown.split("\n")[0];
    //console.log(a);
    var answer = jQuery("#answer-template").html();
    var num = headline.match(NUMBER_REG)[0];
    var size = (headline.match(SIZE_REG)||[0])[0];
    var language = headline.match(LANGUAGE_REG)[1];
    var user = getAuthorName(a);
    if (size != lastSize)
      lastPlace = place;
    lastSize = size;
    ++place;
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", user)
                   .replace("{{LANGUAGE}}", language)
                   .replace("{{SIZE}}", size)
                   .replace("{{LINK}}", a.share_link);
    answer = jQuery(answer)
    jQuery("#answers").append(answer);

    languages[language] = languages[language] || {lang: language, user: user, size: size, link: a.share_link};
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function (a, b) {
    if (a.lang > b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}
body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 50%;
  float: left;
}

#language-list {
  padding: 10px;
  width: 50%px;
  float: left;
}

table thead {
  font-weight: bold;
}

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

Do we assume all words in the wordlist are less than 10 letters, or do we filter that out ourselves?

@ASCIIThenANSI You must filter this yourself

Doesn't detract from the question, but note that the calculator in the image has only 8 digits available in its display...

And can the decimal point be placed after the ninth letter (I'm assuming 9 letters is the maximum)?

Can use a decimal point after the first number even if it isn't required?

Do we have to type 0.7734 for hello or would .7734 be acceptable?

What is the correct behaviour if the dictionary contains words with upper case, punctuation, etc?

@Dennis 0.7734 is required

It seems the linked dictionary has duplicate words for upper case and lower case. IMO, it is better to ignore the upper case words to avoid double counting.

What about words that require a trailing zero after the decimal?  For example, oligo requires a trailing zero after the decimal: 0.6170

Are we allowed to output the numbers as a list? As in, something like [3,7,0,4] for 'hole'?

@M. I. Wright No, sorry

I always liked the 707 + 707 = 1414 (lol + lol = hihi)

CJam, 44 42 bytes
r{el"oizehsglb"f#W%"0."a.e|N+_,B<*_W&!*r}h

Try it online in the CJam interpreter.
To run the program from the command line, download the Java interpreter and execute:
java -jar cjam-0.6.5.jar 5318008.cjam < /usr/share/dict/words

How it works
r            e# Read a whitespace-separated token from STDIN.
{            e# While loop:
 el          e#   Convert to lowercase.
 "oizehsglb" e#   Push that string.
 f#          e#   Get the index of each character from the input in that string.
             e#   This pushes -1 for "not found".
 W%          e#   Reverse the resulting array.
 "0."a       e#   Push ["0."].
 .e|         e#   Vectorized logical NOT. This replaces an initial 0 with "0.".
 N+          e#   Append a linefeed.
 _,B<*       e#   Repeat the array (array.length < 11) times.
 _W&!*       e#   Repeat the array !(array.intersection(-1)) times.
 r           e#   Read a whitespace-separated token from STDIN.
}h           e# If the token is not empty, repeat the loop.

Bash + coreutils, 54
Again, thanks to @TobySpeight for the golfing help.
rev|tr oizehsglb 0-8|sed '/.\{11\}\|[^0-9]/d;s/^0/&./'

Input wordlist is taken from STDIN:
$ ./5318008.sh < /usr/share/dict/words | head
8
38
338
5338
638
5638
36138
31738
531738
7738
$

"Belie" and "Belies" are words? The more you know...

Python 2, 271 216 211 205 Bytes
This is the only idea I've had so far.. I will update this once I think of something else! I assumed we needed to read from a file, but if not let me know so I can update :)
Big thanks to Dennis for saving me 55 bytes :)
Also thanks to Sp3000 for saving 6 bytes :)
d,f,g='oizehsglb',[x.lower()for x in open('w.txt').read().split('\n')if len(x)<10],[]
for x in f:
 c=x[::-1]
 for b in d:c=c.replace(b,`d.find(b)`)
 g=[g,g+[['0.'+c[1:],c][c[0]!='0']]][c.isdigit()]
print g

I don't know a lot of Python, but wouldn't something like "oizehsglb".index(b) be shorter?

I'm not sure how you want to implement that.. getting the index of where one of these characters is doesn't really help in this case since I just need to replace all instances.

d[b] == "oizehsglb".index(b). Possibly lacking a cast to string/character.

Oh, wow, it never occurred to me that the numbers we were able to replace had numerical values in order.. Yes, that will definitely work! Thanks!

Haven't tested but: 1) .find is shorter than .index, 2) Depending on which version you have, at least in 2.7.10 open without a mode argument defaults to r, 3) Doesn't just for x in open(...) work? (may need to remove a trailing newline) If it doesn't, then .split('\n') is shorter than .splitlines()

@Sp3000 1) Thanks, forgot about that. 2) Didn't know that was the case! 3) just open(...) didn't work, so I changed to .split('\n'). Thanks!

Just tried - open(...) works, but you do need to account for the trailing newline, so you'd need [x[:-1].lower()for x in open('w.txt')if len(x)<11].

Also g+=[['0.'+c[1:],c][c[0]!='0']]*c.isdigit(), and you can save a few more by reversing in f then doing for c in f instead of having c=x[::-1]. Also you only use f once, so you don't need to save it as a variable

JavaScript (ES7), 73 bytes
This can be done in ES7 a mere 73 bytes:
s=>[for(w of s)'oizehsglb'.search(w)].reverse().join``.replace(/^0/,'0.')

Ungolfed:
var b = function b(s) {
    return s.length < 10 && /^[bglioszhe]*$/.test(s) ? s.replace(/./g, function (w) {
        return 'oizehsglb'.search(w);
    }).reverse().join('').replace(/^0/, '0.') : '';
};

Usage:
t('hello'); // 0.7734
t('loose'); // 35007
t('impossible'); //

Function:
t=s=>                       // Create a function 't' with an argument named 's'
   [                        // Return this array  comprehension
     for(i of s)            // Loops through each letter in the string
     'oizehsglb'.search(w)  // Converts it to it's corresponding number
   ]
  .reverse().join``         // Reverse the array and make it a string
  .replace(/^0/,'0.')       // If the first character is a 0, add a decimal after it

I ran this on the UNIX wordlist and have put the results in a paste bin:
Results
The code used to obtain the results on Firefox:
document.querySelector('pre').innerHTML.split('\n').map(i => t(i.toLowerCase())).join('\n').replace(/^\s*[\r\n]/gm, '');

What happens with t('Impossible')?

@ArturoTorresSánchez You're right, I've fixed that

is join`` ES2015 or is it pre-ES2015?

@WallyWest That's an ES6 feature. It's supported in most major browsers

What is ES7 specific in this?

@Sting [for(... of ...)] syntax is ES7. Though it's really only supported in Firefox

Python 2, 121 bytes
for s in open("w.txt"):
 L=map("oizehsglb".find,s[-2::-1].lower())
 if-min(L)<1>len(L)-9:print`L[0]`+"."[L[0]:]+`L`[4::3]

Assumes that the dictionary file w.txt ends with a trailing newline, and has no empty lines.

GNU sed, 82
(including 1 for -r)
Thanks to @TobySpeight for the golfing help.
s/$/:/
:
s/(.)(:.*)/\2\1/
t
s/://
y/oizehsglb/012345678/
/.{11}|[^0-9]/d;s/^0/&./

Input wordlist is taken from STDIN:
$ sed -rf 5318008.sed /usr/share/dict/words | tail
3705
53705
1705
0.705
50705
5705
505
2
0.02
5002
$

Python 2, 147 158 156 bytes
I was missing this '0.' requirement. Hope now it works allright.
edit: Removed ".readlines()" and it still works ;p
edit2: Removed some spaces and move print to the 3rd line
edit3: Saved 2 bytes thanks to Sp3000 (removed space after print and changed 'index' to 'find')
for x in open("w.txt"):
 a="oizehsglb";g=[`a.find(b)`for b in x[::-1].lower()if b in a]
 if len(g)==len(x)-1<10:
  if g[0]=="0":g[0]="0."
  print"".join(g)

Java, 208 200 176 bytes
String f(char[] w){String o="",l="oizehsglb";for(int i=w.length;i>0;i--)o+=l.indexOf(w[i-1]|32);if(o.contains("-")||o.length()>8)o="  ";return o.charAt(0)+"."+o.substring(1);}

Expanded
String f(char[] w)
{
    String o = "", l = "oizehsglb";
    for(int i = w.length; i > 0; i--)
        o+=l.indexOf(w[i-1]|32);
    if(o.contains("-")||o.length() > 8)
        o = "  ";
    return o.charAt(0) + "." + o.substring(1);
}

It always adds the decimal, and when invalid returns " . ". But otherwise works like it should. :P
Thanks  @LegionMammal978!

You can save 7 bytes by changing ;String l= to ,l= and =o+ to +=.

Haskell, 175 bytes without imports (229 bytes with imports)
Relevant code (say in File Calc.hs):
import Data.Char(toLower)
import Data.Maybe(mapMaybe)
s="oizehsglb\n"
g('0':r)="0."++r
g x=x
main=mapM_(putStrLn.g.reverse.mapMaybe(`lookup`zip s['0'..'8'])).filter(\l->length l<10&&all(`elem`s)l).lines.map toLower=<<getContents

$ cat /usr/share/dict/words | runghc Calc.hs

C, 182 172  169/181 172 bytes
char*l="oizehsglb",S[99],*s,*t;main(x){for(;t=S+98,gets(S);){for(s=S;*s;s++)if(x=strchr(l,*s|32))*--t=48+x-(int)l;else break;*t==48?*t--=46,*t=48:0;*s||s-S>10?0:puts(t);}}

Expanded
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *l="oizehsglb",S[99],*s,*t;

main(int x, char **argv)
{
    for (;t=S+98,gets(S);){
        for (s=S;*s;s++)
            if (x=strchr(l,*s|32))
                *--t=48+x-(int)l;
            else
                break;
        if (*t==48) {       // '0'
            *t--=46;        // '.'
            *t=48;  // '0'
        }

        if (!*s && s-S <= 10)
            puts(t);
    }
}

using the linked words.txt, with lower case conversion:
$ ./a.out  < words.txt  | tail
2212
0.2
0.802
0.602
7702
37702
0.02
321607002
515002
0.02002

$ ./a.out < words.txt   | wc -l
 550

Won't *s|32 work as lowercase conversion in this context?

Great idea! Thanks!

Ruby 2, 88 86 bytes
x="oizehsglb"
puts$_.tr(x,"0-8").reverse.sub /^0/,"0." if$_.size<11&&$_.delete(x)<?A

Byte count includes 2 for the ln options on the command line:
$ ruby -ln 5318008.rb wordlist.txt

In this case =="" can be replaced with <?A. And no need for gsub() as sub() is enough.

Python 2, 184 174 bytes
for s in open('w.txt'):
 try:a=''.join(map(lambda c:dict(zip('bglioszhe','867105243'))[c],s[:-1][::-1]));a=[a,'0.'+a[1:]][a[0]=='0'];print['',''.join(a)][len(s)<11]
 except:0


text:
Counter counter
In typography, a counter is the area of a letter that is entirely or partially enclosed by a letter form or a symbol. A closed counter is a counter that is entirely enclosed by a letter form or symbol. You must write a program takes a string as input and prints the total number of closed counters in the text.
Your input:

May be a command line input, or from STDIN, but you must specify which.
Will consist entirely of the printable ASCII characters, meaning all ASCII values between 32 and 126 inclusive. This does include spaces. More information.

Now, this does vary slightly between fonts. For example, the font you're reading this in considers 'g' to have one closed counter, whereas the google font has 'g' with two closed counters. So that this is not an issue, here are the official number of closed counters per character.
All the symbols with no closed counters:
 !"'()*+,-./12357:;<=>?CEFGHIJKLMNSTUVWXYZ[\]^_`cfhijklmnrstuvwxyz{|}~

Note that this includes space.
Here are all the symbols with one closed counter:
#0469@ADOPQRabdegopq

And here are all the symbols with 2 closed counters:
$%&8B

And last but not least, here are some sample inputs and outputs.
Programming Puzzles and Code-Golf should print  13
4 8 15 16 23 42 should print 5
All your base are belong to us should print 12
Standard loopholes apply should print 12
Shortest answer in bytes is the winner! should print 8

Two answers have submitted functions instead of full programs. While that is allowed by default, your wording suggests otherwise. Could you clarify?

Would you mind disclosing which going you used to count the counters?

@MartinBüttner I'm not sure if I understand what you mean.

None of the fonts I'm viewing the question in corresponds to the counts you have given. E.g. in the browser, the zero has a diagonal slash through it, giving two counters. The font in the android app doesn't, but here the g has two closed counters. Did you determine the counters based on any particular font?

@MartinBüttner I just used whichever font came up when I wrote the question. (In the output, not the source) I guess I assumed that everybody is seeing the same font, but apparently they're not. Maybe it's a location thing?

@DJMcMayhem 'g' has 1; though where listed in code, g has 2. Slightly confusing to read, but I don't think it's different by location.

Doesn't 0 have 2 closed counters in certain fonts, especially many monospace fonts?

So what does it vary by? OS? Browser? I wrote this on Firefox on Ubuntu.

@DJMcMayhem It varies by formatting. You used code markup for posting which letters. Look at your question. The monospaced g and 0 have 2 closed counters, which is confusing people.

@mbomb007 but on my computer, both g and 0 have 1 closed counter, even with the formatting.

Then I think you're in the minority, but since you defined the sets, it's fine.

Pyth, 31 bytes
sm@tjC"cúÁ-ÈN%³rØ|"3Cdz

Demonstration.
Note that the code may not be displayed properly due to the use of non-ASCII characters. The correct code is at the link.
I made a lookup table of the output desired for each input character, rotated it by 32 to make use of Pyth's modular indexing, stuck a 1 at the beginning, and interpreted it as a base 3 number, giving the number 2229617581140564569750295263480330834137283757. I then converted this number to base 256 and converted it to a string, which is the string used in the answer.

Python 3, 63
print(sum(map(input().count,"#0469@ADOPQRabdegopq$%&8B$%&8B")))

A straightforward approach. Iterates over each character with a closed counter, summing the number of occurrences, doing so twice for characters with two closed counters. It would be the same length to instead write
"#0469@ADOPQRabdegopq"+"$%&8B"*2

Python 3 is needed to avoid raw_input.

CJam, 41 39 37 34 bytes
"$%&8Badopq#0469@Rbeg"_A<eu+qfe=1b

Thanks to @jimmy23013 for golfing off 3 bytes!
Try it online.
How it works
"$%&8Badopq#0469@Rbeg"             e# Push that string.
                      _A<          e# Retrieve the first 10 characters.
                         eu+       e# Convert to uppercase and append.
                                   e# This pushes "$%&8Badopq#0469@Rbeg$%&8BADOPQ".
                            q      e# Read from STDIN.
                             fe=   e# Count the occurrences of each character.
                                1b e# Base 1 conversion (sum).

"$%&8Badopq#0469@Rbeg"_A<eu+.

@jimmy23013: I had tried a few variations of eu and el, but I never found that. Thanks!

sed, 51
With golfing help from @manatwork and @TobySpeight:
s/[$%&8B]/oo/g
s/[^#0469@ADOPQRabdegopq]//g
s/./1/g

Input from STDIN.  With this meta-question in mind, the output is in unary:
$ echo 'Programming Puzzles and Code-Golf
4 8 15 16 23 42
All your base are belong to us
Standard loopholes apply
Shortest answer in bytes is the winner!' | sed -f countercounter.sed
1111111111111
11111
111111111111
111111111111
11111111
$

Perl, 41
$_=y/#0469@ADOPQRabdegopq//+y/$%&8B//*2

41 characters +1 for the -p flag.
This uses y/// to count the characters.
echo 'Programming Puzzles and Code-Golf' | perl -pe'$_=y/#0469@ADOPQRabdegopq//+y/$%&8B//*2'

K, 54 43 42 37 bytes
+//(30#"$%&8B#0469@ADOPQRabdegopq"=)'

Cut off 5 bytes thanks to @JohnE!
Older version:
f:+/(#&"#0469@ADOPQRabdegopq$%&8B$%&8B"=)'

Original:
f:+/{2-(5="$%&8B"?x;20="#0469@ADOPQRabdegopq"?x;0)?0}'

The #& inside the parens could just as easily be +/, which means you could go further with +//"#0469@ADOPQRabdegopq$%&8B$%&8B"=\:. Finally, it's not necessary to have the f: since the function can be used in tacit form. That would bring you down to 38!

Unfortunately the trick a few other solutions have employed to compact the lookup table comes out dead even with the current 38 byte solution: +//(30#"$%&8B#0469@ADOPQRabdegopq")=\:. This may be the best we can do.

haha, no sooner did I post that than I saved a character: +//(30#"$%&8B#0469@ADOPQRabdegopq"=)'

GNU APL, 39 bytes
+/⌈20÷⍨26-'$%&8B#0469@ADOPQRabdegopq'⍳⍞

Try it online in GNU APL.js.
How it works
                                      ⍞ Read input.
          '$%&8B#0469@ADOPQRabdegopq'⍳  Compute the indexes of the input characters
                                        in this string. Indexes are 1-based.
                                        26 == 'not found'
       26-                              Subtract each index from 26.
   20÷⍨                                 Divide those differences by 20.
  ⌈                                     Round up to the nearest integer.
+/                                      Add the results.

JavaScript, 86
I/O via popup. Run the snippet in any drecent browser to test.

for(c of prompt(t=0))c='$%&8B#0469@ADOPQRabdegopq'.indexOf(c),~c?t+=1+(c<5):0;alert(t)

Python 2, 96 90 75 67+2 = 69 Bytes
Can't think of any other way to do this... is what I would have thought until I saw xnor's solution. I'll post what I had anyways.
Thanks to FryAmTheEggman for saving 6 bytes
Alright, now I'm happy with this.
Thanks to xnor for the find trick, saving 4 bytes.
Added two bytes since input needs to be enclosed in quotes.
print sum('#0469@ADOPQRabdegopq$%&8B'.find(x)/20+1for x in input())

I like the clever use of indexes! Also, python 3's a bit shorter because it uses input instead of raw_input.

@manatwork It works fine in Python 2 with enclosing quotes..

Oh, I see. Sorry, I combined it with @DJMcMayhem's Python 3 comment.

C, 127 bytes
n;f(char*i){char*o="#0469@ADOPQRabdegopq",*t="$%&8B";for(;*i;i++)if(strchr(o,*i))n++;else if(strchr(t,*i))n+=2;printf("%d",n);}

Pretty straightforward. Ungolfed version:
int num = 0;
void f(char* input)
{
    char *one="#0469@ADOPQRabdegopq";
    char *two="$%&8B";

    for(;*input;input++)
        if(strchr(one, *input))     //If current character is found in first array
            num ++;
        else if(strchr(two, *input))//If cuurent character is found in second array
            num += 2;

    printf("%d", num);
}

Test it here
If function arguments are not allowed, then the stdin version takes up to 141 bytes:
n;f(){char*o="#0469@ADOPQRabdegopq",*t="$%&8B",i[99],*p;gets(i);for(p=i;*p;p++)if(strchr(o,*p))n++;else if(strchr(t,*p))n+=2;printf("%d",n);}

Note that the above version assumes that the input is atmost 98 characters long.
Test it here
Command-line arguments version (143 bytes):
n;main(c,v)char**v;{char*o="#0469@ADOPQRabdegopq",*t="$%&8B",*p=v[1];for(;*p;p++)if(strchr(o,*p))n++;else if(strchr(t,*p))n+=2;printf("%d",n);}

Test it here

@DJMcMayhem C is really not that bad. Try golfing in Fortran 77. ;)

Java, 162
class C{public static void main(String[]a){System.out.print(-a[0].length()+a[0].replaceAll("[#0469@ADOPQRabdegopq]","..").replaceAll("[$%&8B]","...").length());}}

Well if it has to be a full program... It's just a one-liner that matches characters and replaces them with a longer string. Then, returns the difference in length from the original. Unfortunately, java doesn't really have anything to just count the number of matches.
Here it is with line breaks:
class C{
    public static void main(String[]a){
        System.out.print(
                -a[0].length() +
                a[0].replaceAll("[#0469@ADOPQRabdegopq]","..")
                .replaceAll("[$%&8B]","...")
                .length()
                        );
    }
}

Pyth - 35 bytes
Uses the obvious method of in first + *2 in second. Thanks @FryTheEggman.
s/Lz+"#0469@ADOPQRabdegopq"*2"$%&8B

Try it here online.

Javascript, 114 95 bytes
alert(prompt().replace(/[#046@ADOPQRabdegopq]/g,9).replace(/[$%&8B]/g,99).match(/9/g).length)

Thanks to Ismael Miguel for helping me golf this.

93 bytes: alert(prompt().replace(/[#046@ADOPQRabdegopq]/g,9).replace(/[$%&8B]/g,99).match(/9/g).length)

Sorry for counting badly. Yes, its 95.

Ruby, 59 bytes
a=gets;p a.count('#0469@ADOPQRabdegopq')+2*a.count('$%&8B')

Input from command line or stdin. Shortest so far using a non-esoteric language.
Update: chilemagic beat me

J, 43
As a function:
   f=:[:+/[:,30$'$%&8B#0469@ADOPQRabdegopq'=/]
   f 'text goes here'
6

46 bytes (command line)
As a standalone command-line program:
echo+/,30$'$%&8B#0469@ADOPQRabdegopq'=/>{:ARGV

Save the above line as counter2.ijs and call from the command line:
$ jconsole counter2.ijs 'Programming Puzzles and Code Golf'
13

Copy-pasting the input into the code isn't allowed but a function which can take the input as an argument is ok. E.g. f=:your_function_code.

Retina, 44 bytes
1

[#0469@ADOPQRabdegopq]
1
[$%&8B]
11
[^1]
<empty line>

Gives output in unary.
Each line should go to its own file or you can use the -s flag. E.g.:
> echo "pp&cg"|retina -s counter
11111

The pairs of lines (pattern - substitute pairs) do the following substitution steps:

Remove 1's
Substitute 1-counter letters with 1
Substitute 2-counter letters with 11
Remove everything but the 1's

Julia, 77 74 bytes
t=readline();length(join(t∩"#0469@ADOPQRabdegopq")*join(t∩"\$%&8B")^2)

This reads text from STDIN and prints the result to STDOUT.
Ungolfed + explanation:
# Read text from STDIN
t = readline()

# Print (implied) to STDOUT the length of the intersection of t with the
# 1-closed counter list joined with the duplicated intersection of t with
# the 2-closed counter list
length(join(t ∩ "#0469@ADOPQRabdegopq") * join(t ∩ "\$%&8B")^2)

Example:
julia> t=readline();length(join(t∩"#0469@ADOPQRabdegopq")*join(t∩"\$%&8B")^2)
Programming Puzzles and Code Golf
13

rs, 56 bytes
_/
[#0469@ADOPQRabdegopq]/_
[$%&8B]/__
[^_]/
(_+)/(^^\1)

Live demo.

Just an fyi: I created a stub esolangs page for rs. You may wish to add to it: http://esolangs.org/wiki/Rs

@mbomb007 WOW!! That just made my day. :D

Well, "rs" doesn't come up in Google or anything since it's only two letters. This way, people can find it. :)

GNU APL, 37 characters
+/,⍞∘.=30⍴'$%&8B#0469@ADOPQRabdegopq'

construct a character vector which contains 2-counter characters twice (30⍴)
compare each input char with every character in the vector (∘.=)
sum up ravelled matches (+/,)

Haskell, 117
a="#0469@ADOPQRabdegopq"
b="$%&8B"
c n[]=n
c n(x:s)
 |e a=f 1
 |e b=f 2
 |True=f 0
 where
 e y=x`elem`y
 f y=c(n+y)s

c is a function c :: Int -> String -> Int which takes a counter and a string and goes through the string one letter at a time checking if the current letter is a member of the 1 point array or the 2 point array and calls itself for the rest of the string after incrementing the counter the appropriate amount.
Call with counter = 0 in ghci:
ghci> c 0 "All your base are belong to us"
12

C#, 157
void Main(string s){int v=0;v=s.ToCharArray().Count(c=>{return "#0469@ADOPQRabdegopq".Contains(c)||"$%&8B".Contains(c)?++v is int:false;});Console.Write(v);}

Ungolfed:
void Main(string s)
{
    int v = 0;

    v = s.ToCharArray()
    .Count(c =>
    {
        return "#0469@ADOPQRabdegopq".Contains(c) || "$%&8B".Contains(c) ? ++v is int:false;
    });

    Console.Write(v);
}

Converting the string into a char array, then seeing if each char is in either counter. If it is in the second one, I just have it incrementing the counter again.

Erlang, 103 bytes
This is a complete program that runs using escript. The first line of the file must be blank (adding 1 byte).
main([L])->io:write(c(L,"#0469@ADOPQRabdegopq")+2*c(L,"$%&8B")).
c(L,S)->length([X||X<-L,S--[X]/=S]).

Sample run:
$ escript closed.erl 'Shortest answer in bytes is the winner!'
8$

Welcome to PPCG, c(L,"#0469@ADOPQRabdegopq")+2*c(L,"$%&8B") is longer than c(L,"#0469@ADOPQRabdegopq$%&8B$%&8B") by 5 bytes :).

@Katyenko, thanks for the suggestion. Regrettably it doesn't work correctly for certain inputs. "$%&8B" counts for 5, but should be 10. The c/2 function works by filtering out the chars of the string that do not belong to a set of chars, such as "$%&8B". It checks for set inclusion by deleting the char to be tested from the set, then comparing the result with the original set. If they are not equal, then the char was in the set, and it is included. Multiple copies of chars in the set don't have any effect.

Ho, I see, I don't know erlang, was thinking you were using a string to count the counter :3. Anyway, nevermind, and well done :)

Javascript 159, 130 Bytes
function c(b){return b.split("").map(function(a){return-1!="$%&8B".indexOf(a)?2:-1!="#0469@ADOPQRabdegopq".indexOf(a)?1:0}).reduce(function(a,b){return a+b})};

unminified:
function c(b) {
    return b.split("").map(function(a) {
        return -1 != "$%&8B".indexOf(a) ? 2 : -1 != "#0469@ADOPQRabdegopq".indexOf(a) ? 1 : 0
    }).reduce(function(a, b) {
        return a + b
    })
};

With the help of @edc65:
function c(b){return b.split('').reduce(function(t,a){return t+(~"$%&8B".indexOf(a)?2:~"#0469@ADOPQRabdegopq".indexOf(a)?1:0)},0)}

As ~ -1 == 0, you can write ~x? instead of -1 != x?. See me answer for an example of use.

function c(b){return b.split('').reduce(function(t,a){return t+(~"$%&8B".indexOf(a)?2:~"#0469@ADOPQRabdegopq".indexOf(a)?1:0)},0)} No need to have map then reduce

C, 99 bytes
n;f(char*i){for(char*o="#0469@ADOPQRabdegopq$%&8B",*t=o+20;*i;)n+=2-!strchr(o,*i)-!strchr(t,*i++);}

Explanation
I further golfed the answer of Cool Guy; it got too long to be a comment.  Instead of the if/else, I took advantage of ! converting a pointer to bool.  I also made o include t so that I could add "is in o" and "is in t" for the total number of counters.
Expanded code
#include <string.h>
int num = 0;

void f(char* input)
{
    char *one = "#0469@ADOPQRabdegopq"  "$%&8B";
    char *two = strchr(one, '$');

    while (*input) {
        num += 2 - !strchr(one, *input) - !strchr(two, *input));
        ++input;
    }
}

Output is in num, which must be cleared before each call.
Test program and results
#include <stdio.h>
int main() {
    const char* a[] = {
        "Programming Puzzles and Code-Golf",
        "4 8 15 16 23 42",
        "All your base are belong to us",
        "Standard loopholes apply",
        "Shortest answer in bytes is the winner!",
        NULL
    };
    for (const char** p = a;  *p;  ++p) {
        n=0;f(*p);
        printf("%3d: %s\n", n, *p);
    }
    return 0;
}

 13: Programming Puzzles and Code-Golf
  5: 4 8 15 16 23 42
 12: All your base are belong to us
 12: Standard loopholes apply
  8: Shortest answer in bytes is the winner!
 37: n;f(char*i){for(char*o="#0469@ADOPQRabdegopq$%&8B",*t=o+20;*i;)n+=2-!strchr(o,*i)-!strchr(t,*i++);}

The code itself contains 37 counters by its own metric.


text:
A Spintax {Task|Problem|Question}
Article Spinning with Spintax
Article spinning is a search engine optimization technique by which search engine optimizers post a unique version of relevant content on article directories, web 2.0 sites, or other sources for backlinks.
It is occasionally used by website authors on their own sites but usually avoided because the quality of spun content will be lower than hand written content. Spinning works by rewriting existing articles, or parts of articles, and replacing specific words, phrases, sentences, or even entire paragraphs with any number of alternate versions to provide a slightly different variation with each spin.
This process can be completely automated or rewritten manually. Your job today will be to create a program or function which interprets a string containing Spintax, the syntax by which a program would read the different options available. Below is an example string that uses Spintax:
{Hello|Hi there|Bonjour}, user! {What's up?|How are you?|Feeling alright?|I caught a fish!}

As you can see, sections of the string that are to be 'spun' are enclosed in curly braces, where individual options are split by the | character. Here are some example sentences this could produce.
Hi there, user! What's up?
Hello, user! How are you?
Bonjour, user! Feeling alright?
Hello, user! What's up?
Hi there, user! I caught a fish!

Your Job
Your mission, should you choose to accept it, is to create a program or function which takes an input string that may or may not contain Spintax, then print 5 versions of the string, randomly selecting one of the choices from each block of options. You can make a few assumptions:

You will not need to handle nested Spintax ({This|is {an|one}|example}).
The |,{ and } characters will not occur anywhere else other than within a Spintax block.
You do not need to check if the 5 output sentences are distinct, as long as the code selects options using your language's random number function.
You may assume the input ends with a newline.

Rules

No standard loopholes.

Tests
1. {A|The|One} {quick|magnificent|charming|lucky|fast|super|cool} {gold|tan|yellow|white|brown|silver} {beaver|packrat|cat|lion|tiger|fox|dog|wolf} {consumed|ate|pilfered} my {pastry|strudel|cake}.
-------------------------------------------
One cool brown wolf consumed my pastry.
...(3 more here)...
The charming yellow beaver ate my cake.
-------------------------------------------
2. This sentence is valid, and happens to have no Spintax!
-------------------------------------------
This sentence is valid, and happens to have no Spintax!
...(3 more here)...
This sentence is valid, and happens to have no Spintax!
-------------------------------------------
3. {beg|get|ton|sun|bun|can|top|big}{2|3|4|5}{A|B|C|D|E|F|G}{2|3|4|5|6|7}{at|as|be|ex|hi|}{!|#|%}
-------------------------------------------
top2F2hi%
...(3 more here)...
big3E4ex#

A fourth test can be found here.

This is code-golf, so fewest number of bytes wins.

Now, with a slight change... mad libs!

What types of characters can we expect in the input?

@Sp3000 Everything from ASCII 32-127. The only place where {,|,} is going to be found in the input string is where there is Spintax.

Pyth, 18
V5sOMcR\|scR\{cz\}

Try it online here
Explanation:
V5sOMcR\|scR\{cz\}                     : z = input()
V5                                     : do this 5 times
              cz\}                     : split z on the } character
          cR\{                         : split each element of the resulting list on {
         s                             : join the list of lists back into a list of strings
     cR\|                              : split these strings on the | character
   OM                                  : Choose a random element from each inner list
  s                                    : join those choices, and print them

My god, that was fast!

Ruby, 46
With command-line flag -p, run
($_*=5).gsub!(/{(.+?)}/){$1.split(?|).sample}

Read in a string with a trailing newline. Concatenate it to itself 5 times, mutate it in place, and output the result. /{(.+?)}/ is a regular expression with a lazy quantifier: without the ?, it would match the leftmost { to the rightmost } instead of the nearest one. $1 is a magic variable referring to the first capture group in each match, while the ?| literal refers to the | character. sample is an array method returning a random element.

CJam, 25 22 19 18 bytes
q5*'}/{'{/~'|/mR}/

This code requires the input to contain a trailing newline.
Try it online in the CJam interpreter.
How it works
q     e# Read from STDIN.
5*    e# Repeat the input five times.
'}/   e# Split at right curly brackets.
{     e# For each chunk:
  '{/ e#   Split at left curly brackets.
  ~   e#   Dump both chunks on the stack.
  '|/ e#   Split the right chunk at vertical bars.
  mR  e#   Select a chunk, pseudo-randomly.
}/    e#

In each iteration, two chunks (one constant, one variable) are left on the stack and will be printed when the program exits.

Python 3, 110 bytes
import re,random
exec('print("".join(random.choice(s.split("|"))for s in re.split("{(.*?)}",%r)));'%input()*5)

Regex splitting, like the others.
Python 3, 121 116 114 bytes
from random import*
exec(("print(%r[:-1]);"%(input()+'"')).translate({123:"'+choice(['",124:"','",125:"'])+'"})*5)

This one performs the appropriate replacements then evaluates it. If it wasn't for escaping backslashes and apostrophes, this would have turned out shorter.
For example, suppose we have the Spintax
I {like|hate} {Python|C}.

The .translate performs a few conversions to give:
print('I '+choice(['like','hate'])+' '+choice(['Python','C'])+'.')

Perl, 50
$_=$_ x5;s/{(.*?)}/@r=split"\\|",$1;$r[rand@r]/ge

49 characters +1 for -p.
It works by first setting $_ to the 5 sentences. Then it does a global search and replace, where we search for each { | | } group. It splits the group on |, and the picks a random element for the replacement.
Run with:
echo '{A|The|One} {quick|magnificent|charming|lucky|fast|super|cool} {gold|tan|yellow|white|brown|silver} {beaver|packrat|cat|lion|tiger|fox|dog|wolf} {consumed|ate|pilfered} my {pastry|strudel|cake}.' | perl -pe'$_=$_ x5;s/{(.*?)}/@r=split"\\|",$1;$r[rand@r]/ge'

$_ x=5 saves a few bytes.

Ostrich v0.7.0, 27 characters
{`{.*?}`{);(;"|/.,R*F=}X}5*

Explanation:
{...}5*  repeat 5 times
  `{.*?}`  regex to match "spintax" sections
  {...}X   replace with...
    );(;     remove first and last characters (the curly brackets)
    "|/      split on |
    .,R*     multiply length of that array by a random number
    F=       take the floor of that and get the nth element of the array

(note: the 0.7.0 release was made after this question was posted, but the answer is still valid as all the commits that made up that release were all pushed before this questions was posted.)

Pip, 25 22 20 bytes
Late to the party, but here's mine. Takes input as a command-line argument, which may need to be quoted.
L5P_@RR#_Ma^`}|{`^'|

Explanation:
L5                    Loop 5 times:
          a^`}|{`     Split cmdline arg on curly braces using regex
                 ^'|  Split each item of the result on pipe (if there isn't one,
                        the result is a single-item list)
         M            Map this function to each item a in the result:
   _@RR#_             Calculate a random number between 0 and len(item)-1; use it to
                        index into item
  P                   Print the resulting list, concatenating elements together

17 bytes (but not a valid submission)
L5PRC_Ma^`}|{`^'|

Requires the latest version of Pip, updated after this question was posted. The RC (random choice) operator was planned for some time, but I never got around to implementing it until just now. :^(
Learn more about Pip

Seriously? You write you own language to win golf contests?

@Chloe: CJam, GS2, Ostrich, pyg, Pyth, Retina and rs are all golfing languages invented by the users of this site.

JavaScript ES6, 86 84 bytes
f=s=>s.repeat(5).replace(/{(.+?)}/g,(_,e)=>(p=e.split`|`)[Math.random()*p.length|0])

This expects the input to have a trailing newline. It starts by repeating the input 5 times, and then replacing each Spintax string with a random word from it, which is obtained by splitting out the | characters and then choosing a random number between 0 and the length of the resulting array minus 1. In this case, |0 is just a shorter way of doing Math.floor. Thanks to vihan1086 for reminding me about tagged template strings.
The Stack Snippet below contains ungolfed and easily testable code.

f=function(s){
  return s.repeat(5).replace(/{(.+?)}/g,function(_,e){
    return (p=e.split('|'))[Math.random()*p.length|0]
  })
}

run=function(){document.getElementById('output').innerHTML=f(document.getElementById('input').value+'\n')};document.getElementById('run').onclick=run;run()
<input type="text" id="input" value="{A|The|One} {quick|magnificent|charming|lucky|fast|super|cool} {gold|tan|yellow|white|brown|silver} {beaver|packrat|cat|lion|tiger|fox|dog|wolf} {consumed|ate|pilfered} my {pastry|strudel|cake}." style="width: 400px;" /><button id="run">Run</button>

|0 is equivalent to Math.floor not Math.round. Although that is what you want as Math.round would provide uneven distribution.

@GeorgeReith You're right, I meant to put floor but accidentally put round. Thanks

Perl, 82 bytes
while($o=<>){for(0..4){$_=$o;s/{(.*?)}/@x=split\/\|\/,$1 and$x[rand@x]/ge;print;}}

Python 2, 139 bytes
Added two bytes for quotes around input string. If these are not needed let me know.
Try it here
import re,random
s=input()
exec"print''.join(t*(t!=''and(t[0]!='{'))or random.choice(t[1:].split('|'))for t in re.split('({.*?)}',s));"*5

Bash: 144 138 characters
IFS={} read -ap
w()(for o in "${p[@]}";{
[[ $o =~ \| ]]&&{
IFS=\| read -aa<<<"$o"
o=${a[RANDOM%${#a[@]}]}
}
echo -n "$o"
}
echo)
w
w
w
w
w

Sample run:
bash-4.3$ bash spintax.sh <<< "Look {ma'|daddy|mr. president}! No {bin|core|doc|find|mail}utils tools nor {Awk|Sed|jq|XML Starlet}!"
Look ma'! No docutils tools nor Awk!
Look daddy! No binutils tools nor XML Starlet!
Look mr. president! No docutils tools nor XML Starlet!
Look ma'! No docutils tools nor Awk!
Look mr. president! No binutils tools nor Sed!

You can save a few bytes by using w()(...) instead of w(){...} (allows to eliminate whitespace), printf instead of echo -n and curly brackets instead of do and done.

Thank you, @Dennis. Again. (Sadly is not the first time I forget these tricks.) Regarding printf, that would fail on input string containing “%”, unless I misunderstood something.

Javascript, 143 142 bytes
a=prompt(b=5);for(c=[];b--;c.push(a.replace(/{(.+?)}/g,function(_,j){return (d=j.split("|"))[d.length*Math.random()|0]})));alert(c.join("\n"))

Java, 243 215 242 234 bytes
int i,k;void f(String s){String a,b[],c=s;for(;k++<5;System.out.println(c),c=s)while((i=c.indexOf("{"))>=0){a=c.substring(i,c.indexOf("}")+1);b=a.replaceAll("\\{|\\}","").split("\\|");c=c.replace(a,b[(int)(Math.random()*b.length)]);}}

Finds strings within braces {} and replaces them with a random element from the array of strings created by splitting by the pipe character. (I realized a little too late that five sentences had to be printed :P)

Python 3, 97 bytes
Using a lambda function in regex substitution. This is somewhat similar to how I did it in my Spintax module https://github.com/AceLewis/spintax however it does not deal with nested Spintax or escaping the characters.
import re,random
print(re.sub("{(.*?)}",lambda x:random.choice(x.group(1).split('|')),input()*5))

If you do not assume the input ends with a newline then it will be 104 bytes.
import re,random
print(re.sub("{(.*?)}",lambda x:random.choice(x.group(1).split('|')),(input()+'\n')*5))

Japt -R, 18 bytes
5Ær"\{(.+?)}"Ïq| ö

Try it

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