text:
Score Tarzan's Olympic Vine-Swinging Routine
Olympic vine-swingers perform their routines in standard trees.  In particular, Standard Tree n has vertices for 0 up through n-1 and edges linking each nonzero vertex a to the vertex n % a below it.  So, for example, Standard Tree 5 looks like this:
3
|
2   4
 \ /
  1
  |
  0

because the remainder when 5 is divided by 3 is 2, the remainder when 5 is divided by 2 or by 4 is 1, and the remainder when 5 is divided by 1 is 0.
This year, Tarzan will be defending his gold with new routines, each of which begins at vertex n - 1, swings to vertex n - 2, continues to vertex n - 3, etc., until finally he dismounts to vertex 0.
The score for a routine is the sum of the scores for each swing (including the dismount), and the score for a swing is the distance within the tree between its start and end points.  Thus, Tarzan's routine on Standard Tree 5 has a score of 6:

a swing from 4 to 3 scores three points (down, up, up),
a swing from 3 to 2 scores one point (down),
a swing from 2 to 1 scores one point (down), and
a dismount from 1 to 0 scores one point (down).

Write a program or function that, given a positive integer n, computes the score of Tarzan's routine on Standard Tree n.  Sample inputs and outputs:
 1 ->  0
 2 ->  1
 3 ->  2
 4 ->  6
 5 ->  6
 6 -> 12
 7 -> 12
 8 -> 18
 9 -> 22
10 -> 32
11 -> 24
12 -> 34
13 -> 34
14 -> 36
15 -> 44
16 -> 58
17 -> 50
18 -> 64
19 -> 60
20 -> 66
21 -> 78
22 -> 88
23 -> 68
24 -> 82

Rules and code scoring are as usual for code-golf.

I fail to find this sequence in OEIS. Nice question.

Excellent spec!

@LeakyNun It should be added though. It is a very original sequence! (Even without the backstory)

C, 98 97 bytes
F(i){int c[i],t=i-2,n=0,p;for(;++n<i;)for(p=c[n]=n;p=i%p;c[p]=n)t+=c[p]<n-1;return i>2?t*2:i-1;}

This calculates the distance between each pair of points with the following formula:

Add the distance from the root to node A
Add the distance from the root to node B
Subtract 2* the length of the common root of A and B

This has the advantage that when applied to all pairs, it's the same as:

Add 2* the distance from the root to each node
Subtract 2* the length of the common root of each node pair
Subtract the distance from the root to the first node
Subtract the distance from the root to the last node

To make the logic simpler, we assume we're going from node 0 to node n-1, rather than n-1 to 0 as the question states. The distance from the root node to node 0 is obviously 0 (they're the same). And we can see that for (most) trees, the distance from the last node to the root is 2:
                    n+1 % n = 1  for all n > 1
and:                  n % 1 = 0  for all n >= 0
therefore:  n % (n % (n-1)) = 0  for all n > 2

This means we have some special cases (n<2) but we can account for those easily enough.
Breakdown:
F(i){                               // Types default to int
    int c[i],                       // Buffer for storing paths
        t=i-2,                      // Running total score
        n=0,                        // Loop index
        p;                          // Inner loop variable
    for(;++n<i;)                    // Loop through all node pairs (n-1, n)
        for(p=c[n]=n;p=i%p;c[p]=n)  //  Recurse from current node (n) to root
            t+=c[p]<n-1;            //   Increase total unless this is a common
                                    //   node with the previous path
    return i>2?   :i-1;             // Account for special cases at 1 and 2
               t*2                  // For non-special cases, multiply total by 2
}

Thanks @feersum for 1 byte saved

Bonus: Trees!
I wrote a quick-and-dirty program to see what these trees look like. Here's some of the results:
6:

5 4
| |
1 2 3
 \|/
  0

8:

  5
  |
7 3   6
|  \ /
1   2   4
'--\|/--'
    0

13:

   08
    |
11 05   10 09 07
 |   \ /    |  |
02   03    04 06 12
 '-----\  /---'--'
        01
         |
        00

19:
   12
    |
   07   14
     \ /
     05    15 11
       \  /    |
17      04    08 16 13 10
 |       '-\  /--'   |  |
02          03      06 09 18
 '---------\ |/-----'--'--'
            01
             |
            00

49:

                         31
                          |
           30            18   36
            |              \ /
           19   38 27      13    39 29    32
             \ /    |        \  /    |     |
   26        11    22 44      10    20 40 17   34
    |         '-\  /--'        '-\  /--'    \ /
47 23   46       05               09        15    45 43 41 37 33 25    35 28
 |   \ /          '--------------\ |/-------'-----'   |  |  |  |  |     |  |
02   03                           04                 06 08 12 16 24 48 14 21 42
 '----'--------------------------\ |/----------------'--'--'--'--'--'    \ |/
                                  01                                      07
                                   '-----------------\  /-----------------'
                                                      00

There are some superfluous parentheses in the return statement.

@feersum d'oh! They weren't always superfluous, but then I changed the special case handling. Thanks!

Love the visualizations!

Python 2, 85 bytes
def f(a,i=1):h=lambda n:n and{n}|h(a%n)or{0};return i<a and len(h(i)^h(i-1))+f(a,i+1)

Perl, 65 59 55 54 bytes
Includes +2 for -ap
Run with the tree size on STDIN:
for i in `seq 24`; do echo -n "$i: "; vines.pl <<< $i; echo; done

vines.pl:
#!/usr/bin/perl -ap
$_=map{${"-@F"%$_}|=$_=$$_|$"x$p++.1;/.\b/g}1-$_..-1

Explanation
If you rewrite the tree
3
|
2   4
 \ /
  1
  |
  0

to one where each node contains the set of all its ancestors and itself:
 {3}
  |
{2,3}   {4}
   \    /
    \  /
  {1,2,3,4}
      |
 {0,1,2,3,4}

Then we can describe e.g. all the nodes the path from 4 to 3 as:

All nodes that contain 3 but not 4 (going down from 3)
All nodes that contain 4 but not 3 (going down from 4)
The highest node that contains both 3 and 4 (the join)

The number of edges is one less than the number of nodes so we can use that to
ignore the join point, so the number of edges on the path from 4 to 3 is 3 because:

The number of nodes that contain 3 but not 4: 2 nodes
The number of nodes that contain 4 but not 3: 1 node

Notice that this also works for a path that directly goes down to its target, e.g. for the path from 3 to 2 the number of edges is 1 because:

The number of nodes that contain 2 but not 3: 0 nodes
The number of nodes that contain 3 but not 2: 1 node

We can then sum over all these combinations.
If you instead look at just a node, e.g. node 2 with ancestor set {2,3}. This node is going to contribute once when processing the path 2 to 1 because it contains a 2 but not a 1. It will contribute nothing for the path 3 to 2 since it has both 2 and 3, but it will contribute once when processing the path 4 to 3 since it has 3 but no 4. In general a number in the ancestor set of a node will contribute one for each neighbour (one lower of higher) that is not in the set. Except for the maximum element (4 in this case) which only contributes for the low neighbour 3 since there is no path 5 to 4. Simular 0 is one sided, but since 0 is always at the root of the tree and contains all numbers (it is the ultimate join and we don't count joins) there is never any contribution from 0 so it's easiest to just leave node 0 out altogether.
So we can also solve the problem by looking at the ancestor set for each node, count the contributions and sum over all nodes.
To easily process neighbours I'm going to represent the ancestor sets as a string of spaces and 1's where each 1 at position p represents that n-1-p is an ancestor. So e.g. in our case of n=5 a 1 at position 0 indicates 4 is an ancestor. I will leave off trailing spaces. So the actual representation of the tree I will build is:
" 1"
  |
" 11"   "1"
   \    /
    \  /
   "1111"

Notice that I left out node 0 which would be represented by "11111" because I'm going to ignore node 0 (it never contributes).
Ancestors with no lower neighbour are now represented by the end of a sequence of 1's. Ancestors with no higher neighbour are now represented by the start of a sequence of 1's, but we should ignore any start of a sequence at the start of a string since this would represent the path 5 to 4 which doesn't exist. This combination is exactly matched by the regex /.\b/.
Building the ancestor strings is done by processing all nodes in the order n-1 .. 1 and there set a 1 in the position for the node itself and doing an "or" into the descendant.
With all that the program is easy enough to understand:
-ap                                                  read STDIN into $_ and @F

   map{                                    }1-$_..-1 Process from n-1 to 1,
                                                     but use the negative
                                                     values so we can use a
                                                     perl sequence.
                                                     I will keep the current
                                                     ancestor for node $i in
                                                     global ${-$i} (another
                                                     reason to use negative
                                                     values since $1, $2 etc.
                                                     are read-only
                       $$_|$"x$p++.1                 "Or" the current node
                                                     position into its ancestor
                                                     accumulator
                    $_=                              Assign the ancestor string
                                                     to $_. This will overwrite
                                                     the current counter value
                                                     but that has no influence
                                                     on the following counter
                                                     values
       ${"-@F"%$_}|=                                 Merge the current node
                                                     ancestor string into the
                                                     successor
                                                     Notice that because this
                                                     is an |= the index
                                                     calculation was done
                                                     before the assignment
                                                     to $_ so $_ is still -i.
                                                     -n % -i = - (n % i), so
                                                     this is indeed the proper
                                                     index
                                     /.\b/g          As explained above this
                                                     gives the list of missing
                                                     higher and lower neighbours
                                                     but skips the start
$_=                                                  A map in scalar context
                                                     counts the number of
                                                     elements, so this assigns
                                                     the grand total to $_.
                                                     The -p implicitly prints

Notice that replacing /.\b/ by /\b/ solves the roundtrip version of this problem where tarzan also takes the path 0 to n-1
Some examples of how the ancestor strings look (given in order n-1 .. 1):
n=23:
1
 1
  1
   1
    1
     1
      1
       1
        1
         1
          1
          11
         1  1
        1    1
       1      1
      11      11
     1          1
    11  1    1  11
   1              1
  1111  11  11  1111
 111111111  111111111
1111111111111111111111
edges=68

n=24:
1
 1
  1
   1
    1
     1
      1
       1
        1
         1
          1
           1
          1 1
         1   1
        1     1
       1       1
      1         1
     1  1     1  1
    1             1
   11    1   1    11
  1   1         1   1
 1        1 1        1
1                     1
edges=82

Whoops, sorry I didn't realise your edit was only a few seconds old. Anyway, very neat approach and explanation!

@FryAmTheEggman No problem, we were just fixing the exact same layout problem. Anyway, yeah, I'm quite happy with how all the pieces came together in this program. I currently don't see any fat to be cut..

APL (Dyalog Extended), 36 bytes
{+/0 0⍉1↓⌊.+⍨⍛⌊⍨⍣≡⍵∨∘.(∨/,∊⍵|⍨,)⍨⍳⍵}

{+/0 0⍉1↓⌊.+⍨⍛⌊⍨⍣≡⍵∨∘.(∨/,∊⍵|⍨,)⍨⍳⍵}
                      (v/,∊⍵|⍨,)       are either of the arguments equal to 5 mod another argument
                  ⍵∨∘.(∨/,∊⍵|⍨,)⍨⍳⍵    matrix of distances
         ⌊.+⍨⍛⌊⍨⍣≡                     find minimum distances between each points
 +/0 0⍉1↓                              drop the first row, diagonal, sum

Try it online!

Mathematica, 113 103 102 bytes
(r=Range[a=#-1];Length@Flatten[FindShortestPath[Graph[Thread[r<->Mod[a+1,r]]],#,#2]&@@{#,#-1}&/@r]-a)&

-10 bytes thanks to @feersum;
-1 byte thanks to @MartinEnder
The following is far quicker (but longer, unfortunately, at 158 bytes):
(a=#;If[a<4,Part[-{1,1,1,-6},a],If[EvenQ@a,-2,1]]+a+4Total[Length@Complement[#,#2]&@@#&/@Partition[NestWhileList[Mod[a,#]&,#,#!=0&]&/@Range@Floor[a/2],2,1]])&

I believe you can assign things without using With. Also it looks like every time Range is used, a is the argument, so that could be factored out.

r=Range[a=#-1] saves a byte.

J, 37 bytes
[:+/2(-.+&#-.~)/\|:@(]|~^:(<@>:@[)i.)

Usage:
   f=.[:+/2(-.+&#-.~)/\|:@(]|~^:(<@>:@[)i.)
   f 10
32
   f every 1+i.20
0 1 2 6 6 12 12 18 22 32 24 34 34 36 44 58 50 64 60 66

Try it online here.

I'd be interested to see a breakdown of how this works. Also the tryj.tk service seems to be broken ("failed to read the localStorage…" and "$(…).terminal is not a function")

@Dave that site doesn't work for me too on Chrome, but works if I try using IE or Edge, however I do recommend installing J (link) if you are interested in it!

@miles Weird, for me it works for all browsers (FF,Chrome,IE).

It did work for me using Chrome, but it stopped working a few months ago and began responding with a similar error message to Dave's

@Edward Will do when I find some time.

JavaScript (ES6), 118 116 bytes
n=>[...Array(n)].map(g=(_,i)=>i?[...g(_,n%i),i]:[],r=0).reduce(g=(x,y,i)=>x.map(e=>r+=!y.includes(e))&&i?g(y,x):x)|r

Lack of a set difference function really hurts, but some creative recursion reduces the byte count a bit. Edit: Saved 2 bytes by removing an unnecessary parameter.

source: Stack Exchange

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

sort: votes


text:
The Great Pyramid of ASCII
Introduction
It's 2600 BC and people are building pyramids now. They already made the basis of the pyramid but don't know how to continue. So, they called you for help.
The rules of making a pyramid is quite simple. For the layer above the previous layer, all you need to do is follow this step-by-step hand guide:

Cut the edges off the previous layer.

Above the / character, there must be a \ character and vice versa. This applies to every character except the edges.

The leftmost character is always a / and the rightmost character is always \.

Let's take an example of a basis for a pyramid:
//\/\/\\

We cut off the edges, leaving:
 /\/\/\

We change the forward slashes with backward slashes and vice versa:
 \/\/\/

The leftmost character is always a / and the rightmost character is always a \, so we change that:
 //\/\\

We place this layer on the previous layer:
 //\/\\
//\/\/\\

We continue until the top is reached (which looks like /\). So, eventually we get:
   /\
  //\\
 //\/\\
//\/\/\\

This is what you need to output.
The task
Given the basis of a pyramid (with a length greater than 3), output the full pyramid. You can safely assume that the leftmost character is / and the rightmost character is a \. You can also assume that the length of the basis is always even. The use of trailing spaces is allowed. The use of leading spaces is also allowed, as long as the pyramid stays in place. The use of 1 trailing and 1 leading newlines is allowed.
Test cases
Input: /\\\
Output:
 /\
/\\\

Input: //\\///\/\
Output:
    /\
   /\\\
  /\///\
 ///\\\/\
//\\///\/\

Input: /////////////\
Output:
      /\
     /\\\
    /////\
   /\\\\\\\
  /////////\
 /\\\\\\\\\\\
/////////////\

This is code-golf, so the submission with the least amount of bytes wins!

Reminds me of a elementary cellular automaton. Maybe that would make an interesting future challenge?

Jelly, 28 26 25 24 bytes
QṚ,QyḊḊṖṖj@QµÐĿµJ’⁶ẋ⁸żYṚ

-4 bytes thanks to Dennis
Recipe:
QṚ,QyḊḊṖṖj@QµÐĿµJ’⁶ẋ⁸żYṚ - one argument: input()
Q  Q       Q             - set of Left=input(): "/\"
 Ṛ                       - reverse Left: "\/"
  ,                      - Left-pair-Right: ["\/","/\"]
     ḊḊṖṖ                - dequeue Left twice, then pop twice: input()[2:-2]
    y                    - translate Right with mapping in Left: swaps internal slashes
         j@              - join Right with separator Left (@ swaps operands)
            µ  µ         - chain separators to form a 1,1,1 chain of chains
             ÐĿ          - loop while results are unique and collect them
                J        - yield [1,...,len(Left=input())]
                 ’       - decrement: [0,....len(input())-1]
                  ⁶      - " "
                   ẋ     - repeat Left Right times: ["", " ", ...]
                    ⁸ż   - zip Right and Left (⁸ is the link's Left argument):
                                ...pads the loop results
                      Y  - joins Left with line-feeds
                       Ṛ - reverse Left

(serve with lemonade, those pyramids make for thirsty workers)
Cook up your own slash pyramid at TryItOnline, or try out all the OP's suggested tasters

Retina, 59 56 54 52 bytes
{`^( *)/.(.*)..
$1 /$2\¶$0
T`/\\`Ro`(?<=^ +/).+(?=.)

Try it online!
Sample output
    /\
   /\\\
  /\///\
 ///\\\/\
//\\///\/\

46: http://retina.tryitonline.net/#code=e2BeKCAqLykuKC4qKS4uCiAkMSQyXMK2JDAKVDEtMmAvXFxgUm9gKD88PS8pLis&input=Ly9cXC8vL1wvXA

Pyth - 27 26 bytes
Reduces by the operation given in the OP until it repeats, which is the case for the blank line.
j_.e+*kdb.ujXtPtPNK"\/")_K

Test Suite.

Python 2, 78 bytes
f=lambda s,p='\n':(s[2:]and f('/%s\\'%s.translate('/\\'*128)[2:-2],p+' '))+p+s

A recursive function that outputs a string. Each layer of the pyramid is appended to the recursive call with the layer above it. The prefix p, which starts as a newline character gains one more space to make the triangle. The next layer is produced by swapping slashes, cutting off the first and last two symbols, and sandwiching it inside a left and right slash.
Python 3 can save a byte by doing *99 in the translate, as the length-256 requirement was dropped.

Clever using translate, but do we not have to print?

@JonathanAllan Not by default, you just have to output as the challenge says.

Haskell, 98 94 90 85 bytes
q=init.tail
s '/'='\\'
s _='/'
t#""=t++"\\\n"
t#l=(' ':t)#(s<$>q l)++t++l#""
("/"#).q

Usage example (note: in Haskell backslashes within literal strings have to be escaped \\):
*Main> putStr $ (("/"#).q) "//\\\\///\\/\\"
    /\
   /\\\
  /\///\
 ///\\\/\
//\\///\/\

Simple recurse approach: # does the work by mapping s, which flips the / and \, on the inner elements. The additional parameter t keeps track of the indention level and is expanded by a space on each recursive call.
Note: the second recursive call of # (-> l#"") jumps directly to the base case and is just a short way to add l, \ and a newline, i.e. it replaces ++l++"\\\n".
Edit: @xnor saved 5 bytes. Thanks!

l++"\\\n" looks like l#"".

An interesting way to swap two characters in a string s is [c|x<-s,c<-"ab",c/=x].

@xnor:  I've tried many things to get rid of the second ++"\\\n", but missed this one. Thanks!

Python 3, 108 104 101 94 91 89 88 bytes
b,f='\/';p=lambda t,n='\n':(t[2:]and p(f+''.join(map({f:b,b:f}.get,t[2:-2]))+b,n+' '))+n+t

-7 bytes thanks to xnor (letting me know we don't have to print!)
-3 bytes thanks to xnor (taking declaration outside of function declaration [d'oh])
-1 byte thanks to Dennis (replace f,b='/\\' with b,f='\/')
Test it on ideone. Note: input adjusted for double backslash (even raw strings won't work if they end in an odd number of backslashes).

You can jointly declare f,b='/\\' outside the function.

@xnor Thanks, I can't count ^^

JavaScript (ES6), 91 86 bytes

f=
(s,t=`
`)=>s[2]?f(`/${s.slice(2,-2).replace(/./g,c=>c>`/`?`/`:`\\`)}\\`,t+` `)+t+s:t+s
;
<input placeholder=Basis oninput=o.textContent=f(this.value)><pre id=o>

Output includes a leading newline character.

Ruby, 80 bytes
f=->s{s[-3]>?!&&f[" "+s.gsub(/^( *\/).|.(.$)?/){$1||$2||($&>?/??/:?\\)}]
puts s}

Ungolfed
f = ->s{
  s[-3] > ?! &&
    f[" " + s.gsub(/^( *\/).|.(.$)?/) {
      $1 || $2 || ($& > ?/ ? ?/ : ?\\)
    }]
  puts s
}

See it on ideone: http://ideone.com/HN0l0Y

my bad, didn't see that f in the body

Batch, 137 bytes
@echo off
if %1==/\ goto g
set s=%1
set s=\%s:~2,-2%/
set s=%s:/=-%
set s=%s:\=/%
set s=%s:-=\%
call %0 %s% "%~2 "
:g
echo %~2%1

Conveniently my use of%~2 and %1 means that I avoid having to spend bytes on setlocal. Explanation: Since Batch won't perform replacements on the empty string, we have to set up the next layer with the "wrong" edges, which will then be corrected as part of the string replacements.

05AB1E, 42 38 36 bytes
Dg;<FÐgÍ©£R®ÍN-£„/\Â‡'/ðN>×««R'\«}r»

Try it online!
Explanation:
# Read the input to the stack, loop for 0 .. len(input) / 2 - 1
Dg;<F
# Save the layer by pushing a copy on the stack, then push
# len(layer) - 2 to both the top of the stack and register_c
     ÐgÍ©
# a = pop(); b = pop(); push(b[0:a].reverse())
# This removes the last 2 characters and reverses
         £R
# push(register_c - 2 - N)
           ®ÍN-
# a = pop(); b = pop(); push(b[0:a])
# This removes the leading spaces and the first two slashes
               £
# Push "/\" and "\/" to the stack.
                 „/\Â
# Transliterate the slashes
                     ‡
# Add N+1 spaces and a / to the end of the (reversed) current layer
                      '/ðN>×««
# Reverse the layer and add a \ to the end.
                              R'\«
# End the loop
                                  }
# Reverse the stack and join it with newlines. It is implicitly printed.
                                   r»

(Thanks to Emigna for pointing out that DD -> Ð and DR -> Â).

Dg;GDðK¦¦¨¨„/\Â‡'\«R'/«ðN×«R}r» saves 7 bytes.

That looks different enough to me that I think you should add your own answer :).

BASH (sed + sort) 71 66 Bytes
sed -rne':l;p;y|\\|1|;y|/|\\|;y|1|/|;th;:h;s|\\.(.*)./| /\1\\|;tl'|sort
sed -rne':l;p;y|\\/|1\\|;y|1|/|;th;:h;s|\\.(.*)./| /\1\\|;tl'|sort

input comes from stdin.
Example:
echo '//\\' |sed -rne':l;p;y|\\|1|;y|/|\\|;y|1|/|;th;:h;s|\\.(.*)./| /\1\\|;tl'|sort

 /\
/\\\

Explanation:
-n - suppress auto print
:l - and  tl branch back to the beginning if this line was something other than /\
p  - print this line
y|\\/|1\\|;y|1|/| - replace \ with 1, / with \, and then 1 with /
th;:h - test and jump the the same place, so that only the next substitution gets tested later
s|\\.(.*)./| /\1\\| - replace the outside two slashed on each side with {space}/ and \
sort - space comes before / so this puts everything in the right order

Go, 300 276 bytes
package main
import(."regexp";."os")
func p(b string)string{
s:=MustCompile(`((\s*.)(\S*)(\S))`).FindStringSubmatch(b)
if s[3]!=""{r:=""
for _,c:=range s[3][1:len(s[3])-1]{r+=`\/`[c/64:c/46]}
return p(" "+s[2]+r+`\`)+s[1]+"\n"}
return s[1]+"\n"}
func main(){print(p(Args[1]))}

Long version:
package main

import (
    "regexp"
    "os"
)

func pyramid(base string) string {
    m := regexp.MustCompile(`^((\s*\S)(\S*)(\S))\s*`).FindStringSubmatch(base)
    if len(m[3]) > 0 {
        reversed := ""
        for _, c := range m[3][1:len(m[3]) - 1] {
            if c == '/' {
                reversed += `\`
            } else {
                reversed += `/`
            }
        }
        return pyramid(" " + m[2] + reversed + m[4]) + m[1] + "\n"
    }
    return m[1] + "\n"
}

func main() {
    print(pyramid(os.Args[1]))
}

import(."regexp";."os")
saves 2 bytes

@Sefa Thanks, I squeezed another 22 bytes out of it.

><>, 186 179 175 171 bytes
0&v &+1&<
  >i:0)?^~&2,:&v
v'/'~v?:-1<  }0<
o    >84*o^-$;?=@:&:&}:~<
\&::&{:@+$}1+[{l1-$-2*:&1+{
>}1-:?!v$:l2%?!vo
^o'/'v?~e  (*5a<
^o'\'< &   >~]a'\'oo{1+:^
  {$1- >:?!^

oooh man this is definitely my largest ><> answer yet.
There's still probably some golfing left to be done (the bottom area is pretty wasteful)
Try it online

05AB1E, 31 bytes
Dg;GDðK¦¦¨¨„/\Â‡'\«R'/«ðN×«R}r»

Explanation
Dg;G                        }    # for N in [1..len(input)/2-1]
    D                            # make a copy of previous layer
     ðK                          # remove all spaces
       ¦¦¨¨                      # remove first 2 and last 2 chars
           „/\Â‡                 # replace '/' with '\' and vice versa
                '\«              # add a backslash at the end
                   R             # reverse
                    '/«          # ad a slash at the end
                       ðN×«      # add N spaces
                           R     # reverse back
                             r»  # reverse stack and join on newline
                                 # implicitly print

Try it online

Perl, 53 52 bytes
Includes +1 for -p
Run with the input on STDIN, e.g.
./pyramid.pl <<< '//\\///\/\'

pyramid.pl:
#!/usr/bin/perl -p
s%^( *)/.(.*)..%"$1 \\$2/
"=~y|\\/|/\\|r.$&%e&&redo

Powershell, 142 bytes
function s($s){if($s.Trim()-eq'/\'){return $s}
$n=$s-replace'\\','#'-replace'/','\'-replace'#','/'-replace'\\.(.*)./',' /$1\'
(s($n))+"`n$s"
}

C#, 250 bytes
s=>{int j=s.Length/2,i=0;var l=new string[j];l[j-1]=s;while(++i<j){var n=l[j-i].Trim().Substring(1,l[j-i].Trim().Length-2);l[j-i-1]=new string(' ',i)+"/"+n.Replace("/","#").Replace(@"\","/").Replace("#",@"\").Substring(1,n.Length-2)+@"\";}return l;};

Can definitely be golfed further but my brain went dead so I decided to leave it as it is for the moment.

Stax, 22 bytes
à╝á■╬h½₧£Hδuóß►Δδ£ƒ┐#R

Run and debug it

all_licenses: 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/


text:
Exponentially Slimy Programming: Stacking Minecraft Slimes
Slimes are cube shaped enemies in Minecraft that break into multiple smaller versions of themselves when killed. For the purposes of this challenge we'll depict them as an 8×8 pixel image with 3 colors:

 ← True 8×8 version.
The precise RGB colors are:

0, 0, 0 for the eyes and mouth
110, 170, 90 for the central, darker green
116, 196, 96 for the outer, lighter green

Challenge
Write a program or function that takes in a positive integer N and outputs an image of N sizes of slimes packed into a rectangle. Going from left to right, the image should follow the pattern of having:

A stack of 2(N-1) 8×8 slimes.
A stack of 2(N-2) 16×16 slimes.
A stack of 2(N-3) 32×32 slimes.
And so on until the stack only contains one slime.

The slime images larger than the 8×8 version () are generated by nearest-neighbor upsampling (i.e. just doubling all the pixels). Note that you must use the exact slime design and colors given here.
The final image will contain 2N-1 slimes and be 2(N+3)-8 pixels wide and 2(N+2) pixels tall.
The image may be output in any common image file format, saved to a file or printed/returned as a raw data stream, or directly displayed during runtime.
The shortest code in bytes wins.
Examples
Your program should produce these exact results.
N = 1:

N = 2:

N = 3:

N = 4:

N = 5:

N = 6:

Larger N should work just as well.

I would upvote but I have no votes left. I'm leaving this comment so I'll remember to upvote tomorrow.

I'm upvoting your comment because I've run out of upvotes too.

"The slime images larger than the 8×8 version (￼) are generated by nearest-neighbor upsampling (i.e. just doubling all the pixels)." Did you mean quadruple all the pixels, make each pixel into a 2x2 square?

@Caridorc Doubling in each direction?

@wizzwizz4 Yes, each pixel becomes 4, correct?

@wizzwizz4 Ok, I get it now, thanks for explaining

MATL, 77 76 74 bytes
:"')^.,9&Xze`}+.E=p'F3ZaQ8e@qWt3$Y"G@-W1X"]&h[OOO;11 17E]5*29 7U24hhE&vEYG

The code works in this commit, which is earlier than the challenge.
You can try it in MATL online. This interpreter is still experimental. If it doesn't work, try refreshing the page and pressing "Run" again.
Here's an example run in the offline interpreter:

Explanation
:                     % Input N implicitly. Generate range [1 2 ... N]
"                     % For each k in [1 2 ... N]
  ')^.,9&Xze`}+.E=p'  %   Compressed string
  F3Za                %   Decompress with target alphabet [0 1 2]
  Q                   %   Add 1
  8e                  %   Reshape into 8×8 array containing values 1, 2, 3
  @qW                 %   Push 2 raised to k-1
  t                   %   Duplicate
  3$Y"                %   Repelem: interpolate image by factor 2 raised to k-1
  G@-W                %   Push 2 raised to N-k
  1X"                 %   Repmat: repeat the array vertically. Gives a vertical strip
                      %   of repeated subimages
]                     % End for each
&h                    % Concatenate all vertical strips horizontally. This gives a big
                      % 2D array containing 1, 2, 3, which represent the three colors
[OOO;11 17E]5*        % Push array [0 0 0; 11 17 9] and multiply by 5
29 7U24hhE            % Push array [29 49 24] and multiply by 2
&vE                   % Concatenate the two arrays vertically and multiply by 2.
                      % This gives the colormap [0 0 0; 110 170 90; 116 196 96]
YG                    % Take the array and the colormap and display as an image

"Larger N should work just as well.", but yours seems to give Out Of Memory/index errors already at n = 9. Is this only the online interpreter, or does this happen in the offline version as well?

@DavidMulder I have tested offline (compiler running on Matlab R2015b, Windows 7 64 bits, 4 GB RAM) for input up to 11 and it works. For 11 the result is an 8192×16376 image. For 12 it would be 16384×32760 (536 megapixels), requiring over 4 GB of RAM, which is more than my laptop can handle.

I like how the code starts with a smiley that is holding back his tears because of the intense emotions this code makes him feel :"')

Dyalog APL, 118 113 bytes
('P3',⌽∘⍴,255,∊)(3↑(116 196 96)(110 170 90))[⊃,/i{⊃⍪/⍵⍴⊂⍺⌿⍺/8 8⍴∊22923813097005 926134669613412⊤¨⍨⊂32⍴3}¨⌽i←2*⍳⎕]
assuming ⎕IO=0
From right to left:
i←2*⍳⎕  powers 1 2 4 ... 2n-1
i{ }¨⌽i iterate over powers (with ⍺) and reversed powers (⍵)
⊤¨⍨⊂32⍴3 decode each of the numbers on the left as 32 ternary digits
8 8⍴∊ flatten and reshape to 8×8
⍺⌿⍺/ replicate each row and column ⍺ times
⍵⍴⊂ take ⍵ copies
⊃⍪/ and stack them vertically
⊃,/ join all results horizontally
3↑(116 196 96)(110 170 90) colours; 3↑ extends them with (0 0 0)
[ ] index the colours with each element of the matrix; result is a matrix of RGBs
('P3',⌽∘⍴,255,∊) is a "train" - a function that returns 'P3' followed by the reversed shape of the argument, 255, and the argument flattened.

I think you can write your program assuming ⎕IO←0 and just state it as a condition, outside of byte count. Many APL systems use that as a default. (Including yours LOL)

JavaScript (ES7), 326 327 bytes
n=>{x=(d=document).body.appendChild(c=d.createElement`canvas`).getContext`2d`;c.width=2*(c.height=4*(p=2**n)));for(i=0;i<n;i++){c=-1;for(j of[...'0001000001111110022112200221122011111110011121110111111000010000'])for(x.fillStyle=['#74c460','#6eaa5a','#000'][j],c++,k=0;k<p;)x.fillRect(c%8*(_=2**i)+_*8,~~(c/8)*_+_*8*k++,_,_)}}

Ungolfed ES6 Version
Try it yourself.
(n=>{
    x=(d=document).body.appendChild(c=d.createElement`canvas`).getContext`2d`;
    c.width=2*(c.height=4*(p=Math.pow(2,n)));
    for(i=0;i<n;i++){
        c=-1;
        for(j of[...'0001000001111110022112200221122011111110011121110111111000010000'])
            for(x.fillStyle=['#74c460','#6eaa5a','#000'][j],c++,k=0;k<p;)
                x.fillRect(c%8*(_=Math.pow(2,i))+_*8,~~(c/8)*_+_*8*k++,_,_)
    }
})(4);

The only difference between the ES7 and ES6 version is using ** instead of Math.pow(). You can also see, how you can invoke the function – in this example with n=4.
Result

Edits

saved 1 byte - found an unnecessary trailing semicolon ;

This is pretty slow and might take some time for numbers greater 10.

the colours seem slightly off in the image here. Did you perhaps screenshot with f.lux on?

@Jezzamon Thanks for pointing it out – I did notice that, too. There's a slight possibility that I might have chosen "Convert document's colors to the working space" while importing the screenshot into Photoshop. The image is fixed now.

@Giles - Appreciate your comment, and in SO, that'd be totally appropriate, but here, we don't change others' programs - we tell them in comments.

C, 220 bytes
x,y,r;f(n){
printf("P3 %d %d 255 ",(8<<n)-8,4<<n);
for(y=0;y<4<<n;++y)for(r=0;r<n;++r)for(x=0;x<8<<r;++x)
puts("110 170 90\0 116 196 96\0 0 0 0"+12*
(117-"` t5L\rL\ru5tst5` "[x>>r+2|(y>>r)%8*2]>>(x>>r)%4*2&3));}

I added useless newlines for readability, score is without these newlines.
Defines a function f(n) that outputs a plain PPM image on stdout.

For some reason C answers are pretty elegant in my mind.

Mathematica, 267 255 254 225 212 bytes
G=10{11,17,9};Image@Join[##,2]&@@Table[Join@@Table[ImageData@ImageResize[Image[{t={g=G+{6,26,6},g,g,G,g,g,g,g},f={g,a=##&[G,G,G],a,g},e={g,b=0g,b,G,G,b,b,g},e,{a,a,G,g},{g,a,b,a},f,t}/255],4*2^j],2^(#-j)],{j,#}]&

Saved 29 42 bytes thanks to Martin Ender
Golfing suggestions welcome, especially for constructing the 8 by 8 (by 3) array s. Unfortunately, there is no "ArrayResize" analogue for ImageResize, so the array needs to be converted to an image (Image) before resizing, and then back to an array (ImageData) to do the Joining.
Ungolfed:
(* dark green, light green, black *)
G = 10 {11, 17, 9};
g = G + {6, 26, 6};
b = 0 g;

(* abbreviation for triple G sequence, top row, forehead, eye level *)
a = ##&[G, G, G];
t = {g, g, g, G, g, g, g, g};
f = {g, a, a, g};
e = {g, b, b, G, G, b, b, g};

(* slime *)
s =
  {
    t,
    f,
    e,
    e,
    {a, a, G, g},
    {g, a, b, a},
    f,
    t
  }/255;

(* jth column *)
c[n_, j_] := Join @@ Table[ImageData@ImageResize[Image[s], 4*2^j], 2^(n - j)]

(* final program *)
Image@Join[##, 2] & @@ Table[c[#, j], {j, #}] &

b=0g. To generate s it might be shorter to encode the pixel values as a base-3 number but I'd have to try to be sure. In the meantime, you can save bytes by not defining b, g, f, e, t until you need them, and s doesn't need a name at all and neither does c. For 2^(j-1)8 you can use 4*2^j. Applying all of those, I end up at 225 bytes: http://pastebin.com/YnkUwvwV

@MartinEnder Much gratitude, these are all very good suggestions! (Note to self: avoid naming things if possible, otherwise do the assignment at (rather than before) the first occurrence.)

I don't have time to figure it out completely right now, but here is an idea to avoid the Image, ImageResize, ImageData stuff. This bit blows up an array by a factor of 2: #&@@{##&@@{#,#}&//@x} where x is the array. So if you do store the initial 8x8 grid in a variable x, and then do x=#&@@{##&@@{#,#}&//@x} after each use, you can generate the successive tiles quite easily.

Whoops, that's 4 bytes longer than it needs to be: #&[##&[#,#]&//@x]

Hm, I'm not getting this to work yet, but you can save some more by a) using ##~Join~2 and b) f={g,a=##&[G,G,G],a,g} and then replace every further occurrence of G,G,G with a as well.

@MartinEnder a) While Join[##,2]& and ##~Join~2& are the same, Image@Join[##,2]& and Image@##~Join~2& aren't, as @ takes precedence over ~Join~. b) works fine, thanks.

Ah sorry about the Join, I had made some other local changes, where I didn't pass it straight to Image@.

Python 2.7: 424 412 405 376 357 Bytes
I'm a bit new to golfing.... here we go
from numpy import*
import PIL
def c(n,col):e=log2((col+8)/8)//1;r=2**e;t=2**(n-e-1);return tile(repeat(array([0x2df0777ca228b9c18447a6fb/3**i%3for i in range(64)],dtype=int8).reshape([8,8])[:,(col-(8*r-8))//r],r),t)
n=input();i=PIL.Image.fromarray(column_stack([c(n,col) for col in range(2**(n+3)-8)]),mode='P');i.putpalette('t\xc4`n\xaaZ'+' '*762);i.show()

ungolfed and length tested..
from numpy import*
import PIL

def c(n,col): #creates array for a given column
    s = array([0x2df0777ca228b9c18447a6fb/3**i%3for i in range(64)],dtype=int8).reshape([8,8]) #slime template (golfed inline)
    e=log2((col+8)/8)//1 #exponent for tiles and repititions
    r=2**e #number of repitions (scale factor)
    t=2**(n-e-1) #number of tiles (vertically)
    return tile(
            repeat(
             s[:,(col-(8*r-8))//r] #select appropriate column from template
              ,r) #repeat it r times
               ,t) #tile it t times

n = input()
arr = column_stack([c(n,col) for col in range(2**(n+3)-8)]) #create image array by stacking column function
i=PIL.Image.fromarray(arr,mode='P'); #colormap mode
i.putpalette('t\xc4`n\xaaZ'+' '*762); #set colormap
i.show()

s = r'''from numpy import*
import PIL
def c(n,col):e=log2((col+8)/8)//1;r=2**e;t=2**(n-e-1);return tile(repeat(array([0x2df0777ca228b9c18447a6fb/3**i%3for i in range(64)],dtype=int8).reshape([8,8])[:,(col-(8*r-8))//r],r),t)
n=input();i=PIL.Image.fromarray(column_stack([c(n,col) for col in range(2**(n+3)-8)]),mode='P');i.putpalette('t\xc4`n\xaaZ'+' '*762);i.show()'''

print len(s)

edit1: removed sys.argv[1] in favor of raw_input() to save extra import statement
edit2: shortened PIL import: removed from Image added PIL.
edit3: Thanks @Sherlock9 for the hex encode of the slime template
edit4: didn't need function def and used input() instead of raw_input()

any suggestions are more than welcome :) especially to shrink the template array

Something like using '0000100001111110111211100111111102211220022112200111111000001000' (your array backwards) converted from base 3 to base 16 0x2df0777ca228b9c18447a6fb. With that number, use code like this [0x2df0777ca228b9c18447a6fb//3**i%3 for i in range(64)] to get your integers in the correct order.

Ah, in Python 2, [0x2df0777ca228b9c18447a6fb/3**i%3for i in range(64)] may be better.

Thanks @Sherlock9 being new to golfing, could you explain how this (I assume) change of base code works?

First, I pretended that 0000100001111110111211100111111102211220022112200111111000001000 is a base 3 integer (because there are 3 integers, 0, 1, and 2). The shortest way to represent a number this that Python will still recognize as an number is in hexadecimal, base 16. So, in this case, I converted from base 3 to base 16 to get 0x2df0777ca228b9c18447a6fb.

The second part is to get your array back from that number 0x2df0777ca228b9c18447a6fb. This is simple. For a simpler example, to get the 0th digit from 01221100, just divide by 3 0 times, and then take the last digit (using mod 3) to get 0. To take the 2nd digit, divide by 3 2 times, then mod 3 to get 1. The list comprehension just divides by 3 64 times to get your full array back. If you have any more questions, we can discuss them in the PPCG chat.

R, 378 356 346 334 bytes
f=function(n){r=rep;k=r(0,4);m=r(1,6);L=c();for(i in 1:n)L=cbind(L,r(max(L,0)+2^(n-i):1,e=2^(i-1)));png(w=sum(w<-4*2^(1:n)),h=sum(h<-r(8,2^(n-1))));layout(L,w,h);for(i in 1:max(L)){par(mar=k);image(matrix(c(0,0,0,1,k,0,m,0,0,1,1,1,2,r(1,10),0,0,r(r(c(2,1,2,0),e=2),2),m,k,1,k),nr=8),col=c("#74C460","#6EAA5A",1),ax=F,an=F)};dev.off()}

Saves as a png file. Indented, with linefeeds:
f=function(n){
    r=rep
    k=r(0,4)
    m=r(1,6)
    L=c()
    for(i in 1:n)L=cbind(L,r(max(L,0)+2^(n-i):1,e=2^(i-1)))
    png(w=sum(w<-4*2^(1:n)),h=sum(h<-r(8,2^(n-1))))
    layout(L,w,h)
    for(i in 1:max(L)){
        par(mar=k)
        image(matrix(c(0,0,0,1,k,0,m,0,
                       0,1,1,1,2,r(1,10),0,
                       0,r(r(c(2,1,2,0),e=2),2),
                       m,k,1,k),
                     nr=8),
              col=c("#74C460","#6EAA5A",1),ax=F,an=F)
    }
    dev.off()
}

N=2:
N=3:
N=4:
Some explanations:
Here's the matrix that's being plotted (0 represent lightgreen, 1 darkgreen and 2 black; the matrix is tilted because columns are the y-axis and rows the x-axis):
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    0    0    0    1    0    0    0    0
[2,]    0    1    1    1    2    2    1    0
[3,]    0    1    1    1    2    2    1    0
[4,]    1    1    1    1    1    1    1    1
[5,]    0    1    2    1    1    1    1    0
[6,]    0    1    1    1    2    2    1    0
[7,]    0    1    1    1    2    2    1    0
[8,]    0    0    1    0    0    0    0    0

Each call to image plot that matrix (with each integer corresponding to a color).
For N=4, here is L (the layout matrix, each unique number represents one single plot), w (the widths of the matrix columns) and h (the heights of the matrix rows):
> L
     [,1] [,2] [,3] [,4]
[1,]    8   12   14   15
[2,]    7   12   14   15
[3,]    6   11   14   15
[4,]    5   11   14   15
[5,]    4   10   13   15
[6,]    3   10   13   15
[7,]    2    9   13   15
[8,]    1    9   13   15
> w
[1]  8 16 32 64
> h
[1] 8 8 8 8 8 8 8 8

Java 8, 512 bytes
import java.awt.*;n->new Frame(){{add(new Panel(){public void paint(Graphics g){for(int N=n,o=0,p=1,t,q,u;N-->0;o+=8*p,p*=2)for(t=(int)Math.pow(2,N);t-->0;g.setColor(new Color(116,196,96)),g.fillRect(o,q=u*t,u,u),g.setColor(new Color(110,170,90)),g.fillRect(p+o,p+q,6*p,6*p),g.fillRect(o,4*p+q,p,p),g.fillRect(3*p+o,q,p,p),g.fillRect(7*p+o,5*p+q,p,p),g.fillRect(3*p+o,7*p+q,p,p),g.setColor(Color.BLACK),g.fillRect(p+o,2*p+q,2*p,2*p),g.fillRect(5*p+o,2*p+q,2*p,2*p),g.fillRect(4*p+o,5*p+q,p,p))u=8*p;}});show();}}

Results for \$n=4,5,6\$:

Explanation:
import java.awt.*;       // Required import for almost everything
n->                      // Method with integer parameter and Frame return-type
  new Frame(){           //  Create the Frame
   {                     //   In an inner code-block:
     add(new Panel(){    //    Add a Panel we can draw on:
       public void paint(Graphics g){
                         //     Overwrite its paint method:
         for(int N=n,    //      Create a copy of the (effectively final) input
                 o=0,    //      Offset integer, starting at 0
                 p=1,    //      Power integer, starting at 1
                 t,      //      Inner loop integer, starting uninitialized
                 q,u;    //      Temp integers, starting uninitialized
             N-->0       //      Loop `N` in the range (`n`, 0]:
             ;           //        After every iteration:
              o+=8*p,    //         Increase the offset by 8 times the power
              p*=2)      //         And go to the next power by doubling it
           for(t=(int)Math.pow(2,N);
                         //       Set `t` to 2^`N`
               t-->0     //       Inner loop `t` in the range (2^`N`, 0]:
               ;         //         After every iteration:
                g.setColor(new Color(116,196,96)),
                         //          Set the color to the lighter green
                g.fillRect(o,q=u*t,u,u),
                         //          Draw the background rectangle,
                         //          and set `q` to `u*t` to save bytes
                g.setColor(new Color(110,170,90)),
                         //          Change the color to the darker green
                g.fillRect(p+o,p+q,6*p,6*p),
                         //          Draw the inner rectangle
                g.fillRect(o,4*p+q,p,p),
                         //          Draw the left dot
                g.fillRect(3*p+o,q,p,p),
                         //          Draw the top dot
                g.fillRect(7*p+o,5*p+q,p,p),
                         //          Draw the right dot
                g.fillRect(3*p+o,7*p+q,p,p),
                         //          Draw the bottom dot
                g.setColor(Color.BLACK),
                         //          Change the color to black
                g.fillRect(p+o,2*p+q,2*p,2*p),
                         //          Draw the left eye
                g.fillRect(5*p+o,2*p+q,2*p,2*p),
                         //          Draw the right eye
                g.fillRect(4*p+o,5*p+q,p,p))
                         //          Draw the mouth
             u=8*p;}});  //        Set `u` to `8*p` to save bytes
     show();}}           //    And afterwards show the Frame


text:
What's on the TV?
Challenge
Write a program which, using the XML data from the site here, display the name of the programme which is currently showing on BBC 1.
Information
All times are given at London time (GMT+1 at the time of posting and GMT+0 after the 30th October). Therefore, you should convert your local time to London time.
Each programme is given a start and end time. If the current time is after the start time and before the end time of a programme, that programme is currently showing. Your programme may handle overlaps in anyway you wish.
Your output must be the programme title, like so:
BBC News

However, if the programme has a subtitle (shown by the presence of the subtitle tag), the output should be like so:
Steptoe and Son: The Piano

Where Steptoe and Son is the title and The Piano is the subtitle. An example programme with a subtitle is as follows:
<programme>
    <subtitle>Newcastle</subtitle>
    <title>Flog It!</title>
    <end>1710</end>
    <start>1610</start>
    <desc>
      Antiques series. Paul Martin presents from the Discovery Museum in Newcastle. The items uncovered include a book of autographs with a local connection. Also in HD. [S]
    </desc>
</programme>

URL shorteners are disallowed but XML parsing libraries are allowed.
Winning
The shortest code in bytes wins.

Can you give a test case with a subtitle tag, because there (currently) is none in the linked xml file.

@KarlKastor There you go

Do we have to convert the local time to London time?

@KarlKastor Yes, you do

Must the code always grab the latest TV show, or can we grab the latest TV show as of now and use it?

@ColdGolf What? No, it has to be the latest

The link in your post has multiple show names. Which one do we use?

@ColdGolf The question describes how you use the start and end times to find the latest show...

I presume dates after midnight reflect programs that are on the day after the date specified by the date attribute in the root channel element?

Wait, what if there is no program currently showing? That seems to be the case as of 0423 UTC+1 according to the link provided, as the very first item shown is a program that starts at 0600 UTC+1.

@R.Kap "Your programme may handle overlaps in anyway you wish." I imagine this includes dead air (so I would think any of: "None"; ; ; something completely different -  would be fine). EDIT: Nope - currently showing is "BBC News" - note the date says 20th but it's the 21st - look near the end of the file :)

@HWalters Yes, they do

What exactly makes this "quick golf"?

@MartinEnder I suppose because I wrote it quickly :D

IMO this would be better if xml libraries were not allowed.

@SeanBean That'd change the focus of the question though, and probably make it a dupe

Bash + curl + XMLStarlet, 166 characters
d=`TZ=Europe/London date +%H%M`
curl -s bleb.org/tv/data/listings/0/bbc1.xml|xmlstarlet sel -t -m "//programme[start<=$d and end>$d]" -v title -m subtitle -o :\  -v .

Sample run:
bash-4.3$ date
Mon Aug 22 14:17:07 EEST 2016

bash-4.3$ bash bbc.sh
Bargain Hunt: Carmarthen

I'm not good at bash scripting , but is it possible to produce the website address via decompressing compressed version of address or something similar ?

Not really. Is too short for compression. Uncompressed has 36 bytes, compressed with gzip has 56 bytes. Other tools I tried produce even bigger result.

Python, 440 428 426 398 395 Bytes
-31 Bytes thanks to @Loovjo
Throws an error when it found the date.
import re,pytz,urllib
from datetime import*
x=urllib.urlopen("http://www.bleb.org/tv/data/listings/0/bbc1.xml").read().split("</p")[:-1]
for m,n in enumerate(re.search("\d*</s",i).group()for i in x):
 if n>datetime.strftime(datetime.now(pytz.utc).astimezone(pytz.timezone('Europe/London')),"%H%M"):print re.search(">.*?</t",x[m-1]).group()[1:-3],": "+re.search("e>.*?</s",x[m-1]).group()[2:-3],_

Please don't hurt me for parsing xml with regex.
version using a xml parser, 398 Bytes
import re,pytz,urllib
import xml.etree.ElementTree as ET
from datetime import*
x=list(ET.parse(urllib.urlretrieve("http://www.bleb.org/tv/data/listings/0/bbc1.xml")[0]).getroot())
for m,n in enumerate(i.find("start").text for i in x):
 if n>datetime.strftime(datetime.now(pytz.utc).astimezone(pytz.timezone('Europe/London')),"%H%M"):print x[m-1].find("title").text,": "+x[0].find("subtitle").text,_

It's okay, we've only got problems with the parsing of HTML with regex ;)

If I'm not mistaken, I think you can replace the break with something that causes an error (such as 1/0 (or maybe even _)). I'm pretty sure your submissions can exit with an error.

Are third party libs allowed? If yes, then you change urllib to use requests in your first example: x=requests.get(link).text.split("</p")[:-1]. That will save you 2 bytes.

@Zizouz212 Yes, requests is allowed


text:
Alphabet triangle strikes again
Task
Your task is to print this exact text:
A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ

Specs

You may do it in all-lowercase instead of all-uppercase.
Trailing newlines at the end of the triangle is allowed.
Trailing spaces after each line is allowed.
You must print to STDOUT instead of outputting an array of strings.

Scoring
This is code-golf. Program with lowest byte-count wins.

What do you mean by "strikes again"? Was there another challenge you made like this?

@Peanut http://codegolf.stackexchange.com/questions/87496/alphabet-triangle

Seems fairly trivial do we really need (another) alphabet challenge?

It is a good challenge, but I think we have outstripped saturation of these alphabet challenges, nothing personal.

Actually looking for an alphabet challenge that the letter at a position cannot be calculated by simple expressions from its coordinates involving the mod function. May make one myself if I have time.

Vim, 29 bytes
:h<_↵↵↵y$ZZ26P0qqa↵♥βjllq25@q

Where ↵ represents the Return key, ♥ the Escape key, and β the Backspace key.

How do you always beat me to the vim answer on these? Aargh +1 anyway, I can't not upvote vim! :)

I still think you should use ␛ instead of ♥. And ␈ instead of β. That's what these Unicode chars were made for. http://www.utf8icons.com/subsets/control-pictures

Python 2, 65 bytes
i=1
a=bytearray(range(65,91))*26
while a:print a[:i];a=a[i:];i+=2

I've changed the header to Python 2 because the code would not work in Python 3.

Jelly, 10 bytes
26RḤ’RØAṁY

Try it online!
How it works
26RḤ’RØAṁY  Main link. No Arguments.

26          Set the return value to 26.
  R         Range; yield [1, 2, ..., 25, 26].
   Ḥ        Unhalve; yield [2, 4, ..., 50, 52].
    ’       Decrement; yield [1, 3, ..., 49, 51].
     R      Range; yield [[1], [1, 2, 3], ..., [1, ..., 49], [1, ..., 51]].
      ØA    Yield the uppercase alphabet.
        ṁ   Mold the alphabet as the array of ranges. This repeats the uppercase
            letters over an over again, until all integers in the range arrays
            have been replaced with letters.
         Y  Join, separating by linefeeds.

Was "Double" called "Unhalve" back then? Also, ṁ is great!! [waiting to say congrats for 100k rep]

It's just a mnemonic. H is halve and Ḥ is its inverse (unhalve).

I just think of /2 or *2, so it's "Halve" or "Double". That's why I was confused.

Also 10 bytes: 27Ḷ²IRØAṁY

Also 10 bytes: 51Rm2RØAṁY

VBA Excel (80 bytes, 1742 bytes)

Excel, 1742 bytes
Inspired by the ugoren's creative answer, I managed to find an Excel formula to create the pattern as shown in the OP.
=MID(REPT("ABCDEFGHIJKLMNOPQRSTUVWXYZ",26),(ROW()-1)^2+1,2*ROW()-1)

Paste this formula in cell A1, then drag all over range A1:A26.
The length of the formula is 67 bytes but you have to replicate it 26 times, so it's equal to 67*26=1742 bytes. Here is the output:

Excel VBA, 80 bytes
Now it's possible we integrate Excel with VBA to automate the process and to save many bytes since VBA is built into most Microsoft Office applications, including Excel. Write and run the following code in the Immediate Window (use combination keys CTRL+G to display it in Visual Basic Editor):
[A1:A26]="=MID(REPT(""ABCDEFGHIJKLMNOPQRSTUVWXYZ"",26),(ROW()-1)^2+1,2*ROW()-1)"

The program works by printing the Excel formula above to the range A1:A26. Unfortunately, both Excel and VBA have no built-in alphabet.

The column names look like a built-in alphabet to me. Use the first 26 column names.

@mbomb007 So what? I think it would be harder to use them instead of strings.

@EriktheGolfer So? My point was that there is a builtin alphabet.

@mbomb007 You said "Use the first 26 column names", which I perceived as "Use the first 26 column names instead of what you currently use", that's why I replied.

@EriktheGolfer It's a suggestion. Idk how many bytes it'd be.

Haskell, 67 bytes
_#53=[]
s#i=take i s:drop i s#(i+2)
mapM putStrLn$cycle['A'..'Z']#1

A simple recursion over the length i of the line. In each step the next i chars are taken from an infinite repetition of the alphabet.

Mathematica, 90 bytes
StringRiffle[Flatten[Alphabet[]&~Array~26]~Internal`PartitionRagged~Range[1,51,2],"
",""]&

Anonymous function. Takes no input and returns a string as output. Golfing suggestions welcome. An example of what Internal`PartitionRagged does:
In[1]:= Internal`PartitionRagged[{2, 3, 5, 7, 11, 13}, {2, 3, 1}]

Out[1]= {{2, 3}, {5, 7, 11}, {13}}

Mathematica has a built-in for alphabet triangles?

C, 79 bytes
main(i,j){for(i=0,j=1;i<676;i++){putchar(i%26+65);if(j*j==i+1){puts("");j++;}}}

My first answer in C \o/
Golfing suggestions are more than welcome.

62: i;main(j){while(i<676)printf("\n%c"+(j*j^i++||!j++),i%26+65);}

@xsot Thanks but I'm afraid that leading newlines are not allowed.

But there's no leading newline?

60: i;main(j){for(;j<27;j*j^++i||puts("",j++))putchar(i%26+65);}

@immibis I guess I should post it then.

Brachylog, 37 bytes
26~l<:1aLc~j[@A:I],L~@nw
=:2%1,.#@l?,

Try it online!
Explanation

Main predicate:
26~l         Let there be a list of 26 elements
<            This list is an ascending list of integers
:1aL         Apply predicate 1 to that list ; the resulting list of strings is L
c            Concatenate the list of strings into one big string
~j[@A:I],    That big string is the result of juxataposing the alphabet I times to itself
L~@n         Create a string which when splitted on line breaks results in L
w            Write that string to STDOUT

Predicate 1: used to generate variable strings of odd lengths.
=            Assign a value to the Input
:2%1,        That value must be odd
.#@l?,       Output is a string of length Input

Finally you do an ascii-art challenge

@LeakyNun Would classify that as string manipulation more than ASCII art imo

Should I add that to the tag?

Nice use of the fact that the last line is the only line which ends in Z which is because 26 is square-free.

Perl, 42 41 39 bytes
perl -E '@b=(A..Z)x26;say splice@b,0,$#a+=2for@b'

Just the code:
@b=(A..Z)x26;say splice@b,0,$#a+=2for@b

An obvious shorter version unfortunately triggers an internal perl problem (Use of freed value in iteration):
say splice@b,0,$#a+=2for@b=(A..Z)x26

Pyramid Scheme, 1492 bytes
    ^         ^
   / \       / \
  /set\     /do \
 ^-----^   ^-----^
/a\   ^-  /!\   /[\
---  ^-  ^---  ^---^
    ^-  /=\   ^-  / \
   ^-  ^---^  -^ /out\
  ^-  ^-  /a\ ^- -----^
 ^-  / \  ---/[\     / \
 -^ /51 \   ^---^   /chr\
 ^- -----  ^-  / \  -----^
 -^       ^-  /do \     / \
 ^-      ^-  ^-----^   /10 \
 -^     /[\  -^   ^-   -----
 ^-    ^---^  -^  -^
 -^   / \  -^ /c\ ^-
 ^-  /set\ /[\--- -^
^-  ^-----^---^   ^-
-^ /a\   /+\  -^  -^
^- ---  ^---^  -^  -^
-^     /a\ /2\ / \  -^
 -^    --- ---/set\  -^
  -^         ^-----^ ^-
   -^       /c\   /a\-^
    -^      ---   --- -^
     -^               /[\
      -^             ^---^
       -^           ^-   -^
       /]\         / \    -^
      ^---^       /set\    -^
     ^-   -^     ^-----^    -^
    / \   ^-    /c\   /-\    -^
   /set\ ^-     ---  ^---^    -^
  ^-----^-          /c\ /1\    -^
 /b\   / \          --- ---    /]\
 ---  / -1\                   ^---^
      -----                  ^-  / \
                            / \ /out\
                           /set\-----^
                          ^-----^    -^
                         /b\   /?\    -^
                         ---  ^---^   / \
                             /!\  -^ /chr\
                            ^---  /+\-----^
                           /=\   ^---^   /+\
                          ^---^ /b\ /1\ ^---^
                         /b\ / \--- ---/ \ /b\
                         ---/25 \     /65 \---
                            -----     -----

Try it online!
Why? Why not?

Pyth, 12 bytes
jtc*G26*Rd26

Try it online!

JavaScript (ES6), 77 82 88
EcmaScript 6 required just to save 1 byte using a template string literal for newline.
for(i=r=l=o='';l+52;r++||(r=l-=2,o+=`
`))o+=(i++%26+10).toString(36);alert(o)

Less golfed
for(i = r = l = o = '';
    l + 52;
    r++ || (r = l -= 2, o += `\n`))
  o += (i++ % 26 + 10).toString(36);
alert(o);

Test

for(i=r=l=o='';l+52;r++||(r=l-=2,o+=`
`))o+=(i++%26+10).toString(36);alert(o)

\o/ an ES6 answer I can run in my browser

I stole your .toString(36) logic...now you have to beat 80 bytes!!

Ahh I concede, I can't think of any way to beat this with my library. Thanks for the challenge!

69

Husk, 10 bytes
Cİ1ṠṁK…"AZ

Try it online!
Explanation
Cİ1ṠṁK…"AZ
      …"AZ    Get the alphabet
   ṠṁK        Replace each letter with the whole alphabet
C             Cut the resulting string into lines with lengths
 İ1            equal to the list of odd numbers

JavaScript, 129 bytes
z=1,i=0,g=a=>{b=0,c="";while(a+a-1>b){c+='ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split``[i>26?i=0:i++];b++}console.log(c)};while(z<26)g(z++)

Using the spread operator could save you 3 bytes: [...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'] instead of 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split\``.

Pyke, 14 bytes
G26*WDoh<
Ko>D

Try it here!

Go, 133 bytes
package main
import S "strings"
func main(){s:=S.Repeat("ABCDEFGHIJKLMNOPQRSTUVXXYZ",26)
for i:=1;s!="";i+=2{println(s[:i]);s=s[i:]}}

MATLAB, 112 109 95 79 77 bytes
This will also work with Octave, you can try online here.
a=['' 65:90 65:90]';j=0;for i=1:2:52;b=circshift(a,j);j=j-i;disp(b(1:i)');end

So after some major changes, I've saved a further 14 32 bytes. This one is getting to be much more like the length I would have expected from MATLAB. I've left the old version below as it is substantially different.
a=['' 65:90 65:90]';        %Create 2 copies of the upper case alphabet
j=0;                        %Initialise cumulative sum
for i=1:2:52;               %For each line length
    b=circshift(a,j);       %Rotate the alphabet string by the cumulative offset
    j=j-i;                  %Update cumulative negative sum of offsets.
    disp(
         b(1:i)'            %Extract first 'line length' characters from rotated alphabet.
               );           %Display next line (disp adds newline automatically)
end

Original version:
a=['' repmat(65:90,1,26)];c=cumsum(1:2:51);disp(cell2mat(arrayfun(@(s,f)[a(s:f) 10],[1,c(1:25)+1],c,'Un',0)))

Wow that one ended up being longer than I thought it would. I'll see if I can't knock a few bytes off it.
An ungolfed version to explain:
a=['' repmat(65:90,1,26)]; %Create 26 copies of the upper case alphabet
c=cumsum(1:2:51);          %Calculate the end index of each row in the above array, by cumulatively summing the length of each line
disp(
     cell2mat(
              arrayfun(@(s,f)
                             [a(s:f) 10], %Extract the part of the alphabet and insert a new line.
                                         [1,c(1:25)+1],c, %start index is the previous end of line plus 1. End index is as calculated by cumsum.
                       'Un',0 %The returned values are not all the same length
                       )   %Do this for each line
              )            %Convert back to a matrix now new lines inserted
     )                     %And display it

Acknowledgements

3 bytes saved - thanks @LuisMendo

XPath 3.0 (and XQuery 3.0), 84 bytes
codepoints-to-string((0 to 25)!(subsequence(((1 to 26)!(65 to 90)),.*.+1,2*.+1),10))

Explanation:
(1 to 26)!(65 to 90) is the alphabet 26 times
(0 to 25)!(subsequence(XX, start, len),10) takes 26 subsequences of this, each followed by newline
subsequence(X, .*.+1, 2*.+1) takes successive subsequences with start position and length: (1, 1), (2, 3), (5, 5), (10, 9) etc.
codepoints-to-string() turns Unicode codepoints into characters

Bravo. I thought I knew what XQuery was. Turns out I had no idea.

I doubt that many of the posts here tell you much about the language they are written in.

Ruby, 46 bytes
26.times{|i|puts ([*?A..?Z]*26)[i*i,i*2+1]*""}

See it on ideone: http://ideone.com/3hGLB0

05AB1E (alternate) 15 bytes
A2×52µ¼D¾£,¾¼FÀ

Try it online!
Explanation:
A2×              # push a string containing a-za-z
   52µ           # Loop the rest of the program until counter = 52
      ¼          # increment counter (it's 0 initially)
       D         # Duplicate the alpha string on the stack
        ¾£       # Replace alpha with alpha[0..counter]
          ,      # Pop the substring and print it
           ¾¼FÀ  # rotate the alpha string left counter++ times.

R, 120 115 111 bytes
v=c();for(i in 1:26){v=c(v,c(rep(LETTERS,26)[(sum((b=seq(1,51,2))[1:i-1])+1):sum(b[1:i])],"\n"))};cat(v,sep="")

Ungolfed :
a=rep(LETTERS,26)
b=seq(1,51,2)
v=vector()

for(i in 1:26)
    {
    v=c(v,c(a[(sum(b[1:i-1])+1):sum(b[1:i])],"\n"))
    }

cat(v,sep="")

Basically, b is the vector of the odd numbers between 1 and 51, thus giving the length of each line. Obviously, the sum function sums the numbers of this vector, and gives the starting and ending indexes.
-5 bytes thanks to @plannapus !
-4 bytes thanks to @plannapus !

arf, sorry I didn't see that earlier, but since you're only using a once you don't actually need to define it, meaning you can shave a couple more bytes: b=seq(1,51,2);v=c();for(i in 1:26){v=c(v,c(rep(LETTERS,26)[(sum(b[1:i-1])+1):sum(b[1:i])],"\n"))};cat(v,sep="") works.

@plannapus Silly me ! Thanks again ! I also integrated the b=seq part in the main body, so it's even less readable !

R, 81 73 65 63 bytes
A simple for loop approach. Repeat the alphabet 26 times and loop through a sliding index range that is calculated using (i^2-2*i+2):i^2.
for(i in 1:26)cat(rep(LETTERS,26)[(i^2-2*i+2):i^2],"\n",sep="")

Batch, 123 bytes
@set s=
@for /l %%i in (1,2,51)do @call set s=%%s%%ABCDEFGHIJKLMNOPQRSTUVWXYZ&call echo %%s:~0,%%i%%&call set s=%%s:~%%i%%

Dyalog APL, 31 25 23 bytes
Requires ⎕IO←0, which is default on many systems.
↑(∊1,¨0⍴¨⍨2×⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them
(...)⊂ split on ones in
 ⍳26 zero through 25; {0, 1, 2, 3, ..., 25}
 2× multiply them by 2, {0, 2, 4, 6, ..., 50}
 0⍴¨⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.
 1,¨ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.
 ∊ flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}
↑ stack the strings
TryAPL online!
-6 thanks to @jimmy23013

26 51⍴(,↑1⍴¨⍨¯1+2×⍳26)\676⍴⎕A

↑(∊1,1,¨0⍴¨⍨2×⍳25)⊂676⍴⎕A

05AB1E, 18 17 bytes
26FA26×N>n£NnF¦},

Explanation
26F                 # for N in range(0, 26) do
   A26×             # the alphabet repeated 26 times
       N>n£         # take (N+1)^2 letters
           NnF¦}    # throw away the first N^2 letters
                ,   # print with newline

Try it online!

Actually, 27 26 22 20 17 bytes
Takes the lowercase alphabet 26 times, prints 1,3,5,...,(2*n+1) at a time. Golfing suggestions welcome. Try it online!
Edit: Many thanks and -4 bytes to Leaky Nun and his suggestions.
úlú*iúl`╜u╟Σ)2╖`n

Ungolfing:
úl    Pushes 26 (the length of the lowercase alphabet).
ú*    26 * the lowercase alphabet.
i     Flatten the string.
úl    Pushes 26.
  `     Start function.
  ╜u    Push register 0 (default: 0) and increment (call it len, from now on)
  ╟     Take len elements from the stack
  Σ     sum() into a string.
  )     Rotate the string to the bottom of the stack.
  2╖    Add 2 to register 0.
  `     End function.
n     Run the above function (26) times.

Dyalog APL, 18 bytes
↑2{⍺↓⍵⍴⎕a}/×⍨0,⍳26

18 bytes or 18 characters? To encode these 18 characters as 18 bytes, you need a custom character encoding; and we could compress any of the solutions if we choose our character encoding carefully enough.

@MichaelKay When can APL characters be counted as 1 byte each?

Will you explain this, or shall I?

JavaScript (Using external library - Enumerable) (90 88 86 80 bytes)
Link to lib: https://github.com/mvegh1/Enumerable
(z=_.Range)(0,26).WriteLine(x=>z(x*x,2*x+1).Write("",y=>(y%26+10).toString(36)))

Code explanation: Create range of ints 0 to 25, and for each write a new line according to the predicate. For each line, create a range of ints starting at the square of the current int, for a count of 2x+1. Then take that range, and join it into a string delimited by nothing where each int is casted to the String represented by the int ascii code

I highly doubt that the javascript answer without the library would be longer than this.

Exactly.

Ill have to optimize my answer ;)

86 bytes, bring it on vanilla JS!

Well, I already had borrowed your %26. Now can you do better?

Ahhhh I dont think I can beat 77!! Ill look later!

You should switch to lodash or something. I'm pretty sure lodash will give you much more leverage.

What do you mean "more leverage"? Just curious how so

PowerShell, 68 bytes
$a=-join(65..90|%{[char]$_})*26;26..1|%{$a=$a.Insert($_*$_,"`n")};$a

The section before the first semicolon produces a string containing 26 copies of the uppercase alphabet. The next section injects linebreaks at the index of each square number (working backward so I don't have to account for the shifting). Finally, the $a at the end just shoves that string variable onto PowerShell's equivalent of STDOUT.

TSQL, 129 bytes
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER

SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)FROM spt_values WHERE number<26and'P'=type

Ungolfed:
USE MASTER

SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)
FROM spt_values
WHERE number<26and'P'=type

Fiddle
Fiddle for older version using xml path

C#, 153 Bytes
using b=System.Console;class a{static void Main(){int i=0,j=0,k=0;while(i<26){b.Write((char)(65+j));j++;j%=26;k++;if(2*i+1==k){b.WriteLine();i++;k=0;}}}}

Compile using Microsoft .NET Framework 2.0 or later. (Written using Visual Studio 2015 Update 3.)

Rexx, 74 72 bytes
i=1;m=1;do 26;say substr(copies(xrange('A','Z'),26),i,m);i=i+m;m=m+2;end

Ungolfed:
i=1
m=1
do 26
  say substr(copies(xrange('A','Z'),26),i,m)
  i=i+m
  m=m+2
end

C, 60 bytes
i;main(j){for(;j<27;j*j^++i||puts("",j++))putchar(i%26+65);}

puts only takes one argument.  (Some undefined behaviour is permitted in codegolf normally but this is a bit too far outside the usual lanes)

@M.M Undefined behaviour is exploited all the time. The rule is that a submission is valid as long as it works in some compiler, otherwise we would have to explicitly rule out a long list of exceptions. This code works in gcc so it's a valid submission.

C++, 122 108 bytes
void a(){int a=65,l,i;for(l=1;l<53;l+=2){for(i=0;i<l;i++){std::putchar(a);a>90?a=65:a++;}std::cout<<'\n';}}

First time trying my hand at one of these, so it'll probably be super inefficient.
It creates an integer a, then enters a for loop with l representing the number of characters in a line (stopping when reaching the maximum amount, 53) Inside the loop, it enters another loop based on the value of l, which prints a to the console, then either increments it or sets it back to A. After completing that loop, it prints a newline to extend the pyramid.
EDIT: Improved by changing a from a char to an int, which eliminates the need for (int)a++ among other things and saves precious bytes. Also replaced the while statement with an equivalent for.

Hi, and welcome to PPCG! Nice first post!

C++, 111 bytes
void a(){int c=65,i,j;for(i=0;i<26;i++){for(j=0;j<=2*i;j++){std::cout<<(char)c;c++;if(c==91)c=65;}std::cout<<'\n';}}

First try at one of these.
Uses an int "c" to record which letter it needs to print at any given time. Once "c" passes 90 ('Z') it gets reset to 65 ('A'). Prints the pyramid using for loops.

Nice answer! You could do if(c<92)c=65 to take one byte off, and you might also be able to do int a() instead of void a(), but I'm not positive if that works without the return. Other than that, I think you need to include #include <iostream> in your byte count.

I believe you meant if(c>90)c=65, but thanks for the suggestion, it's a good idea. Also, I guess I'll include it, thanks.

PHP, 76 69 bytes
for(;$i<26&&$a.=join(range(A,Z));)echo substr($a,$i**2,1+2*$i++)."
";

Create 26 alphabet (more than enough) and contactenate them in $a
loop for i < 26
display $a substring start i^2, end 2*i+1

05AB1E, 14 13 11 bytes
A27×26L·<£»

Try it online!
Explanation:
A27×         # Push the alphabet repeated 27 times
    26L      # Push [1, 2, ..., 26]
       ·     # Multiply by 2 [2, 4, ..., 52]
        <    # Subtract 1 [1, 3, ..., 51]
         £   # Repeated slice
          »  # Join by newlines
             # Implicit print

MY-BASIC, 72 bytes

Anonymous function that takes  no input and outputs to the console.
For J=1 To 51
For K=1 To J
I=I Mod 26+1
Print Chr(64+I)
Next
Print;
Next

Try it online!

K4, 25 bytes
Solution:
-1(0,+\1+2*!25)_676#.Q.A;

Example:
q)k)-1(0,+\1+2*!25)_676#.Q.A;
A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ

Explanation:
Slice up a list of the alphabet repeated 26 times...
-1(0,+\1+2*!25)_676#.Q.A; / the solution
-1                      ; / print to STDOUT and swallow return
                    .Q.A  / uppercase alphabet A-Z
                676#      / 676 take from the alphabet
               _          / cut at indexes given by left
  (           )           / do this stuff together
           !25            / range 0..24
         2*               / multiply by 2
       1+                 / add 1
     +\                   / calculate sums of list
   0,                     / prepend 0

Pyth, 14 bytes
V26:*26G^N2^hN2

Try it here!
V26             - for N in range(26):
        ^N2     -   N**2
   :*26G        -  (alphabet*26)[^:V]
           ^hN2 -   (N+1)**2

Java, 109 bytes
for(int i=0,c=-1,j;i<26;i++,System.out.println())for(j=0;j<1+2*i;j++)System.out.print((char)(65+(c=++c%26)));

Slightly ungolfed:
for (int i = 0, c = -1, j; i < 26; i++, System.out.println())
    for (j = 0; j < 1 + 2 * i; j++) System.out.print((char) (65 + (c = ++c % 26)));

99 bytes

Actually, 18 17 bytes
úl`╜²1╖╜²;ú*Ht`na

Ungolfing:
úl    Pushes 26 (the length of the lowercase alphabet).
  `     Start function
  ╜²    Push register 0 (default: 0) and square. Call this a.
  1╖    Increment register 0.
  ╜²;   Push register 0, square and duplicate. Call this b.
  ú*    b times the lowercase alphabet. Call this repeated_alphabet.
  Ht    Get repeated_alphabet[:b][a:]
  `     End function.
n     Run the above function (26) times.
a     Invert the stack.
      Print the stack implicitly with newlines.

Try it online!

Perl 6: 51 bytes
say .join for (|("A".."Z")xx*).rotor(1,3...51)[^26]

Perl 6: 50 bytes
Regex based solution:
.put for (("A".."Z").join x 26)~~m:g/.**{1+2*$++}/

><>, 59 bytes
<v01'5'&0
+>    :@@:@$-?!v$&:d2*%'A'+o1+&1
 ^0;?=}:{:+2oa~<

This increments one item for each letter, another for how many letters in the current row, and checks that one to a constant to halt the program after the last line of 53 characters
Try it online

Python 3, 83 bytes
[print("".join([chr((i%26)+97)for i in range(j*j,(j+1)*(j+1))]))for j in range(26)]

My first golfing experience.

Matlab, 81 bytes
b=char('A'+(1:26)-1)';b=repmat(b,1,26);
for j=1:26
disp(b((j-1)*(j-1)+1:j*j))
end

Racket 160 bytes
(let p((n 65)(t 0)(x 0))(when(> n 90)(set! n 65))(when(> x t)(set! t(+ 2 t))
(set! x 0)(displayln""))(when(< t 51)(display(integer->char n))(p(+ 1 n)t(+ 1 x))))

Ungolfed:
(define (f)
  (let loop ((n 65)
             (t 0)
             (x 0))
    (when (> n 90)
      (set! n 65))
    (when (> x t)
      (set! t (+ 2 t))
      (set! x 0)
      (displayln ""))
    (when (< t 51)
        (display (integer->char n))
        (loop (add1 n)
              t
              (add1 x)))))

Testing:
(f)

Output:
A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ

Pip, 17 16 bytes
15 bytes of code, +1 for -n flag.
zX26^@(1,27)**2

Try it online!
Explanation:
zX26             Lowercase alphabet, repeated 26 times
    ^@           Split at these indices:
       1,27        Range(1,27), i.e. numbers 1 through 26
      (    )**2    Square each number
                 Autoprint the resulting list, joined on newlines due to -n

My first solution is longer, but I think it's pretty cute:
L26P(zy,Y++++v+y)

Explanation:
L26               Loop 26 times:
      y             y is initially "", which is 0 in numeric context
       ,            Range from y to the following value:
         ++++v        v is initially -1; increment it twice (so it goes 1, 3, 5, ...)
        Y     +y      Add previous y to new v and yank result into y for next iteration
    (z          )   Use that range to get a slice from the lowercase alphabet (with
                    cyclical indexing)
   P                Print the slice (with trailing newline)

Common Lisp, 139 bytes
(let((a"abcdefghijklmnopqrstuvwxyz"))(do((n 3(+ n 2))(i 0 j)(j 1(+ j n))(b a(format()"~a~a"b a)))((= n 55))(format t"~a~%"(subseq b i j))))

Try it online!

Yabasic, 63 bytes
Long live BASIC.
For J=1To 51
For K=1To J
I=Mod(I,26)+1
?Chr$(64+I);
Next
?
Next

Try it online!

uBASIC, 68 bytes
Anonymous function that takes no input and outputs to the console.
That pesky Chr$(...) function is forcing me to use Left$(...,1) again.
0ForI=1To51:ForJ=1ToI:K=KMod26+1:?Left$(Chr$(64+K),1);:NextJ:?:NextI

Try it online!

Visual Basic .NET (Mono), 136 bytes
Declared Subroutine that takes no input and outputs to the console.
Module M
Sub Main
Dim I,J,K,S
For J=1To 51
S=""
For K=1To J
I=I Mod 26+1
S+=Chr$(64+I)
Next
Console.WriteLine(S)
Next
End Sub
End Module

Try it online!

Vyxal j, 9 bytes
kA₅ẋ:żd‹ẇ

Try it Online!
How?
kA₅ẋ:żd‹ẇ
kA        # Push the uppercase alphabet
  ₅       # Push the length without popping (26)
   ẋ      # Repeat it that many times
    :ż    # Duplicate and get range [1, length]
      d   # Double each
       ‹  # Decrement each
        ẇ # Split the repeated alphabet into chunks of that sizez

05AB1E, 9 bytes
A26×ā·<£»

Try it online!
Outputs a zillion trailing newlines, but whatever.

C#, 164 bytes
void a(){int i=0;Console.Write(String.Join("\n",Enumerable.Range(0,26).Select(n=>new string(Enumerable.Range(0,n*2+1).Select(m=>(char)(97+(i++)%26)).ToArray()))));}

I believe "\n" is enough instead of "\r\n"

You need to count using System; and using System.Linq;

no i do not need to count them, theyre default packages. im getting sick of this remark

@downrep_nation If you don't want to count them, you'll need to use fully-qualified class names.

Actually, it seems like you do need to include using System, since otherwise I get an error about Console not existing in the current context.

http://meta.codegolf.stackexchange.com/questions/9847/do-i-need-to-use-imports-or-can-i-call-a-class-explicity About java but the result is the same, either fully qualify them or include the namespaces


text:
Score my golf round!
Since this SE community is about golfing, I thought a golf-related challenge would be appropriate.
Explanation
Normally, the objective of golf is to finish a hole (and consequently, the entire round) with the least amount of strokes. This is a simple version of golf: Play until you hole the ball and sum up your score. Finally subtract it from the total par and the resulting number indicates your score: 0 if you played exactly par, positive if you played worse and negative if you played better.
But in 1898 a guy named Dr. Frank Barney Gorton Stableford devised a new system of playing which was designed to be more forgiving. This system awards a number of points to a player, based on a relative rating per hole, called the stroke index (SI) which is based on a player rating called handicap. This limits the amount of points a player can lose per hole. Additionally, the handiccp ensures fair competition between players despite skill difference.
This format isn't used in professional golf, but can be found almost anywhere in amateur golf.
The scoring algorithm
For anyone unfamiliar with golf, the algorithm for scoring a hole based version is as follows.

Beginning with the hardest hole (rating 1) to the easiest one (rating 18), increase the stroke index of that hole by 1 and decrement the handicap. If you exhaust the handicap, stop. If you hit the easiest hole you wrap around to the hardest and continue. (Ex: stroke index for hcp 24 and [1..18]: [2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1]).
For every score on a hole, subtract it from the sum of par and stroke index and add 2 (formula: (par + stroke index) - achieved score + 2). These are the stableford points received for that hole. Note that you cannot receive less than 0 points.
Sum up all the points. The resulting total is the total number of stableford points.

Thus, reaching 36 points is equivalent to playing exactly one's handicap, and more points are better.
Rules
Your task will be to calculate the total number of stableford points of an arbitrary golf round on an arbitrary golf course given a handicap.
You will be given a list of difficulty ratings, a list of pars, a list of scores and the handicap to use. You may order these arguments as you wish, but please state how you order them.
You may write a function ot program, input can be taken either as command line argument or function argument.
Output may either be printed to STDOUT or the return value of a function.
You may assume the following about the input:

Every list will contain exactly 18 elements.
The lists are orderd by hole: First element = info for first hole, etc.
The handicap will be an integer between 0 and 54 inclusive.
Pars will be between 3 and 7.
The score is always a positive integer.
The difficulty rating list will always be a permutation of [1..18].

This is code golf, so the shortest answer in bytes wins.
Examples
Input: hcp: 0
       difficulty: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]
       pars: [3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5]
       score: [3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5]
Output: 36

Input: hcp: 15
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [5,5,4,5,4,4,4,4,5,7,3,5,5,6,4,6,5,5]
Output: 38

Input: hcp: 28
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [5,5,5,6,3,7,3,6,5,8,4,6,7,8,4,7,6,5]
Outut: 37

Input: hcp: 54
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10]
Output: 3

Happy golfing!

Pyth, 46 bytes
u+G.)S[0+-++@@Q2Hg%hQ18@@Q1H/hQ18@@Q3H2)Ul@Q1Z

A program that takes input as a list of the form [handicap, [difficulties], [pars], [scores]] and prints the overall score.
I am very new to Pyth, so this can probably be golfed further.
Try it online
How it works
u+G.)S[0+-++@@Q2Hg%hQ18@@Q1H/hQ18@@Q3H2)Ul@Q1Z  Program. Input: Q

 +G.)S[0+-++@@Q2Hg%hQ18@@Q1H/hQ18@@Q3H2)        Function. Inputs: G, H
            @@Q2H                               Q[2][H]
                   hQ                           Q[0]
                     18                         18
                  %                             Q[0]%18
                       @@Q1H                    Q[1][H]
                 g                              Q[0]%18>=Q[1][H]
           +                                    Q[2][H]+Q[0]%18>=Q[1][H]
                             hQ                 Q[0]
                               18               18
                            /                   Q[0]//18
          +                                     Q[2][H]+Q[0]%18>=Q[1][H]+Q[0]//18
                                 @@Q3H          Q[3][H]
         -                                      Q[2][H]+Q[0]%18>=Q[1][H]+Q[0]//18-Q[3][H]
                                      2         2
        +                                       Q[2][H]+Q[0]%18>=Q[1][H]+Q[0]//18-Q[3][H]+2
       0                                        0
      [                                )        List [0, above expression]
     S                                          Sort ascending
   .)                                           Pop last value, clamping negatives to 0
  G                                             G
 +                                              G + popped value

u                                       Ul@Q1Z
                                          @Q1   Q[1]
                                         l      Length
                                        U       Unary range, yielding [0, len(Q[1])-1]
                                             Z  0
u                                               Reduce the function over that, start at 0

JavaScript (ES6), 72 bytes
(h,d,p,s)=>s.map((e,i)=>(e=p[i]+2-e+(h%18>=d[i])+h/18|0)<0?0:r+=e,r=0)|r

Python 3, 71 bytes
lambda h,d,p,s:sum(max(0,j+(h%18>=i)+h//18-k+2)for i,j,k in zip(d,p,s))

An anonymous function that takes input via argument of a handicap h as an integer, and difficulties d, pars p and scores s as lists, and returns the overall score.
How it works
lambda h,d,p,s           Anonymous funtion with inputs handicap h, difficulties d, pars p
                         and scores s
for i,j,k in zip(d,p,s)  For each (difficulty, par, score) set (i, j, k):
  (h%18>=i)+h//18          Calculate the stroke index...
  j+...-k+2                ..calculate (par + stroke index) - score + 2...
  max(0,...)               ...and clamp negative values to zero
:sum(...)                Return the sum of the above over all holes, which is the overall
                         score

Try it on Ideone

Haskell, 75 bytes
This can definitely be golfed some more
(h!d)p s=sum[max 0$j-k+2+h`div`18+1`min`div(h`mod`18)i|(i,j,k)<-zip3 d p s]

Perl 5, 142 bytes
($h,@a)=map/\d+/g,<>;%d=map{$j++,$_}@a[0..17];$z+=($t=$a[18+$_]-$a[36+$_]+2+int$h/18+($k++<$h%18))>0?$t:0for sort{$d{$a}<=>$d{$b}}keys%d;say$z

Try it online!
There has got to be a shorter way to do this, but my brain can't come up with it right now.


text:
The Piggyback Sequence
I made my own sequence recently (called the Piggyback sequence), and it works like this:
P(1), P(2) and P(3) = 1.
For all P(n) where n>3, the sequence works like this:
P(n) = P(n-3) + P(n-2)/P(n-1)

So, continuing the sequence:
P(4) = 1 + 1/1 = 2
P(5) = 1 + 1/2 = 3/2
= 1.5
P(6) = 1 + 2/(3/2) = 7/3
= 2.33333...
P(7) = 2 + (3/2)/(7/3) = 37/14 = 2.6428571428...
P(8) = 3/2 + (7/3)/(37/14) = 529/222
= 2.3828828828...
Your task is, when given n, calculate P(n) either as a floating point number or an (im)proper fraction.
This is code-golf, so shortest code in bytes wins.
If anyone can find the name of the sequence, please edit the post accordingly.
Current leaders: MATL and Jelly (both at 15 bytes).

Can we start at index 0?  P(0)=1...

May I ask for the rationale behind the name you gave to this sequence?

@JanDvorak It just seems like the numbers are "piggybacking" each other.

@nimi Yes, you are allowed.

Python 2, 40 39 bytes.
f=lambda x:x<4or.0+f(x-3)+f(x-2)/f(x-1)

Gives True instead of 1, if this isn't allowed we can have this for 42 bytes:
f=lambda x:.0+(x<4or f(x-3)+f(x-2)/f(x-1))

The way it works is pretty straightforward, the only trick is using .0+ to cast the result to a float.

You can save one byte by removing the space between x<4 and or

In Python 2, you can use f(x-1.) to cast to float. In Python 3, you don't need to cast at all.

Haskel, 32 bytes
(a#b)c=a:(b#c)(a+b/c)
((0#1)1!!)

Usage example:  ((0#1)1!!) 7 -> 2.642857142857143. I start the sequence with 0, 1, 1 to fix !!'s 0-based indexing.
Edit: @xnor found a way to switch from 0-based to 1-based index, without changing the byte count.

Nice method for beating the direct recursive definition. I think you can shift to 1-indexed by initializing (0,1,1).

Ruby, 34 bytes
Since Ruby uses integer division by default, it turns out that it's shorter to use fractions instead. Golfing suggestions welcome.
f=->n{n<4?1r:f[n-3]+f[n-2]/f[n-1]}

Perl 6,  25  23 bytes

{(0,1,1,1,*+*/*...*)[$_]}

{(0,1,1,*+*/*...*)[$_]}

Explanation:
# bare block lambda with implicit parameter ｢$_｣
{
  (
    # initial set-up
    # the ｢0｣ is for P(0) which isn't defined
    0, 1, 1, 1,

    # Whatever lambda implementing the algorithm
    * + * / *
    # { $^a + $^b / $^c }

    # keep using the lambda to generate new values until
    ...

    # Whatever (Forever)
    *

   # get the value indexed by the argument
  )[ $_ ]
}

This returns a Rat (Rational) for inputs starting with 3 up until the result would start having a denominator bigger than can fit in a 64 bit integer, at which point it starts returning Nums (floating point).
The last Rat it will return is P(11) == 8832072277617 / 2586200337022
If you want it to return Rational numbers rather than floats you can swap it for the following which will return a FatRat instead.
{(0.FatRat,1,1,*+*/*...*)[$_]}

Test:
#! /usr/bin/env perl6
use v6.c;
use Test;

my &piggyback = {(0,1,1,*+*/*...*)[$_]}
# */ # stupid highlighter no Perl will ever have C/C++ comments

my @test = (
  1, 1, 1, 2,
  3/2, 7/3, 37/14,
  529 / 222,
  38242 / 11109,
  66065507 / 19809356,
  8832072277617 / 2586200337022,
);

plan +@test;

for 1..* Z @test -> ($input,$expected) {
  cmp-ok piggyback($input), &[==], $expected, $expected.perl;
}

C, 46 bytes
float P(n){return n<4?1:P(n-3)+P(n-2)/P(n-1);}

Ideone

MATL, 15 bytes
llli3-:"3$t/+]&

Try it online!
Explanation
lll       % Push 1, 1, 1
i         % Take input n
3-:       % Pop n and push range [1 2 ... n-3] (empty if n<4)
"         % For each
  3$t     %    Duplicate the top three numbers in the stack
  /       %    Pop the top two numbers and push their division
  +       %    Pop the top two numbers and push their addition
]         % End
&         % Specify that the next function, which is implicit display, will take
          % only one input. So the top of the stack is displayed

Cheddar, 31 bytes
n P->n<4?1:P(n-3)+P(n-2)/P(n-1)

The ungolfed version is so clear imo you don't need explanation:
n P->
  n < 4 ? 1 : P(n-3) + P(n-2) / P(n-1)

basically after the function arguments you can specify the variable to use which will be set to the function itself. Why? because this function will be tail-call-optimized, or at least should be.

05AB1E, 18 17 bytes
3Ld                # push list [1,1,1]
   ¹ÍG         }   # input-3 times do
      D3£          # duplicate list and take first 3 elements of the copy
         R`        # reverse and flatten
           /+      # divide then add
             ¸ì    # wrap in list and prepend to full list
                ¬  # get first element and implicitly print

Try it online!
Saved 1 byte thanks to Luis Mendo

Javascript (ES6), 31 bytes
P=n=>n<4?1:P(n-3)+P(n-2)/P(n-1)

A simple function.

P=n=>n<4?1:P(n-3)+P(n-2)/P(n-1)

var out = '';

for (var i=1;i <= 20;i++) {
out +=''+i+': '+P(i)+'
';
}

document.getElementById('text').innerHTML = out;
div {
font-family: Arial
}

Why not ES6? It saves a metric ton of bytes.

Like this: P=n=>n<4?1:P(n-3)+P(n-2)/P(n-1)

@IsmaelMiguel Thanks. Frankly, I have no idea about the difference between the different Javascripts :D

To your advantage, on most challenges, you only need to know the "Big Arrow notation", which allows you to create functions without using the keyword function. The bit P=n=>[...] is creating an anonymous function that takes 1 parameter (n). Also, on ES6, returns are implicit. So, P=n=>5 is a function that always returns 5. You only need to enclose the body in {} if you have more than one statement (E.g.: P=n=>{alert(1);console.log(1)}). Since you have only 1 (big) statement (the ternary operator), you can forget the {}.

@IsmaelMiguel Thanks, that will come in useful :D

You're welcome. I'm glad I helped you.

Pyth, 20 bytes
L?<b4h0+y-b3cy-b2ytb

Try it online!

Jelly, 15 bytes
ạ2,1,3ß€÷2/SµḊ¡

Try it online! or verify all test cases.
How it works
ạ2,1,3ß€÷2/SµḊ¡  Main link. Argument: n (integer)

             Ḋ   Dequeue; yield [2, ..., n].
            µ ¡  If the range is non-empty (i.e., if n > 1), execute the chain to
                 the left. If n is 0 or 1, return n.
                 Note that P(3) = P(0) + P(2)/P(1) if we define P(0) := 0.
ạ2,1,3           Take the absolute difference of n and 2, 1, and 3.
                 This gives [0, 1, 1] if n = 2, and P(0) + P(1)/P(1) = 0 + 1/1 = 1.
      ß€         Recursively apply the main each to each difference.
        ÷2/      Perform pairwise division.
                 This maps [P(n-2), P(n-1), P(n-3)] to [P(n-2)/P(n-1), P(n-3)].
           S     Sum, yielding P(n-2)/P(n-1) + P(n-3).

Mathematica, 36 bytes
P@n_:=If[n<4,1,P[n-3]+P[n-2]/P[n-1]]

Here are the first few terms:
P /@ Range[10]
{1, 1, 1, 2, 3/2, 7/3, 37/14, 529/222, 38242/11109, 66065507/19809356}

R, 53 47 bytes
f=function(N)ifelse(N>3,f(N-3)+f(N-2)/f(N-1),1)

This answer made use of the pretty neat function ifelse : ifelse(Condition, WhatToDoIfTrue, WhatToDoIfNot)

You should be able to get rid of the return() in your code. But you also need to name the function in order for your recursion to work

Dyalog APL, 25 bytes
⊃{1↓⍵,⍎⍕' +÷',¨⍵}⍣⎕⊢0 1 1