text:
Count Up, Replace, Repeat!
Definition
Define the nth array of the CURR sequence as follows.

Begin with the singleton array A = [n].
For each integer k in A, replace the entry k with k natural numbers, counting up from 1 to k.
Repeat the previous step n - 1 more times.

For example, if n = 3, we start with the array [3].
We replace 3 with 1, 2, 3, yielding [1, 2, 3].
We now replace 1, 2, and 3 with 1; 1, 2 and 1, 2, 3 (resp.), yielding [1, 1, 2, 1, 2, 3].
Finally, we perform the same replacements as in the previous step for all six integers in the array, yielding [1, 1, 1, 2, 1, 1, 2, 1, 2, 3]. This is the third CURR array.
Task
Write a program of a function that, given a strictly positive integer n as input, computes the nth CURR array.
The output has to be a flat list of some kind (and array returned from a function, a string representation of your language's array syntax, whitespace-separated, etc.).
This is code-golf. May the shortest code in bytes win!
Test cases
 1 -> [1]
 2 -> [1, 1, 2]
 3 -> [1, 1, 1, 2, 1, 1, 2, 1, 2, 3]
 4 -> [1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4]
 5 -> [1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5]
 6 -> [1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6]

Related: Count, Replace, Add Up! ._.

Can we take the input as a singleton array (like [2]) rather than an integer?

@Mego Let's keep it at integers.

I feel like there should be an OEIS sequence for this.

@DanTheMan It's not really an integer sequence in its current form, but I guess it could be turned into one by concatenating the results for all positive integers.

@Dennis There are a lot of sequences that are made by reading the rows of a table, and I think this would count as a table.

Jelly, 3 bytes
R¡F

Try it online
Explanation
R¡F    Argument n

R      Yield range [1..n]
 ¡     Repeat n times
  F    Flatten the result

That is... simply brilliant... compared to my Jelly answer.

Great first post!

Python, 50 bytes
lambda i:eval("[i "+"for i in range(1,i+1)"*i+"]")

Scope abuse! For example, for i=3, the string to be evaluated expands to.
[i for i in range(1,i+1)for i in range(1,i+1)for i in range(1,i+1)]

Somehow, despite using the function input variable i for everything, Python distinguishes each iteration index as belonging to a separate scope as if the expression were
[l for j in range(1,i+1)for k in range(1,j+1)for l in range(1,k+1)]

with i the input to the function.

This trick works in Firefox 30+ too and saved me 3 bytes, thanks!

@DigitalTrauma Both python and JavaScript have eval, obviously the code itself needs to be ported but I thought you could assume that anyway.

@Neil Oh, I see - I completely misunderstood :)

05AB1E, 6 3 bytes
DFL

Explained
D     # duplicate input
 F    # input times do
  L   # range(1,N)

Try it online
Saved 3 bytes thanks to @Adnan

DFL is 3 bytes shorter :)

@Adnan: Didn't know L worked like that on lists. A bit surprising that it flattens automatically.

It's actually a bug which I've never fixed :p.

Retina, 33 bytes
$
$.`$*0
+%(M!&`1.*(?=0)|^.+
O`.+

Input and output in unary.
Try it online!
Even though I didn't use the closed form for the related challenge, adapting this answer was surprisingly tricky.

+%(M!& is the longest tag that I would ever see.

Python 2, 82 bytes
lambda n:[1+bin(i)[::-1].find('1')for i in range(1<<2*n-1)if bin(i).count('1')==n]

This isn't the shortest solution, but it illustrates an interesting method:

Write down the first 2^(2*n-1) numbers in binary
Keep those with exactly n ones
For each number, count the number of trailing zeroes, and add 1.

Actually, 9 bytes
;#@`♂RΣ`n

Try it online!
Explanation:
;#@`♂RΣ`n
;#@        dupe n, make a singleton list, swap with n
   `♂RΣ`n  call the following function n times:
    ♂R       range(1, k+1) for k in list
      Σ      concatenate the ranges

Thanks to Leaky Nun for a byte, and inspiration for another 2 bytes.

;#@"♂R♂i"*ƒ saves a byte

@LeakyNun Good catch - ;#@\♂R♂i`n` saves another one!

I was about to try summation, lol.

I think 9 is going to be the optimal solution here

Your link is still outdated.

C#, 128 Bytes
List<int>j(int n){var l=new List<int>(){n};for(;n>0;n--)l=l.Select(p=>Enumerable.Range(1,p)).SelectMany(m=>m).ToList();return l;

With using static System.Linq.Enumerable, you can do this: int[]J(int n){var l=new[]{n};while (n-- > 0){l = l.Select(p => Range(1, p)).SelectMany(m => m).ToArray();}return l;}

APL, 11 bytes
{∊⍳¨∘∊⍣⍵+⍵}

Test:
      {∊⍳¨∘∊⍣⍵+⍵} 3
1 1 1 2 1 1 2 1 2 3

Explanation:

+⍵: starting with ⍵,
⍣⍵: do the following ⍵ times:

⍳¨∘∊: flatten the input, and then generate a list [1..N] for each N in the input

∊: flatten the result of that

Simpler: {(∊⍳¨)⍣⍵⊢⍵}

@Adám: Ah, yes, trains work differently from J. I'd started out with {(∊∘(⍳¨))⍣⍵+⍵} and then thought, how can I get rid of those braces?

J, 18 bytes
([:;<@(1+i.)"0)^:]

Straight-forward approach based on the process described in the challenge.
Usage
   f =: ([:;<@(1+i.)"0)^:]
   f 1
1
   f 2
1 1 2
   f 3
1 1 1 2 1 1 2 1 2 3
   f 4
1 1 1 1 2 1 1 1 2 1 1 2 1 2 3 1 1 1 2 1 1 2 1 2 3 1 1 2 1 2 3 1 2 3 4

Explanation
([:;<@(1+i.)"0)^:]  Input: n
                 ]  Identity function, gets the value n
(     ...     )^:   Repeat the following n times with an initial value [n]
      (    )"0        Means rank 0, or to operate on each atom in the list
         i.           Create a range from 0 to that value, exclusive
       1+             Add 1 to each to make the range from 1 to that value
    <@                Box the value
 [:;                  Combine the boxes and unbox them to make a list and return
                    Return the final result after n iterations

CJam, 14 bytes
{_a\{:,:~:)}*}

Test it here.
Explanation
_a   e# Duplicate N and wrap it in an array.
\    e# Swap with other copy of N.
{    e# Do this N times...
  :, e#   Turn each x into [0 1 ... x-1].
  :~ e#   Unwrap each of those arrays.
  :) e#   Increment each element.
}*

Haskell, 33 bytes
f n=iterate(>>= \a->[1..a])[n]!!n

Thanks to nimi for saving a byte.
A pointfree version is longer (35 bytes):
(!!)=<<iterate(>>= \a->[1..a]).pure

iterate(>>= \a->[1..a]) for one byte less.

Mathematica, 27 26 bytes
1 byte saved with some inspiration from Essari's answer.
Flatten@Nest[Range,{#},#]&

Fairly straightforward: for input x we start with {x} and then apply the Range to it x times (Range is Listable which means that it automatically applies to the integers inside arbitrarily nested lists). At the end Flatten the result.

Python 3, 75 74 bytes
def f(k):N=[k];exec('A=N;N=[]\nfor i in A:N+=range(1,i+1)\n'*k+'print(N)')

This is just a straightforward translation of the problem description to code.
Edit: Saved one byte thanks to @Dennis.

Your print can go outside the exec.

Yeah, that's what I had at first, but it simply prints [k] for some reason. I gave up trying to figure out if it was a scope issue or something else.

Yes, it looks like a scope issue. It works fine in Python 2.

JavaScript (Firefox 30-57), 63 60 bytes
f=n=>eval(`[${`for(n of Array(n+1).keys())`.repeat(n--)}n+1]`)

Port of @xnor's Python answer.

I tried this with Firefox 42 (SyntaxError: missing : in conditional expression ) and Babel (Unexpected token (1:21)). What am I doing wrong?

@Dennis Sorry, but I have no idea; I do in fact have Firefox 42 on one of my machines for some reason and I double-checked and it ran fine there. (I also checked Firefox 37 and 47 just to be sure.)

Huh, the page didn't refresh and I tested your old version. The new one works just fine.

@Dennis Ah, it looks like a stray ) crept into that version somehow.

R, 60 49 bytes
Pretty straightforward use of unlist and sapply.
y=x=scan();for(i in 1:x)y=unlist(sapply(y,seq));y

Thanks to @MickyT for saving 11 bytes

@MickyT thx for the tip, I can use seq to lower the byte count

Sorry I misread the question

Clojure, 59 bytes
(fn[n](nth(iterate #(mapcat(fn[x](range 1(inc x)))%)[n])n))

Explanation:
Really straight forward way to solve the problem. Working from the inside out:
(1) (fn[x](range 1(inc x))) ;; return a list from 1 to x
(2) #(mapcat (1) %)         ;; map (1) over each item in list and flatten result
(3) (iterate (2) [n])       ;; call (2) repeatedly e.g. (f (f (f [n])))
(4) (nth (3) n))            ;; return the nth value of the iteration

php 121
Not really very much in the way of tricks behind this one.
Flattening an array in php isn't short so it's necessary to build it flat in the first place
<?php for($a=[$b=$argv[1]];$b--;)$a=array_reduce($a,function($r,$v){return array_merge($r,range(1,$v));},[]);print_r($a);

Keeping it flat is a good idea. But callback functions aren´t short either. Beat You by 15 bytes. You can save 4 bytes with the short tag <? or 6 bytes with -r and no tag.

Pyth, 8 bytes
usSMGQ]Q

Try it online!
usSMGQ]Q   input as Q

u    Q     repeat for Q times,
      ]Q   starting as [Q]:

  SMG          convert each number in the array to its range
 s             flatten

           then implicitly prints the result.

Jelly, 7 bytes
Quick, before Dennis answers (jk)
WR€F$³¡

Try it online!
WR€F$³¡  Main monadic chain. Argument: z

W        Yield [z].
     ³¡  Repeat the following z times:
 R€          Convert each number in the array to the corresponding range.
   F         Flatten the array.

Python 2, 69 68 66 bytes
def f(n):a=[n];exec'a=sum([range(1,i+1)for i in a],[]);'*n;print a

Edit: Saved 1 byte thanks to @xnor. Saved 2 bytes thanks to @Dennis♦.

You can remove the parens around exec. In Python 2, it's a keyword, not a function. I count 68 bytes btw.

@Dennis Ah, that means I miscounted and it was originally 69 bytes...

F# , 63 bytes
fun n->Seq.fold(fun A _->List.collect(fun k->[1..k])A)[n]{1..n}

Returns an anonymous function taking n as input.
Replaces every entry k in A with [1..k], repeats the process n times, starting with A = [n].

Swift 3, 58 Bytes
Meant to run directly in the a playground, with n set to the input:
var x=[n];for i in 0..<n{x=x.reduce([]){$0+[Int](1...$1)}}

Ungolfed, with most short hand notation reverted:
let n = 3 //input

var x: Array<Int> = [n]
for i in 0..<n {
    x = x.reduce(Array<Int>[], combine: { accumulator, element in
        accumulator + Array<Int>(1...element)
    })
}

Java, 159 Bytes
Procedure
int[] q(int y){int z[]=new int[]{y};for(int i=0;i<y;i++){int d=0,a=0;for(int c:z)d+=c;int[]r=new int[d];for(int c:z)for(int j=0;j<c;)r[a++]=++j;z=r;}return z;}

Usage
public static void main(String[] args){String out = "["; int [] b = q(6);for(int c:b)out+=c+", ";System.out.println(out+"]");}

public static int[] q(int y){int z[]=new int[]{y};for(int i=0;i<y;i++){int d=0,a=0;for(int c:z)d+=c;int[]r=new int[d];for(int c:z)for(int j=0;j<c;)r[a++]=++j;z=r;}return z;}

Sample output:
[1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ]

Bash + GNU utilities, 49

1 byte saved thanks to @Dennis.

Piped recursive functions FTW!
f()((($1))&&xargs -l seq|f $[$1-1]||dd)
f $1<<<$1

n is passed on the command-line.  Output is newline-separated.
The use of dd causes statistics to be sent to STDERR.  I think this is OK, but if not, dd can be replaced with cat at a cost of 1 extra byte.

Extraneous output to STDERR is allowed by default. You can replace {...;} with (...) to save a byte.

@Dennis yes, of course!  Apparently you got this tip from me :)

Ruby, 44 bytes
A simple recursive approach.
->n,a=[n]{n>0?F[n-1,a.flat_map{[*1.._1]}]:a}

Attempt This Online!

Perl 5, 53 bytes
A subroutine:
{($i)=@_;for(1..$i){my@c;push@c,1..$_ for@_;@_=@c}@_}

See it in action as
perl -e'print "$_ " for sub{($i)=@_;for(1..$i){my@c;push@c,1..$_ for@_;@_=@c}@_}->(3)'

Ruby, 61 bytes
def f(n);a=[n];n.times{a=a.map{|i|(1..i).to_a}.flatten};a;end

Hi! Welcome to PPCG. A short explanation would be nice!

Welcome to PPCG! Unless the challenge overrules this all submissions need to be full programs or functions, not just snippets. (And in this case, the challenge actually confirms this requirement.)

PHP, 100 98 bytes
Run with php -r '<code>' <n>.
for($a=[$n=$argv[1]];$n--;$a=$b)for($b=[],$k=0;$c=$a[$k++];)for($i=0;$i++<$c;)$b[]=$i;print_r($a);

In each iteration create a temporary copy looping from 1..(first value removed) until $a is empty.

These two are still and will probably remain at 100 bytes:
for($a=[$n=$argv[1]];$n--;)for($i=count($a);$i--;)array_splice($a,$i,1,range(1,$a[$i]));print_r($a);

In each iteration loop backwards through array replacing each number with a range.
for($a=[$n=$argv[1]];$n--;)for($i=$c=0;$c=$a[$i+=$c];)array_splice($a,$i,1,range(1,$c));print_r($a);

In each iteration loop through array increasing index by previous number and replacing each indexed element with a range

Japt -mh, 4 bytes
N=cõ

Try it

Perl 5 + -p, 28 bytes
eval's/\d+/@{[1..$&]}/g;'x$_
Try it online!

Pyt, 9 bytes
Đ`⇹řƑ⇹⁻ł+

Try it online!
Đ            implicit input; Đuplicate
 `     ł     do... while top of stack is truthy
  ⇹          swap top two items on stack
   ř         řangify (element-wise)
    Ƒ        Ƒlatten array
     ⇹       swap top two items on stack
      ⁻      decrement
       +     add (to get rid of pesky 0); implicit print


text:
Alternating sign matrix verification
An alternating sign matrix is an n by n matrix consisting of the numbers -1, 0, 1, such that:

The sum of each row and column is 1
The nonzero entries in each row and column alternate in sign

These matrices generalise permutation matrices, and the number of such matrices for a given n was of interest for some time. They occur naturally during the Dodgson condensation method of computing matrix determinants (named after Charles Dodgson, better known as Lewis Carroll).
Here are some examples of 4 by 4 alternating sign matrices:
 0  1  0  0          1  0  0  0          0  0  1  0          0  0  1  0
 0  0  1  0          0  0  1  0          0  1 -1  1          1  0 -1  1
 1  0  0  0          0  1 -1  1          1 -1  1  0          0  1  0  0
 0  0  0  1          0  0  1  0          0  1  0  0          0  0  1  0

And here are some examples of 4 by 4 matrices which aren't alternating sign matrices:
 0  1  0  0
 0  0  0  1
 1  0  0  0
 0  0  1 -1    (last row and last column don't add to 1)

 0  0  0  1
 1  0  0  0
-1  1  1  0
 1  0  0  0    (third row does not alternate correctly)

Your program or function will be given an n by n matrix (n >= 1) of -1s, 0s and 1s — output a truthy value if the given matrix is an alternating sign matrix, otherwise output a falsy value.
This is code-golf, so the goal is to minimise the number of bytes used.
Test cases
The following test cases are given in a Python-like 2D list format.
Truthy:
[[1]]
[[1,0],[0,1]]
[[0,1],[1,0]]
[[0,1,0],[0,0,1],[1,0,0]]
[[0,1,0],[1,-1,1],[0,1,0]]
[[0,1,0,0],[0,0,1,0],[1,0,0,0],[0,0,0,1]]
[[1,0,0,0],[0,0,1,0],[0,1,-1,1],[0,0,1,0]]
[[0,0,1,0],[0,1,-1,1],[1,-1,1,0],[0,1,0,0]]
[[0,0,1,0],[1,0,-1,1],[0,1,0,0],[0,0,1,0]]
[[0,0,1,0,0],[0,1,-1,1,0],[1,-1,1,0,0],[0,1,0,-1,1],[0,0,0,1,0]]
[[0,0,1,0,0,0,0,0],[1,0,-1,0,1,0,0,0],[0,0,0,1,-1,0,0,1],[0,0,1,-1,1,0,0,0],[0,0,0,0,0,0,1,0],[0,0,0,0,0,1,0,0],[0,1,-1,1,0,0,0,0],[0,0,1,0,0,0,0,0]]
[[0,0,0,0,1,0,0,0],[0,0,1,0,-1,1,0,0],[0,0,0,1,0,0,0,0],[1,0,0,-1,1,-1,1,0],[0,1,-1,1,-1,1,0,0],[0,0,0,0,1,0,0,0],[0,0,1,0,0,0,0,0],[0,0,0,0,0,0,0,1]]

Falsy:
[[0]]
[[-1]]
[[1,0],[0,0]]
[[0,0],[0,1]]
[[-1,1],[1,0]]
[[0,1],[1,-1]]
[[0,0,0],[0,0,0],[0,0,0]]
[[0,1,0],[1,0,1],[0,1,0]]
[[-1,1,1],[1,-1,1],[1,1,-1]]
[[0,0,1],[1,0,0],[0,1,-1]]
[[0,1,0,0],[0,0,0,1],[1,0,0,0],[0,0,1,-1]]
[[0,0,1,0],[0,0,1,0],[1,0,-1,1],[0,1,0,0]]
[[0,0,0,1],[1,0,0,0],[-1,1,1,0],[1,0,0,0]]
[[1,0,1,0,-1],[0,1,0,0,0],[0,0,0,0,1],[0,0,0,1,0],[0,0,0,0,1]]
[[0,0,1,0,0],[0,1,-1,1,0],[1,-1,1,0,0],[0,1,1,-1,0],[0,0,-1,1,1]]
[[0,-1,0,1,1],[1,-1,1,-1,1],[0,1,1,0,-1],[1,1,-1,1,-1],[-1,1,0,0,1]]
[[0,0,1,0,0,0,0,0],[1,0,1,0,1,0,0,0],[0,0,0,1,-1,0,0,1],[0,0,1,-1,1,0,0,0],[0,0,0,0,0,0,1,0],[0,0,0,0,0,1,0,0],[0,1,-1,1,0,0,0,0],[0,0,1,0,0,0,0,0]]

Related

Jelly, 15 bytes
;Zḟ€0;€-;@€-IFP

Try it online!
;Zḟ€0;€-;@€-IFP   Main monadic chain. Argument: z

;Z                Concatenate with its transpose.
  ḟ€0             Remove zeros from each sub-list. At this point,
                  one expects lists of the form [1, -1, 1, -1, ..., 1] for truthy,
                  and any other arrays containing purely 1 and -1 for falsey.
     ;€-          Append -1 to each sub-list.
        ;€@-      Prepend -1 to each sub-list.
            I     Compute the difference between each term. At this point,
                  for truthy, one expects arrays filled with 2, and arrays
                  containing 0 otherwise.
             FP   Product of every item. This checks if any item is equal to zero.

Retina, 62 58 56 53 bytes
Byte count assumes ISO 8859-1 encoding, and the \t should be replaced with actual tabs (0x09 which would be turned into spaces by SE otherwise).
$
\t$`¶
O$#`...(?<=^[^\t]*(.+))
$.1
T` 0
^(1(-11)*\s)+$

Input format is a matrix where each column uses three right-aligned characters, e.g.:
  0  0  1  0
  1  0 -1  1
  0  1  0  0
  0  0  1  0

Output is either 0 (falsy) or 1 (truthy).
Test suite. (The first few lines transform the input format and let Retina run several test cases at once.)
Explanation
Thankfully, the input is a square matrix: transposing squares is just about doable in Retina, whereas transposing rectangles is a massive pain.
$
\t$`¶

We start by appending a tab, the entire input again (using the prefix $`) and then a linefeed at the end (using Retina's alias ¶). We're using a tab to separate the two copies so that we can distinguish between them when we're transposing one of them, and by using a whitespace character we can save a couple of bytes later on.
O$#`...(?<=^[^\t]*(.+))
$.1

This is the trickiest bit: transposing the first copy of the matrix. The idea is to match cells in the first copy and then sorting them (stably) by the horizontal position. We match the cells with ... (since they're always three characters wide) and then measure the horizontal position with (.+) inside the lookbehind. Then, to make sure that we only transpose the first copy, we check that we can reach the beginning of the string without moving past a tab.
You might notice that this will also match some three-byte strings (that don't even align with the cells) in the first row of the second copy, because the .+ can pass through the tab. However, this is not an issue because the horizontal position of these matches is strictly greater than any inside the first copy, so these matches remain in their position.
The rest is fairly simple:
T` 0

We remove spaces and zeros from the input.
^(1(-11)*\s)+$

And finally we check that the entire input consists of whitespace-terminated rows of the form 1(-11)*, i.e. an alternating sequence of 1 and -1 that begins and ends with 1 (because otherwise it doesn't sum to 1).

Pyth, 16 bytes
!sm-sM._+d_1U2+C

Try it online: Demonstration or Test Suite
Explanation:
!sm-sM._+d_1U2+CQQ   two implicit Qs (=input matrix) at the end
              +CQQ   zip Q and connect it with Q (=list of columns and rows)
  m                  map each column/row d to:
        +d_1            append -1 to d
      ._                compute all prefixes of ^
    sM                  compute the sums of the prefixes
   -        U2          remove zeros and ones
                        a column/row is correct, if this gives an empty list
 s                   connect up all resulting lists
!                    check, if this result is empty

Jelly, 11 bytes
;Zj-+\ṚQḄ=2

Returns 1 for alternating sign matrices, 0 otherwise. Try it online! or verify all test cases.
Background
Disregarding zeroes, each row and column has to consist of the pattern (1, -1)* 1, i.e., alternating occurrences of 1 and -1, starting and ending with a 1 (so the sum is 1).
To verify this is the case, we take the array of all rows and columns, and join them using -1 as separator. Since all endpoints are 1's, the resulting flat array satisfies the pattern (1, -1)* 1 if and only if the rows and columns do.
For the actual test, we compute the cumulative sum of the array. For an alternating sign matrix, the result will be an array of 0's and 1's that ends with a 1.
We reverse the cumulative sum and deduplicate it, keeping the order of the initial occurrences of all unique elements. For a truthy input, the result will be the list [1, 0].
To output the corresponding Boolean, we convert the duplicated cumulative sums from binary to integer and test if the result is 2.
How it works
;Zj-+\ṚQḄ=2  Main link. Argument: M (matrix / 2D array)

 Z           Zip; transpose M's rows and columns.
;            Concatenate M and zipped M.
  j-         Join, separating by -1.
    +\       Take the cumulative sum of the result.
      Ṛ      Reverse the array of partial sums.
       Q     Unique; deduplicate the partial sums.
        Ḅ    Unbinary; convert from base 2 to integer.
         =2  Test for equality with 2.

MATL, 18 16 15 13 bytes
3 bytes saved thanks to @Luis
t!h"@s1=@Xzdv

This solution accepts a 2D array as input and will output a truthy or falsey array. It is important to note that in MATL, a truthy array is composed of all non-zero elements while a falsey result has at least one zero element. Here is another demonstration of truthy/falsey arrays.
Try it Online
Modified version to show all test cases
Explanation
        % Implicitly grab input matrix
t!      % Duplicate and transpose input
h       % Horizontally concatenate input with transpose. This allows us to
        % process only columns since now the columns *also* contain the rows.
"       % For each column (of our column/row combined matrix)
  @s1=  % Compute the sum and ensure it is equal to 1
  @Xz   % Get the non-zeros
  d     % Compute the element-to-element difference. The 1 and -1 alternate only if
        % all these differences are non-zero
  v     % Vertically concatenate everything on the stack
        % Implicit end of loop and implicitly display truthy/falsey value

Julia, 36 bytes
!x=[x^0 x^0;-x -x'][:]|>cumsum⊆0:1

Try it online!

JavaScript (ES6), 112 100 bytes
a=>!/(^|,)(?!0*10*(-10*10*)*(,|$))/.test(a.map(b=>b.join``)+','+a.map((_,i)=>a.map(b=>b[i]).join``))

Flattens the array and its transpose into strings, then (ignoring 0s) checks for the pattern 1-11...1-11 in each string.
Edit: Saved 12 bytes thanks to @PeterTaylor.

You don't need to check for the pattern -11-1...-11-1 because since the entries alternate and have positive sum, there must be one more 1 than -1, so the pattern must be 1-11...1-11.

@PeterTaylor Ugh, that's the second time that I've misread the question. (The comments relating to the first time have since been deleted.)

The header says 110 bytes, but it's only 100

@PeterTaylor At least the "Saved 12 bytes thanks to @PeterTaylor" was correct.

Python 2, 63 60 bytes
s=0;x=input()
for r in x+zip(*x):
 for n in(-1,)+r:s+=[n][s]

Input is a list of tuples.
This terminates with exit code 0 for alternating sign matrices and exit code 1 otherwise. This is what true and false do, and – as shown in the verification section – it can indeed be used as a condition in, e.g., a Bash script.
Verification
test-cases.txt
[(1,)]
[(1, 0), (0, 1)]
[(0, 1), (1, 0)]
[(0, 1, 0), (0, 0, 1), (1, 0, 0)]
[(0, 1, 0), (1, -1, 1), (0, 1, 0)]
[(0, 1, 0, 0), (0, 0, 1, 0), (1, 0, 0, 0), (0, 0, 0, 1)]
[(1, 0, 0, 0), (0, 0, 1, 0), (0, 1, -1, 1), (0, 0, 1, 0)]
[(0, 0, 1, 0), (0, 1, -1, 1), (1, -1, 1, 0), (0, 1, 0, 0)]
[(0, 0, 1, 0), (1, 0, -1, 1), (0, 1, 0, 0), (0, 0, 1, 0)]
[(0, 0, 1, 0, 0), (0, 1, -1, 1, 0), (1, -1, 1, 0, 0), (0, 1, 0, -1, 1), (0, 0, 0, 1, 0)]
[(0, 0, 1, 0, 0, 0, 0, 0), (1, 0, -1, 0, 1, 0, 0, 0), (0, 0, 0, 1, -1, 0, 0, 1), (0, 0, 1, -1, 1, 0, 0, 0), (0, 0, 0, 0, 0, 0, 1, 0), (0, 0, 0, 0, 0, 1, 0, 0), (0, 1, -1, 1, 0, 0, 0, 0), (0, 0, 1, 0, 0, 0, 0, 0)]
[(0, 0, 0, 0, 1, 0, 0, 0), (0, 0, 1, 0, -1, 1, 0, 0), (0, 0, 0, 1, 0, 0, 0, 0), (1, 0, 0, -1, 1, -1, 1, 0), (0, 1, -1, 1, -1, 1, 0, 0), (0, 0, 0, 0, 1, 0, 0, 0), (0, 0, 1, 0, 0, 0, 0, 0), (0, 0, 0, 0, 0, 0, 0, 1)]
[(0,)]
[(-1,)]
[(1, 0), (0, 0)]
[(0, 0), (0, 1)]
[(-1, 1), (1, 0)]
[(0, 1), (1, -1)]
[(0, 0, 0), (0, 0, 0), (0, 0, 0)]
[(0, 1, 0), (1, 0, 1), (0, 1, 0)]
[(-1, 1, 1), (1, -1, 1), (1, 1, -1)]
[(0, 0, 1), (1, 0, 0), (0, 1, -1)]
[(0, 1, 0, 0), (0, 0, 0, 1), (1, 0, 0, 0), (0, 0, 1, -1)]
[(0, 0, 1, 0), (0, 0, 1, 0), (1, 0, -1, 1), (0, 1, 0, 0)]
[(0, 0, 0, 1), (1, 0, 0, 0), (-1, 1, 1, 0), (1, 0, 0, 0)]
[(1, 0, 1, 0, -1), (0, 1, 0, 0, 0), (0, 0, 0, 0, 1), (0, 0, 0, 1, 0), (0, 0, 0, 0, 1)]
[(0, 0, 1, 0, 0), (0, 1, -1, 1, 0), (1, -1, 1, 0, 0), (0, 1, 1, -1, 0), (0, 0, -1, 1, 1)]
[(0, -1, 0, 1, 1), (1, -1, 1, -1, 1), (0, 1, 1, 0, -1), (1, 1, -1, 1, -1), (-1, 1, 0, 0, 1)]
[(0, 0, 1, 0, 0, 0, 0, 0), (1, 0, 1, 0, 1, 0, 0, 0), (0, 0, 0, 1, -1, 0, 0, 1), (0, 0, 1, -1, 1, 0, 0, 0), (0, 0, 0, 0, 0, 0, 1, 0), (0, 0, 0, 0, 0, 1, 0, 0), (0, 1, -1, 1, 0, 0, 0, 0), (0, 0, 1, 0, 0, 0, 0, 0)]

test-suite.sh
while read; do
        if python2 asmv.py <<< "$REPLY"; then
                echo "true"
        else
                echo "false"
        fi
done < test-cases.txt 2>&- | uniq -c

Output
$ bash test-suite.sh
     12 true
     17 false

How it works
Disregarding zeroes, each row and column has to consist of the pattern (1, -1)* 1, i.e., alternating occurrences of 1 and -1, starting and ending with a 1 (so the sum is 1).
To verify this is the case, we zip/transpose the input matrix M, append the result to M (now consisting of a list of rows and columns), and prepend a -1 to each row/column.
For example, if M is one of the following matrices (valid, invalid)
     0  1  0         0  0  0
     0  0  1         1  0  0
     1  0  0         0  1 -1

the results are
-1 | 0  1  0    -1 | 0  0  0
-1 | 0  0  1    -1 | 1  0  0
-1 | 1  0  0    -1 | 0  1 -1
------------    ------------
-1 | 0  0  1    -1 | 0  1  0
-1 | 1  0  0    -1 | 0  0  1
-1 | 0  1  0    -1 | 0  0 -1

Reading the generated matrix row-wise must result in a flat sequence with pattern (-1, 1)*. To verify this is the case, we take the cumulative sum of all entries, beginning with the top row.
For the example matrices, this results in
-1 -1  0  0 -1 -1 -1  0 -1  0  0  0 -1 -1 -1  0 -1  0  0  0 -1 -1  0  0
-1 -1 -1 -1 -2 -1 -1 -1 -2 -2 -1 -2 -3 -3 -2 -2 -3 -3 -3 -2 -3 -3 -3 -4

For a valid alternating sign matrix, the output will consist of -1's and 0's and – since every -1 cancels out the previous 1 and vice versa – no other numbers.
At first glance, this may appear to fail checking if the last column ends with a 1. However, for an n × n matrix containing k zeroes, valid rows will contain n + k ones. If all columns except the last were valid as well, there would be n + k - 1 ones in the columns, which is impossible.
To test that there are no other numbers, we store the partial sums in a variable s and update them for each entry of with generated matrix with s+=[n][s].
If s = 0 or s = -1, this is equivalent to s+=n. However, for all other values of s, it causes an IndexError, so Python immediately terminates with exit code 1. If this doesn't happen at any point, the program finishes cleanly with exit code 0.

R, 54 bytes
Anonymous function, uses the same logic as Dennis's Python 2, Jelly, and Julia answers.
function(x)all(abs(cumsum(rbind(-1,cbind(t(x),x))))<2)

source: Stack Exchange

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

sort: votes


text:
Downward Number Race
Your task is to create a program that adds random numbers to previous sums in the ultimate number racing showdown.
Each racer (column) starts at 0 and adds either 1 or 0 to the previous sum at each step of the race until all of the racers reach the score required to win. The 1 or 0 should be chosen at random (the standard definition of random can be found here). The output will show the result of the race, with each column representing one racer, in this format:
>> racers:5,score needed:2

0 0 0 0 0 # all racers start at 0
+ + + + + # add
1 0 0 0 1 # random 1 or 0
= = = = = # equals
1 0 0 0 1 # sum
+ + + + +
0 0 0 0 1
= = = = =
1 0 0 0 2 # winner!
+ + + +
1 1 1 1
= = = =
2 1 1 1
  + + +
  1 1 1
  = = =
  2 2 2   # losers

Note: only the numbers, +, and = need to be included in the output.
Input
Your program will accept the following two parameters as input:

the number of racers (columns), which must be greater than two
the score required to win, which must be greater than one

This is code-golf--the program with the least bytes wins.
Edit: there's a non-enforceable max score of 9--this is to preserve the integrity of the column. Also, spaces between columns can be omitted in the output.

What is the maximum number of columns and maximum score that would need to be supported?

There's no defined max, so it would be the same as the minimum: at least three columns and a score of two.

Will the required score have two digits?

"only the numbers, +, and = need to be included in the output." what about the spaces?

The spaces do not need to be preserved, they're in the example for clarity. Good question about the two digits--I suppose there is a max score, which is nine. I'll edit the question.

@atlasologist I am asking in regard to number widths. For instance, can we safely assume that we're not going to see more than 4294967295 (2^32-1) columns?

@hexafraction yes, the max supported can just be assumed to be whatever is reasonable.

Jelly, 37 36 33 bytes
,‘X
0Ç<³$Ð¿µżIFµ“+=”ṁṖ⁸żF
ÇÐ¡Ḋz⁶G

3 bytes thanks to Dennis.
Try it online
Explanation
,‘X                    Helper link. Argument: n. Radomly return n or n+1.

 ‘                     Increment n
,                      Pair. Yield [n, n+1]
  X                    Return a random item from the pair.

0Ç<³$Ð¿µżIFµ“+=”ṁṖ⁸żF   Monadic link. Argument: s. Generate one racer.

0                       Start with value 0.
  <³$Ð¿µ                While value is less than s:
 Ç                        Use helper link to increment current value.
                        Collect intermediate results in a list.
         I              Compute consecutive differences.
        ż               Zip intermediate results with their next increment value 0 or 1.
          Fµ            Flatten. Let's call the current list A.
                        Odd items of A are racer state and even items are random 0 or 1.
            “+=”        Yield "+=".
                 Ṗ      Yield A without its last element.
                ṁ       Mold i.e Repeat the characters of the string until it contains length(A)-1 characters.
                  ⁸ż    Zipwith. Pair the elements of A with the correponding characters
                    F   Flatten.

ÇÐ¡ṫ2z” G               Main link. Arguments: s (score needed), r (#racers)

ÇÐ¡                     Call the link above r times.
                        Generate a list of r racers.
   Ḋ                    Remove first element of the list (its a garbage s value)
    z⁶                  Transpose with space as fill value.
      G                 Grid. Format the result.

You can replace the first helper link with ,‘X (pair with incremented n, random choice). In the main link ṫ2 can be replaced with Ḋ (dequeue) and ”  with the variable ⁶.

Pyth, 38 34 bytes

j.tm+j\=jL\+C,.u+NYJ.WnsHQ+ZO2Y0J+\=QE
j.tmj\=jL\+.T,.u+NYJ.WnsHQ+ZO2Y0JE

Try it online!

TSQL, 367 345 341 bytes
Golfed
DECLARE @r int=20, -- racers
        @g char=2  -- goal

DECLARE @ varchar(99)=REPLICATE('0',@r)a:PRINT @
DECLARE @A varchar(99)='',@s varchar(99)='',@i int=0WHILE @i<@r
SELECT
@i+=1,@A+=char(43-x*11),@s+=IIF(x=1,' ',LEFT(y,1)),@=RIGHT(@,@r-1)+IIF(x=1,' ',REPLACE(LEFT(@,1)+y,@g+1,' '))FROM(SELECT
IIF(LEFT(@,1)IN('',@g),1,0)x,ROUND(RAND(),0)y)z
PRINT @A+'
'+@s+'
'+REPLACE(@A,'+','=')IF @>''goto a

Try it online
Ungolfed:
DECLARE @r int=10, -- racers
        @g char=2  -- goal

DECLARE @ varchar(99)=REPLICATE('0',@r)
a:
PRINT @
DECLARE @A varchar(99)='',@s varchar(99)='',@i int=0

WHILE @i<@r
  SELECT
    @i+=1,
    @A+=char(43-x*11),
    @s+=IIF(x=1,' ',LEFT(y,1)),
    @=RIGHT(@,@r-1)+IIF(x=1,' ',REPLACE(LEFT(@,1)+y,@g+1,' '))
  FROM(SELECT IIF(LEFT(@,1)IN('',@g),1,0)x,ROUND(RAND(),0)y)z

PRINT @A+'
'+@s+'
'+REPLACE(@A,'+','=')

IF @>''GOTO a

Note that the random seed on the test site will always be the same, giving the same result each time, in studio management it will give different results. Can use different values for racers and goal to get a different picture

Python 3, 237 bytes
from random import*
def f(n,t):
 x='0'*n,;i=j=0;y=''
 while' '*n!=x[i]:
  if j==n:j=0;x+=y,;y='';print(x[i]);i+=1
  y+=' 'if x[i][j]in(' ',str(t))else eval(["'+'","str(randint(0,1))","'='","str(int(x[i-3][j])+int(x[i-1][j]))"][i%4]);j+=1

A function that takes input via argument and prints to STDOUT. This approach makes use of the fact that the output follows a cycle of period four, of the form '+ value = value', for all racers. By using a counter modulo four, a list containing the desired value for each step as a string can be indexed into, and the result evaluated using Python's eval function.
How it works
from random import*                       Import Python's random module to access the
                                          randint function
def f(n,t):                               Function with input number of racers n and target
                                          number t
x='0'*n,;i=j=0;y=''                       Initialise return tuple storage x, state number
                                          i, racer number j and append string y for x
while' '*n!=x[i]:                         Loop through all j for some i. If the current
                                          state consists only of spaces, all racers have
                                          finished, so stop
y+=...eval([...][i%4])...                 Index into list, using i mod 4, to find the
                                          desired process for the cycle step, and append to
                                          y
(If first step of cycle)
...+...                                   Plus sign
(If second step of cycle)
...str(randint(0,1))...                   Random number from (0,1)
(If third step of cycle)
...=...                                   Equals sign
(If fourth step of cycle)
...str(int(x[i-3][j])+int(x[i-1][j]))...  Addition of random number to previous racer
                                          'score'
...' 'if x[i][j]in(' ',str(t))...         But append space if the racer has previously
                                          finished, or has reached the target
...j+=1                                   Increment j
if j==n:j=0;x+=y,;y='';print(x[i]);i+=1   If j=n, all j must have been looped through.
                                          Reset j, append new state y to x, reset y, print
                                          current state to STDOUT and increment i. When
                                          this first executes, x contains only the initial
                                          state, meaning that this is printed and the cycle
                                          starts with the second state.

Try it on Ideone

Python 2, 191 bytes
from random import*
def c(p,w,r=[],l=0):
 while p:
	p-=1;s='0'
	while`w`>s[-1]:s+="+%s="%randint(0,1);s+=`eval(s[-4:-1])`;l+=2
	r+=[s]
 for z in map("".join,zip(*(t+l*' 'for t in r))):print z

Try it online!

Python 3, 200 bytes
from random import*
def c(p,w,r=[],l=0):
 while p:
  p-=1;s='0'
  while str(w)>s[-1]:s+="+%s"%randint(0,1);s+="=%s"%eval(s[-3:]);l+=2
  r+=[s]
 for z in map("".join,zip(*(t+l*' 'for t in r))):print(z)

Try it online!

Python 2, 278 bytes
import random
r=5
w=2
s=(0,)*r
while s.count(w)<len(s):
    print ''.join(map(lambda a:str(a),s))+"\n"+'+'*len(s)
    s = tuple(map(lambda x: x<w and x+random.randrange(2) or x,s))
    print ''.join(map(lambda a:str(a), s))+"\n"+'='*len(s)
    s = tuple([x for x in s if x!= w])

where r is the no. of racers and w is the score to win
Try it here!

I tested your program, it doesn't show the result as described in the question, everything has been moved to the left.

Perl 5, 150 bytes
$,=$";say@n=(0)x(@e=('=')x(@p=('+')x<>));$t=<>;while(grep$_<$t,@n){@r=map{$_+=($g=0|rand 2);$g}@n;for$l(p,r,e,n){say map{$n[$_]>$t?$":$$l[$_]}0..$#n}}

Try it online!
First input is number of racers, second is score needed.

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:
Chessboard maze
Chess pieces (kings, queens, rooks, bishops, and knights) and pawns are on a board, but not on the a1 or h8 square. Your task is to travel from the empty a1 to the empty h8 squares, passing through only empty squares. The rules of movement are as follows:

You can proceed from any empty square to any empty square next to it (same rank, next or preceding file; or same file, next or preceding rank).
You can proceed from any empty square to any empty square diagonally next to it (next or preceding rank, next or preceding file), provided that the catty-corner squares contain either (a) two pawns or (b) pawns/pieces of opposite color. (Two non-pawn pieces, or a non-pawn piece and a pawn, of the same color are strong enough to bar your progress across the corner, but two pawns are not; and pieces/pawns of opposite color don't work in concert to bar your way.) For example, if you're on c4 and d5 is empty, you can proceed to it provided c5 and d4 contain pawns or contain pieces/pawns of opposite color. See the "Example diagonals" section, below, for pictures.

Input
FEN's board description. That is: The input will be a string that includes a description of rank 8, a slash (/), a description of rank 7, a slash, …, and a description of rank 1. The description of each rank comprises numbers and letters running from file a to file h, where the letters indicate pieces and pawns (the black ones are p= pawn, n=knight, b=bishop, r=rook, q=queen, k=king, and the white ones are capitalized versions of the same) and the numbers indicate the successive number of empty squares. For example, rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBN is the board after one ply move (king's pawn to e4) in a chess game.
a1 and h8 will be empty in the input; i.e., the first slash has a digit before it, and the last slash has a digit after it.
Output
Truthy or falsey, indicating whether successful passage to h8 is possible.
If the input is not a valid FEN board description (meaning, one that matches my explanation above), or if a1 or h8 is occupied, then the output can be anything or nothing. (In other words: you may assume the input meets the requirements above.)
Scoring
This is code golf: fewest bytes wins.
Example input and output
Note that your code must work for all valid inputs, not only the examples.
Add a space and a w after each FEN to visualize it at http://www.dhtmlgoodies.com/scripts/chess-fen/chess-fen-3.html. (Note that some other online FEN visualizers will not allow a board that's illegal in chess, e.g. with a pawn on rank 1 or 8, so can't be used for our purposes.)
Truthy examples

8/8/8/8/8/8/8/8 — the empty board
1p1Q4/2p1Q3/2p1Q3/2p1Q3/2p1Q3/2p1Q3/Q1p1Q3/1q3q2 — there's a path a1, b2, b3, b4, b5, b6, b7, c8, d7, (not e8, that's blocked off, but) d6, d5, d4, d3, d2, d1, e1, f2, f3, f4, f5, f6, f7, f8, g8, h8
8/8/KKKKK3/K3K3/K1K1p3/Kp1K4/K1KK4/2KK4 — an example where a square that's blocked at one point must be passed through later on (to make sure you don't set squares as impassable)
K1k1K1K1/1K1k1K1k/K1K1k1K1/1k1K1K1k/K1k1K1k1/1K1k1k1K/K1K1k1K1/1k1k1K1k — there's a single path through (just follow your nose: there's only one square to move to at each step, unless take a step backward); this is also an example where a square is blocked at one point but necessary later

Falsey examples

6Q1/5N2/4Q3/3N4/2Q5/1N6/2Q5/1N6 — any attempt at a path will have to pass through two diagonally situated same-color pieces
N1q1K1P1/1R1b1p1n/r1B1B1Q1/1p1Q1p1b/B1P1R1N1/1B1P1Q1R/k1k1K1q1/1K1R1P1r — the only way through the a8-h1 diagonal is at f2-g3, but that would require passage through e1-d2 or f2-e3, which are both impossible.
4Q3/4q3/4Q3/5Q2/6Q1/3QqP2/2Q5/1Q6
4q3/4Q3/4q3/5q2/6q1/3qQp2/2q5/1q6

Example diagonals
In case the prose above was unclear, here are some pictures.
Passable diagonals

Impassable diagonals

I'm sorry, i'm not sure about stanadard golf rules: What happens, if you insert a illegal String ? May any behavior occur?

@alexberne I believe this covers it: "your code must work for all valid inputs".

@alexberne, I've edited. Is it clear now?

yes, thanks. I'm new here, so it might be usal stuff for golfer, but for me it was unclear :)

Just wanted to say thanks for a great puzzle @msh210 . I don't understand why there aren't more answers.

Because it's actually quite challenging!

VBA 668 666 633 622 548 510 489 435 331 322 319 315 bytes
Function Z(F):Dim X(7,7):While Q<64:R=R+1:V=Asc(Mid(F,R))-48:If V>9 Then X(Q\8,Q Mod 8)=(3+(V\8=V/8))*Sgn(48-V):V=1
Q=Q-V*(V>0):Wend:X(7,0)=1:For W=0 To 2E3:Q=W Mod 8:P=W\8 Mod 8:For T=Q+(Q>0) To Q-(Q<7):For S=P+(P>0) To P-(P<7):If X(S,T)=0 Then X(S,T)=(1=X(P,Q))*(6>X(P,T)*X(S,Q))
Next S,T,W:Z=X(0,7):End Function

Reading the input string occupies up to 'Wend'. Nice side effect - this abandons the input string once the board [X] is fully coded, so you can leave a description on the end.
In the board coding, pawns are 2, other pieces are 3, black is negative. Pawns are recognized by 'P' & 'p' having character codes divisible by 8.
'X(7,0)=1', setting a1 accessible, is where the path checks start. This repeatedly scans the board trying to add accessible squares from squares marked as accessible (1) so far. Diagonal access and occupancy are checked in a IF + logic-calc which once lived in a function but now sits in nested neighbour loops. The diagonal access check relies on the product of the two kitty-corner squares, which is only at 6 or more if pieces there are the same colour and at least one is a piece not a pawn.
Call in spreadsheet; returns the value in X(0,7) - 1 if h8 accessible and 0 if not - which Excel recognizes as truthy / falsy.
=IF(Z(C2), "yes","no")

I maybe got carried away with scrunching the code down, above, so here is a semi-ungolfed commented version:
Function MazeAssess(F)  'input string F (FEN)
Dim X(7, 7)             'size/clear the board; also, implicitly, Q = 0: R = 0
'Interpret string for 8 rows of chessboard
While Q < 64
    R = R + 1           ' next char
    V = Asc(Mid(F, R)) - 48  ' adjust so numerals are correct
    If V > 9 Then X(Q \ 8, Q Mod 8) = (3 + (V \ 8 = V / 8)) * Sgn(48 - V): V = 1 ' get piece type (2/3) and colour (+/-); set for single column step
    Q = Q - V * (V > 0) ' increment column (unless slash)
Wend
'Evaluate maze
X(7, 0) = 1             ' a1 is accessible
For W = 0 To 2000       ' 1920 = 30 passes x 8 rows x 8 columns, golfed to 2E3
    Q = W Mod 8         ' extracting column
    P = W \ 8 Mod 8     ' extracting row
    For T = Q + (Q > 0) To Q - (Q < 7)     ' loop on nearby columns Q-1 to Q+1 with edge awareness
        For S = P + (P > 0) To P - (P < 7) ' loop on nearby rows (as above)
            If X(S, T) = 0 Then X(S, T) = (1 = X(P, Q)) * (6 > X(P, T) * X(S, Q)) ' approve nearby empty squares if current square approved and access is possible
        Next 'S
    Next 'T
Next 'W
MazeAssess = X(0, 7)    ' report result for h8
End Function

Progress notes
Edit1: The code is now not as 666-devilish :-D  and has lost its functions; I found a short-enough way to write them to avoid the overhead.
Edit2: Another biggish leap forward, effectively finishing the work of removing the inc/dec functions, sigh, and using a couple of globals. I might finally be getting the hang of this....
The coding of pieces & squares changed. No effect on code length.
Edit3: Return of (fake) functions, removing all those annoying Call bytes, and some other tweaks.
Edit4: Breaking through the big 500, woohoo - smooshed the 3 For loops into 1.
Edit5: Jiminy Cricket, another big drop when I smooshed the two functions together - my diagonal access check always passes for adjacent squares, so...
Edit6: Holy niblicks, another massive drop. Buh-bye to external functions and thus globals... I have gone to under half the original posted length....
Edit7: Add ungolfed version
Edit8: Revised the read process for a few dollars more
Edit9: Squeezed a couple of expressions for the last few drops of blood
Edit10: Compund Next statement sheds a few bytes

For interest, graphics of the boards after accessibility analysis (the code numbers are out of date but...) accessible squares are green, inaccessible squares white and other colours are pieces or pawns.

A couple of challenge boards: h8 is accessible in both:

P1Pq2p1/1P1R1R1p/1K2R1R1/1p1p1p2/p1b1b1np/1B1B1N1k/Q1P1P1N1/1r1r1n2 - 10 passes to solve
P1P3r1/1P1R2r1/1N1R1N2/1P1P1P2/1n1p1ppp/1B1B4/1b1pppp1/1P6 - a winding path

Very nice, and +1, but: (1) Are you sure 960 steps suffice? (2) Can you save some bytes by looking at the board upside-down? If V>9 Then X(7-P,C)= would I think (not that I know VBA) become If V>9 Then X(P,C)=.

Actually that technique saves initializing P, so thanks for asking :-). And yes, I'm sure 15 passes of the board is enough; I did quite a lot of checking. I haven't actually been able to push it past 10 passes, in fact, but 640 and 960 have the same number of characters so I'll play it safe. BUT if I bult the board upside down, it COULD take more than 10 passes, and maybe more than 15 - unless I traversed the board upside down also, which would have an overhead.

@msh210 1 additional observation - 15 loops is just enough to analyze the whole board, worst case, but 10 loops is enough to get the status of h8, so I have a large  margin really. The reason is that finding paths works much faster in the direction of assessment, increasing row# and column# - as long as the path is going up or right, it will be completed in a single pass. Going left or down only gets a single step further per pass.

@msh210 As part of a revamp on the read process - which narrowly kept the facility to leave a comment on the end of the FEN string - I added the board reversal you suggested - some boards now take over 15 passes (up to 17) so the function has increased to 30 passes of the board.

@Joffan you can drop 3 Bytes by condensing all instances of [some non-letter character] To to [some non-letter character]To

Oh, and if you convert this to a Sub instead of a Function and output to the VBE Immediates Window via Debug.?X(0,7):End Sub you can drop another 4 bytes

Matlab, 636 887 bytes as saved (including indentation)
This solution is not very golfed, but I wanted to go ahead and put it up.
function[n] = h(x)
o=[];
for i=x
 b={blanks(str2num(i)),'K','k',i};o=[o b{~cellfun(@isempty,regexp(i,{'\d','[NBRQK]','[nbrqk]','p|P'}))}];
end
o=fliplr(reshape(o,8,8))
for i=1:64
 b=i-[-8,8,7,-1,-9,1,9,-7];
 if mod(i,8)==1
  b=b(1:5);
 elseif mod(i,8)==0
  b=b([1,2,6:8]);
 end
 b=b(b<65&b>0);c=o(b);dn=b(isspace(c)&ismember(b,i-[9,7,-9,-7]));
 for j=dn
  g=o(b(ismember(b,j-[-8,8,7,-1,-9,1,9,-7])));
  if ~isempty(regexp(g,'pk|kp|PK|KP|kk|KK'));c(b==j)='X';end;
 end
 Bc{i}=b(c==32);
end
n=Bc{1};
on=[];
while length(n)>length(on)
 on=n;
 for i=1:length(n)
  n=unique([n Bc{n(i)}]);
 end
end
any(n==64)
end

Reads a board string x as specified above and turns it into the more completely represented o, then finds all the moves (graph edges) between spaces, then figures out which moves are possible (not into filled spaces), then figures out which possible moves have "gates" of two pieces to pass between, then figures out if the gate is open (pawns, opposite colors) or closed (same color and including a non-pawn). Then, it walks through to find locations reachable by paths from the lower left square and if a path can reach space 64, it's a Yes board.

Cool. Did you test it against my example FENs in the question to make sure it returns the correct result for each? Also, since this is a [tag:code-golf] question, you really should golf this. If nothing else, can you get rid of the indentation (or make it a single space or tab instead of four spaces)? and/or drop the spaces around the =s? (I don't know MATLAB: maybe those are impossible.)

Yeah, and I might do some of that during my next break. I did test it against all of your examples and then some. Should I indicate that in some way?

Dunno; I was just wondering.


text:
Prove that a Number is Algebraic
Inspired by this answer (emphasis mine):

We will play a game. Suppose you have some number x. You start with x and then you can add, subtract, multiply, or divide by any integer, except zero. You can also multiply by x. You can do these things as many times as you want. If the total becomes zero, you win.
For example, suppose x is 2/3. Multiply by 3, then subtract 2. The result is zero. You win!
Suppose x is 7^(1/3). Multiply by x , then by x again, then subtract 7. You win!
Suppose x is √2+√3. Here it's not easy to see how to win. But it turns out that if you multiply by x, subtract 10, multiply by x twice, and add 1, then you win. (This is not supposed to be obvious; you can try it with your calculator.)
But if you start with x=π, you cannot win. There is no way to get from π to 0 if you add, subtract, multiply, or divide by integers, or multiply by π, no matter how many steps you take. (This is also not supposed to be obvious. It is a very tricky thing!)

Numbers like √2+√3 from which you can win are called algebraic. Numbers like π with which you can't win are called transcendental.

Why is this interesting? Each algebraic number is related arithmetically to the integers, and the winning moves in the game show you how so. The path to zero might be long and complicated, but each step is simple and there is a path. But transcendental numbers are fundamentally different: they are not arithmetically related to the integers via simple steps.

Essentially, you will use the steps used in the question quoted above to "win" the game for given input.
Given a real, algebraic constant x, convert the number to zero by using the following allowed operations:

Add or Subtract an integer.
Multiply or Divide by a non-zero integer.
Multiply by the original constant x.

Input is a string that may contain integers, addition, subtraction, multiplication, division, exponentiation (your choice of ** or ^, exponents are used to represent roots), and parentheses. Spaces in the input are optional, but not in the output. You should output the steps necessary to obtain a result of zero, so multiplying by 7 as one step would be output as *7. A trailing space and/or newline is allowed.
Examples
0               ->  +0 (or any other valid, or empty)
5/7 + 42        ->  -42 *7 -5 (or shorter: *7 -299)
2^(1/3)         ->  *x *x -2
5*(3**(1/4))    ->  *x *x *x -1875
2^(1/2)+3^(1/2) ->  *x -10 *x *x +1

Shortest code wins.

How close to 0 do the results need to be? Given rounding errors and float precision, I could easily see problematic situations ...

@TimmyD The answer needs to be exact, such that I could perform the operations and get zero. View the examples provided. There is no floating point arithmetic.

How is √2+√3 algebraic? If you multiply the number by itself you get 5 + 2√6... unless I am missing something you can never force out the radical.

@mbomb007 Whoops, my apologies, didn't catch that in the OP.

It's a solution to the equation x^4-10*x^2+1. See WolframAlpha

@mbomb007 Division is not required. You can always move divisions to the end (/a +b ↦ +(a*b) /a, /a -b ↦ -(a*b) /a, /a *b ↦ *b /a, /a *x ↦ *x /a) and then delete them.

@mbomb007 Do you consider +-3, ++3, --3, -+3, *-3, *+3 to be valid output terms (adding/subtracting/multiplying the integer −3 or +3)?

@AndersKaseorg Multiplying by negatives is fine. Not the others.

SageMath, 108 bytes
def f(s):p=map('{:+} '.format,numerator(minpoly(sage_eval(s)/1)));return'*'+p[-1][1:]+'*x '.join(p[-2::-1])

Try it on SageMathCell.
Explanation:
Evaluate the string symbolically as an algebraic number (sage_eval()).  Every algebraic number is a zero of some polynomial a[0] + a[1] x^1 + a[2] x^2 + ⋯ + a[n] x^n with rational coefficients a[0], …, a[n] (minpoly()). Multiply all the coefficients by their common denominator to turn them into integers (numerator()), then write this polynomial in the desired output format,
*a[n] +a[n-1] *x +a[n-2] *x … *x +a[1] *x +a[0]

SageMath, 102 bytes, almost
lambda s:(lambda a,*p:'*%d'%a+'*x'.join(map(' {:+} '.format,p)))(*numerator(minpoly(1/sage_eval(s))))

This works for all inputs except 0, because a polynomial for 1/α is a polynomial for α with the coefficients reversed.  :-(

Mathematica, 194 224 192 bytes
""<>Cases[HornerForm@MinimalPolynomial[ToExpression@#,x]//.{Times->t,x^a_:>Fold[#2~t~#&,x~Table~a],a_~t~b_~t~c_:>a~t~t[b,c]},a_~b_~_:>{b/.t:>"*"/.Plus:>If[a>0,"+",""],ToString@a," "},{0,∞}]&

Here ∞ is the three byte unicode character representing infinity in Mathematica.
Since input is a string, 13 bytes are lost on ToExpression@ which interprets the string input as an algebraic expression.
HornerForm@MinimalPolynomial[2^(1/2)+3^(1/2), x]

Would return something like
1 + x^2 (-10 + x^2)

The next replacement rule massages this into something that is structurally like
1 + (x * (x * (-10 + (x * (x)))))

This Horner form can be visualized like a tree:

We, by the rules of OP start out with the deepest leaf on the right.
Cases goes through the expression, starting at the deepest level, taking each parent node and its left leaf and assembling this into a table such as
"*" "x"   " "
""  "-10" " "
"*" "x"   " "
"*" "x"   " "
"+" "1"   " "

""<> concatenates everything with the empty string.

This incorrectly returns -299 for 5/7 + 42.

@And So it omits the *7... I'll double check once I'm home

@AndersKaseorg this works, but now I'm 30 bytes down.


text:
Tell Me about yourself
Your task is to write a self referential program similar to a quine. The objective is to write a program that will generally print to stdout twice whatever the input is. But when it receives the input of "Tell me about your source" it should output its source (like a quine). Also if it receives the query "tell me about your length". It should output its length in utf-8 characters. Like always all standard loopholes are disabled. This is code golf in any language of your choosing.
Sample Input
2

Sample Output
4

Sample Input
Tell me about your source

Sample Output
x

Sample Input
Tell me about your length

Sample Output
1

Clarifications:
The input will always be valid your program is always going to receive valid input. Your code is not required to recognize invalid input.

This is an example of a type of challenge to avoid. It also has clarity issues - what if the input is neither a numeric nor one of the special strings?

You say it should print "twice the input". Will the input always be an integer if not the other two strings?

Welcome to Programming Puzzles and Code Golf! As others have said, this challenge could use a bit of clarification. I recommend posting future challenges to the Sandbox where they can get meaningful feedback before being posted to the main site.

@TimmyD i have added the clarifications you asked for. Let me know if it now satisfies your requirements.

And this is not necessarilly just a generalized quine as it is not just about being able to print f(source code) but print various different transformations depending on input as well as maintaining some kind of functionality when not being a quine variant. Also technically quines have no input.

Javascript - 93 92 89 bytes
Defines a function f. Not sure of a better way to return.
f=n=>{y="Tell me about your ";x="f="+f;return n==y+"source"?x:n==y+"length"?x.length:2*n}

You could use \f=${f}`.lengthto avoid thexvariable, and you could write`${y="Tell me about your "}source`to inline theyvariable declaration, at which point you only have an expression, and you can then remove the{return}`.


text:
Ways to get to the number
Given the input of the first number and the second number (both positive integers, zero exluded), determine in how many ways could you make the second out of the first, using following actions: +1,+2 and *3. Operations are simply applied from left to right.
Examples:

Input: 1 2. Output: 1. I.e, you could only get 2 by doing +1, so one way.
Input: 1 3. Output: 3. I.e, you could get 3 by either doing +2 or +1+1, or *3
Input: 1 4. Output: 4.
Input: 2 6. Output: 6.
Input: 2 7. Output: 9.
Input: 1 10. Output: 84.

In case there're no ways, e.g. 100 100, or 100 80, output is 0.
You could also take input as an array, or string with any convenient separator.
The shortest solution wins.

It looks like it could be a dupe, sorry if it is - didn't find a similar question.

What about inputs for which the answer should be infinite? E.g. any input where the first integer is negative, because you can multiply by three and then increment back to the original number and repeat as many times as you want.

@Patrick: It does make sense though. Starting from -1 and going to 0, you can apply *3 +2 +1 as many times as you want, then apply +1 to get to 0.

@Peter Fair remark, restricted to positive numbers.

Pyth - 26 24 bytes
There seems to be a bug in Pyth that's making it take inputs in the wrong order, but it shouldn't matter anyway.
/m.vj;+sdzs^Lc3"+1+2*3"S

Test Suite.
(1 10 timed out online, but worked on my computer).

Timed out, with such small numbers? Huh.

@nicael yeah, there's only 59K ways that I check for 10, but pyth is slooooooow

Javascript ES6, 45 44 bytes
f=(a,b=B)=>a<(B=b)?f(a+1)+f(a+2)+f(a*3):a==b

Example runs:
f(1,2)  -> 1
f(2,6)  -> 6
f(1 10) -> 84

Interesting use of default parameters, though admittedly it doesn't save any bytes here. =B and (B=) (b omitted on purpose) is 6 characters and the alternative is passing ,b 3 times to the recursive calls which is also 6 characters. Anyway, good job.

Pyth, 29 bytes
M?>GH0|qGH+sgLGtBtH?%H3ZgG/H3

Try it online!
Defines a function. Added three bytes in the link to call the function.


text:
Derivative at the Edge
My preferred way to approximate a derivative is the central difference, its more accurate than forward difference or backward difference, and I'm too lazy to go higher-order. But the central difference requires a data point on either side of point you are evaluating. Normally this means you end up not having a derivative at either endpoint. To solve it, I want you to switch to forward and backward difference at the edges:
Specifically, I want you to use a forward difference for the first point, a backward difference for the last point, and a central difference for all the points in the middle. Also, you can assume x values are evenly spaced, and focus only on y. Use these formulas:

Good luck, I'm looking forward to seeing if someone comes up with a simple rule which reproduces all 3 derivatives in the right places!
EX INPUT:
0.034  9.62    8.885   3.477   2.38

I will use FD, CD, and BD to denote which algorithm to use in which spot, so above 5 points are used to approximate derivatives using
FD     CD      CD      CD     BD

And then the calculated values would be:
9.586  4.4255 -3.0715 -3.2525 -1.097

You can assume that there will always be at least 3 input points, and you can calculate using single or double precision.
And as always, shortest answer wins.

Just a nitpick, central/forward/backward differences are just approximations of derivatives at a point, not the derivatives themselves.

I don't understand what each input and output number corresponds to.

@xnor, i put a brief description between the input and output explaining what algorithm to use for which data point. Does it make sense now?

Yes, I think it makes sense. For 5 inputs, you'd do [a,b,c,d,e] -> [b-a,(c-a)/2,(d-b)/2,(e-c)/2,e-d]. Can there be fewer that 3 input points?

@xnor, that's right. And, I updated so you can assume at least 3 input points.

Jelly, 13 10 bytes
I.ịṚjI+2\H

Try it online!
How it works
I.ịṚjI+2\H  Main link. Argument: A (array)

I           Increments; compute the deltas of consecutive values.
            For [a, b, c, d, e], this yields [b-a, c-b, d-c, e-d].
 .ị         At-index 0.5; get the the last and first element.
            This yields [e-d, b-a].
   Ṛ        Reverse the pair.
            This yields [b-a, e-d].
    jI      Join, separating by the increments.
            This yields [b-a, b-a, c-b, d-c, e-d, e-d].
      +2\   Add the values of all overlapping pairs.
            This yields [2(b-a), c-a, d-b, e-c, 2(e-d)].
         H  Halve all resulting numbers.
            This yields [b-a, (c-a)/2, (d-b)/2, (e-c)/2, e-d].

MATL, 21 15 bytes
2/d1)6Mh8Mt0)h+

TryItOnline
Halves the input vector, and takes successive differences, to give d=[i(2)-i(1) i(3)-i(2) ... i(end)-i(end-1)]/2 and then makes two modified vectors, [d(1) d] and [d d(end)], and adds them.
The older version was better (because convolution), but 21 bytes
d1j)6M1)6MTT2/H3$Y+bv

I see, pretty clever. So you take a list of forward differences, and a list of backwards differences and average them to get the central difference. Then the endpoints are fixed by instead averaging 2 forward differences or 2 backward differences (in the same spot). Since the forward and backward difference are just shifted from each other by one spot, you get to reuse a lot of structure.

Just forward differences, otherwise yes. Doing (y(i)-y(i-1))+(y(i+1)-y(i)) gives y(i+1)-y(i-1), which is twice the centred difference.

Python with NumPy, 29 bytes
import numpy;numpy.gradient

This happens to be the default behaviour of NumPy's gradient function. The bytes were counted according to this consensus.

05AB1E, 20 19 17 14 bytes
¥Ð¦øO;s¤s0èŠ)˜

Explained
¥Ð              # triplicate deltas of list
                  [9.585999999999999, -0.7349999999999994, -5.4079999999999995, -1.097]
  ¦øO;          # get central difference (fold addition over deltas and divide by 2)
                  [4.4254999999999995, -3.0714999999999995, -3.2524999999999995]
      s¤        # get backwards difference
                  -1.097
        s0è     # get forwards difference
                  9.585999999999999
           Š)˜  # reorder differences, merge to list and flatten
                  [9.585999999999999, 4.4254999999999995, -3.0714999999999995, -3.2524999999999995, -1.097]

Try it online
Saved 2 bytes thanks to @Adnan

Julia, 8 bytes
gradient

Inspired by @MartinEnder's Python answer. Try it online!

This also works in Matlab and in Octave

Pyth, 14 bytes
.OM>L2._seB-Vt

Try it online: Demonstration
Explanation:
.OM>L2._seB-VtQQ   implicitly add two Qs (input arrays) at the end
           -VtQQ   get all neighbored differences
        seB        get the last element of ^ and append it to ^
      ._           compute all prefixes
   >L2             reduce all prefixes to the last two elements
.OM                compute the average of each ^

J, 21 bytes
[:((,{:)+{.,])2-~/\-:

Similar to the approach used in @David's solution.
Usage
   f =: [:((,{:)+{.,])2-~/\-:
   f 0.034 9.62 8.885 3.477 2.38
9.586 4.4255 _3.0715 _3.2525 _1.097

Explanation
[:((,{:)+{.,])2-~/\-:  Input: list A
                   -:  Halve each value in A
              2   \    Select each overlapping sublist of size 2 in A
               -~/     Reduce it using subtraction to get the difference
[:(          )         Operate on the list of differences, call it D
            ]          Identity function, returns D
         {.            Get the head of D
           ,           Join them to get [head(D), D]
   ( {:)               Get the tail of D
    ,                  Join them to get [D, tail(D)]
        +              Add them together elementwise to get the derivatives and return

Pyth - 29 bytes
Stupid simple approach.
s[_-F<Q2mc-@Qhd@Qtd2tUtQ_-F>2

Try it online here.

JavaScript (ES6), 62 bytes
a=>a.map((_,i)=>i&&i--<a.length-2?(a[i+2]-a[i])/2:a[i+1]-a[i])

Pyth, 27 24 23 21 bytes

.bcF_-VNYK++]hJ,VUQQJ]eJttK
.bcF-VYN+]hJ,VQUQJ+tJ]eJ
++hJ-V+tQeQ+hQQcR2PtJeJ
*V++1*].5ttlQ1-V+tQeQ+h
*V++1m.5ttQ1-V+tQeQ+h

Try it online!


text:
Calculate Euler's totient function
Background
Euler's totient
function φ(n) is defined as the number of whole numbers less than or equal to n that are relatively prime to n,
that is, the number of possible values of x in 0 < x <= n for which
gcd(n, x) == 1.
We've had
a
few totient-related challenges
before, but never one which is just calculating it.
The mapping of the totient function onto the whole numbers is OEIS A000010.
Challenge
Given an integer n > 0, calculate φ(n).
You may take input through
command-line arguments,
standard input,
function arguments,
or anything else reasonable.
You may give output through
standard output,
return values,
or anything else reasonable.
Anonymous functions are acceptable.
You may assume that the input will not overflow your natural method of storing integers, e.g. int in C, but you must support inputs up to 255.
If your language has a built-in totient function, you may not use it.
Examples
φ(1) => 1
φ(2) => 1
φ(3) => 2
φ(8) => 4
φ(9) => 6
φ(26) => 12
φ(44) => 20
φ(105) => 48

Shortest answer in bytes wins. If your language uses an encoding other than UTF-8, mention it in your answer.

Well there was this the other day. I don't think the repeated application makes a sufficient difference, but if anything I'd close the other one, because I also don't think the repeated application adds anything. That said, the bigger difference is that that one allowed built-ins and this one doesn't.

Disallowing built-ins apparently has no impact on the answers.

@JuliePelletier Why is that? My Mathematica answer would otherwise have been 19 bytes shorter: EulerPhi

@JuliePelletier GCD is allowed because calculating GCD is not the intended problem to be solved. Sure, it might bump up the byte counts on these answers, but it doesn't make the challenge better. I'll edit to clarify.

Mathematica, 27 22 bytes
Range@#~GCD~#~Count~1&

An unnamed function that takes and returns an integer.
Not much to explain here, except that @ is prefix notation for function calls and ~...~ is (left-associative) infix notation, so the above is the same as:
Count[GCD[Range[#], #], 1] &

J, 9 bytes
(-~:)&.q:

This is based on the Jsoftware's essay on totient functions.
Given n = p1e1 ∙ p2e2 ∙∙∙ pkek where pk is a prime factor of n, the totient function φ(n) = φ(p1e1) ∙ φ(p2e2) ∙∙∙ φ(pkek) = (p1 - 1) p1e1 - 1 ∙ (p2 - 1) p2e2 - 1 ∙∙∙ (pk - 1) pkek - 1.
Usage
   f =: (-~:)&.q:
   (,.f"0) 1 2 3 8 9 26 44 105
  1  1
  2  1
  3  2
  8  4
  9  6
 26 12
 44 20
105 48
   f 12345
6576

Explanation
(-~:)&.q:  Input: integer n
       q:  Prime decomposition. Get the prime factors whose product is n
(   )&     Operate on them
  ~:         Nub-sieve. Create a mask where 1 is the first occurrence
             of a unique value and 0 elsewhere
 -           Subtract elementwise between the prime factors and the mask
     &.q:  Perform the inverse of prime decomposition (Product of the values)

Use the fact that totient is multiplicative to make another solution in J using recursion :)

@LeakyNun I don't think there's an easy way to golf the factoring, since even using the iterative form [:*/@({.(^-(^<:)){:)2&p: needs 24 bytes, even using the builtin to get the the primes and their exponents. Or maybe there's a shorter way and I don't see it.

MATL, 7 bytes
t:Zd1=s

You can TryItOnline. Simplest idea, make a vector 1 to N, and taken gcd of each element with N (Zd does gcd). Then, find which elements are equal to 1, and sum the vector to get the answer.

The builtin is _Zp for those wondering.

Haskell, 28 bytes
f n=sum[1|1<-gcd n<$>[1..n]]

Uses Haskell's pattern matching of constants. The tricks here are fairly standard for golfing, but I'll explain to a general audience.
The expression gcd n<$>[1..n] maps gcd n onto [1..n]. In other words, it computes the gcd with n of each number from 1 to n:
[gcd n i|i<-[1..n]]

From here, the desired output is the number of 1 entries, but Haskell lacks a count function. The idiomatic way to filter to keep only 1's, and take the resulting length, which is much is too long for golfing.
Instead, the filter is simulated by a list comprehension [1|1<-l] with the resulting list l. Usually, list comprehensions bind values onto variable like in [x*x|x<-l], but Haskell allows a pattern to be matched against, in this case the constant 1.
So, [1|1<-l] generating a 1 on each match of 1, effectively extracting just the 1's of the original list. Calling sum on it gives its length.

I think this is the first Haskell answer I actually understand. It's such a cool language, but it's so different from most others.

Wow, I expected that pattern matching had to be exhaustive in comprehension lists. Thanks for the trick.

Python 2, 44 bytes
f=lambda n,d=1:d/n or-f(d)*(n%d<1)-~f(n,d+1)

Less golfed:
f=lambda n:n-sum(f(d)for d in range(1,n)if n%d<1)

Uses the formula that the Euler totients of the divisors of n have a sum of n:

The value of ϕ(n) can then be recursively computed as n minus the sum over nontrivial divisors. Effectively, this is doing Möbius inversion on the identity function. I used the same method in a golf to compute the Möbius function.
Thanks to Dennis for saving 1 byte with a better base case, spreading the initial value of +n into +1 for each of the n loops, done as -~.

Jelly, 4 bytes
Rgċ1

Try it online!
Explanation
Rgċ1   Main monadic chain. Argument: z

R      Yield [1 2 3 .. z].
 g     gcd (of each) (with z).
  ċ1   Count the number of occurrences of 1.

With built-in
ÆṪ

Try it online!
Explanation
ÆṪ   Main monadic chain. Argument: z

ÆṪ   Totient of z.

Regex (ECMAScript), 131 bytes
At least -12 bytes thanks to Deadcode (in chat)
(?=((xx+)(?=\2+$)|x+)+)(?=((x*?)(?=\1*$)(?=(\4xx+?)(\5*(?!(xx+)\7+$)\5)?$)(?=((x*)(?=\5\9*$)x)(\8*)$)x*(?=(?=\5$)\1|\5\10)x)+)\10|x

Try it online!
Output is the length of the match.
ECMAScript regexes make it extremely hard to count anything. Any backref defined outside a loop will be constant during the loop, any backref defined inside a loop will be reset when looping. Thus, the only way to carry state across loop iterations is using the current match position. That’s a single integer, and it can only decrease (well, the position increases, but the length of the tail decreases, and that’s what we can do math to).
Given those restrictions, simply counting coprime numbers seems impossible. Instead, we use Euler’s formula to compute the totient.
Here’s how it looks like in pseudocode:
N = input
Z = largest prime factor of N
P = 0

do:
   P = smallest number > P that’s a prime factor of N
   N = N - (N / P)
while P != Z

return N

There are two dubious things about this.
First, we don’t save the input, only the current product, so how can we get to the prime factors of the input? The trick is that (N - (N / P)) has the same prime factors > P as N. It may gain new prime factors < P, but we ignore those anyway. Note that this only works because we iterate over the prime factors from smallest to greatest, going the other way would fail.
Second, we have to remember two numbers across loop iterations (P and N, Z doesn’t count since it’s constant), and I just said that was impossible! Thankfully, we can swizzle those two numbers in a single one. Note that, at the start of the loop, N will always be a multiple of Z, while P will always be less than Z. Thus, we can just remember N + P, and extract P with a modulo.
Here’s the slightly more detailed pseudo-code:
N = input
Z = largest prime factor of N

do:
   P = N % Z
   N = N - P
   P = smallest number > P that’s a prime factor of N
   N = N - (N / P) + P
while P != Z

return N - Z

And here’s the commented regex:
# \1 = largest prime factor of N
# Computed by repeatedly dividing N by its smallest factor
(?= ( (xx+) (?=\2+$) | x+ )+ )

(?=
        # Main loop!
        (
                # \4 = N % \1, N -= \4
                (x*?) (?=\1*$)

                # \5 = next prime factor of N
                (?= (\4xx+?) (\5* (?!(xx+)\7+$) \5)? $ )

                # \8 = N / \5, \9 = \8 - 1, \10 = N - \8
                (?= ((x*) (?=\5\9*$) x) (\8*) $ )

                x*
                (?=
                        # if \5 = \1, break.
                        (?=\5$) \1
                |
                        # else, N = (\5 - 1) + (N - B)
                        \5\10
                )
                x
        )+
) \10

And as a bonus…
Regex  (ECMAScript 2018, number of matches), 23 bytes
x(?<!^\1*(?=\1*$)(x+x))

Try it online!
Output is the number of matches. ECMAScript 2018 introduces variable-length look-behind (evaluated right-to-left), which makes it possible to simply count all numbers coprime with the input.
It turns out this is independently the same method used by Leaky Nun's Retina solution, and the regex is even the same length (and interchangeable). I'm leaving it here because it may be of interest that this method works in ECMAScript 2018 (and not just .NET).
                        # Implicitly iterate from the input to 0
x                       # Don’t match 0
 (?<!                 ) # Match iff there is no...
                 (x+x)  # integer >= 2...
         (?=\1*$)       # that divides the current number...
     ^\1*               # and also divides the input

Pyke, 5 bytes
m.H1/

Try it here!
count(map(gcd, range(input)), 1)

So many Python derivatives.. I like this one though. Interesting premise.

Ruby, 32 bytes
->n{(1..n).count{|i|i.gcd(n)<2}}

a lambda that takes an integer n, and returns the counts of how many integers in the range (1..n) are coprime with n.

Hello, and welcome to PPCG! This is a great first post.

Welcome to Programming Puzzles and Code Golf! This is a great first solution, keep it up!

Thanks, not really that short, I wonder if it's possible to improve it.

J, 11 bytes
+/@(1=+.)i.

Usage
>> f =: +/@(1=+.)i.
>> f 44
<< 20

where >> is STDIN and << is STDOUT.
Explanation
+/ @ ( 1 = +. ) i.
               │
   ┌───────────┴┐
 +/@(1=+.)      i.
   │
 ┌─┼──┐
+/ @ 1=+.
    ┌─┼─┐
    1 = +.

>> (i.) 44            NB. generate range
<< 0 1 2 3 4 ... 43
>> (+.i.) 44          NB. calculate gcd of each with input
<< 44 1 2 1 4 ... 1
>> ((1=+.)i.) 44      NB. then test if each is one (1 if yes, 0 if no)
<< 0 1 0 1 0 ... 1
>> (+/@(1=+.)i.) 44   NB. sum of all the tests
<< 20

How did you get the vertical tree representation? I thought it only produced horizontal.

@miles I typed it myself.

Python >=3.5, 76 64 58 bytes
Thanks to LeakyNun for golfing off 12 (!) bytes.
Thanks to Sp3000 for golfing off 6 bytes.
import math
lambda n:sum(math.gcd(n,x)<2for x in range(n))

I love how readable Python is. This makes sense, even through the golfedness.

lambda n:sum(gcd(n,x)<2for x in range(n))

Oh, Python finally added gcd to the math module! I didn't know it.

Perl 6,  26 24  22 bytes
{[+] (^$^n Xgcd $n) X== 1}
{+grep 2>*,(^$_ Xgcd$_)}
{[+] 2 X>(^$_ Xgcd$_)}
Explanation:
{
  [+] # reduce using &infix:<+>
    2
    X[>] # crossed compared using &infix:«>»
    (
      ^$_    # up to the input ( excludes input )
      X[gcd] # crossed using &infix:<gcd>
      $_     # the input
    )
}

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

my &φ = {[+] 2 X>(^$_ Xgcd$_)};

say φ(1) # 1
say φ(2) # 1
say φ(3) # 2
say φ(8) # 4
say φ(9) # 6
say φ(26) # 12
say φ(44) # 20
say φ(105) # 48

say φ 12345 # 6576

20 bytes

Brachylog, 25 bytes
:{:1e.$pdL,?$pd:LcCdC}fl.

Explanation
Brachylog has no GCD built-in yet, so we check that the two numbers have no prime factors in common.

Main predicate:
:{...}fl.             Find all variables which satisfy predicate 1 when given to it as
                      output and with Input as input.
                      Unify the Output with the length of the resulting list

Predicate 1:
:1e.                  Unify Output with a number between Input and 1
    $pdL              L is the list of prime factors of Output with no duplicates
        ,
         ?$pd:LcC     C is the concatenation of the list of prime factors of Input with
                      no duplicates and of L
                 dC   C with duplicates removed is still C

Julia 1.x, 22 bytes
!n=sum(gcd.(1:n,n).<2)

This is the same as the old solution, but using newer features of the language, as the original solution dates back to something like Julia 0.4. This solution uses function broadcasting to achieve the result more efficiently.

Julia, 25 bytes
!n=sum(i->gcd(i,n)<2,1:n)

It's simple - the sum function allows you to give it a function to apply before summing - basically the equivalent of running map and then sum. This directly counts the number of relatively prime numbers less than n.

this works in Julia 1.0, you can use TIO Try it online!

Python 2, 57 bytes
f=lambda n,k=1,m=1:n*(k>n)or f(n-(n%k<m%k)*n/k,k+1,m*k*k)

Test it on Ideone.
Background
By Euler's product formula,

where φ denotes Euler's totient function and p varies only over prime numbers.
To identify primes, we use a corollary of Wilson's theorem:

How it works
At all times, the variable m will be equal to the square of the factorial of k - 1. In fact, we named arguments default to k = 1 and m = 0!2 = 1.
As long as k ≤ n, n*(k>n) evaluates to 0 and the code following or gets executed.
Recall that m%k will yield 1 if m is prime and 0 if not. This means that x%k<m%k will yield True if and only if both k is a prime number and x is divisible by k.
In this case, (n%k<m%k)*n/k yields n / k, and subtracting it from n replaces its previous value with n(1 - 1/k), as in Euler's product formula. Otherwise, (n%k<m%k)*n/k yields 0 and n remains unchanged.
After computing the above, we increment k and multiply m by the "old" value of k2, thus maintaining the desired relation between k and m, then call f recursively with the updated arguments.
Once k exceeds n, n*(k>n) evaluates to n, which is returned by the function.

Python 2, 44 bytes
lambda n:sum(k/n*k%n>n-2for k in range(n*n))

This uses the same method to identify coprimes as my answer to “Coprimes up to N”.
Try it online!

With, I see, the slight adjustment of checking for a product of n-1 instead of 1, which makes it work for n==1.

Factor, 50 bytes
[ dup iota swap '[ _ gcd nip 1 = ] filter length ]

Makes a range (iota) n, and curries n into a function which gets gcd x n for all values of 0 <= x <= n, tests if the result is 1. Filter the original range on whether the result of gcd x n was 1, and take its length.

[ dup iota swap '[ _ gcd nip 1 = ] map sum ] saves 6 bytes (I think - not very experienced with Factor).

@bkul Thanks for the suggestion! :D Unfortunately, there is no compatibility whatsoever between numbers and t/f (symbols) in Factor, so the only way to implement that would be with [ dup iota swap '[ _ gcd nip 1 = 1 0 ? ] map sum ], which is the same exact length as the current solution.

Ah, dang. Strong typing strikes again.

@bkul Well, I'm thankful for strong typing and TYPED: in real Factor code :P

Pyth, 6 bytes
smq1iQ

Try it online!
/iLQQ1

Try it online!
Explanation
smq1iQ     input as Q
smq1iQdQ   implicitly fill variables

 m     Q   for d in [0 1 2 3 .. Q-1]:
    iQd        gcd of Q and d
  q1           equals 1? (1 if yes, 0 if no)
s          sum of the results

/iLQQ1     input as Q

 iLQQ      gcd of each in [0 1 2 3 .. Q-1] with Q
/    1     count the number of occurrences of 1

PowerShell v2+, 72 bytes
param($n)1..$n|%{$a=$_;$b=$n;while($b){$a,$b=$b,($a%$b)};$o+=!($a-1)};$o

PowerShell doesn't have a GCD function available to it, so I had to roll my own.
This takes input $n, then ranges from 1 to $n and pipes those into a loop |%{...}. Each iteration we set two helper variables $a and $b and then execute a GCD while loop. Each iteration we're checking that $b is still non-zero, and then saving $a%$b to $b and the previous value of $b to $a for the next loop. We then accumulate whether $a is equal to 1 in our output variable $o. Once the for loop is done, we place $o on the pipeline and output is implicit.
As an example of how the while loop works, consider $n=20 and we're on $_=8. The first check has $b=20, so we enter the loop. We first calculate $a%$b or 8%20 = 8, which gets set to $b at the same time that 20 gets set to $a. Check 8=0, and we enter the second iteration. We then calculate 20%8 = 4 and set that to $b, then set $a to 8. Check 4=0, and we enter the third iteration. We calculate 8%4 = 0 and set that to $b, then set $a to 4. Check 0=0 and we exit the loop, so the GCD(8,20) is $a = 4. Thus, !($a-1) = !(4-1) = !(3) = 0 so $o += 0 and we don't count that one.

Japt -mx, 7 5 bytes
yN ¥1

Run it online
-2 bytes thanks to Shaggy

5 bytes using -mx.

@Shaggy Ah, nice. I tried an -m solution but forgot about -x. Thanks!

C (gcc), 67 65 bytes
f(x,a,b,y,z){for(z=y=x;a=y--;z-=b>1)for(b=x;a^=b^=a^=b%=a;);x=z;}

Try it online!
Edit: Removed temp variable.
Edit2: -1 thanks to @HowChen
Slightly less golfed
f(x,a,b,y,z){
  // counts y NOT coprime with x and subtract
  for(z=y=x;a=y--;z-=b>1)
    // compute GCD
    for(b=x;a^=b^=a^=b%=a;);
  x=z;
}

Retina, 36 29 bytes
7 bytes thanks to Martin Ender.
.+
$*
(?!(11+)\1*$(?<=^\1+)).

Try it online!
Explanation
There are two stages (commands).
First stage
.+
$*

It is a simple regex substitution, converting the input to that many ones.
For example, 5 would be converted to 11111.
Second stage
(?!(11+)\1*$(?<=^\1+)).

This regex tries to match the positions which satisfy the condition (co-prime with input), and then return the number of matches.

Lookbehind does not backtrack unless inside a lookahead?

Lookarounds don't backtrack in general.

Then how is it that the regex tested every divisor?

Well they do backtrack as long as you don't leave them. As long as the engine is inside the lookaround it will try everything possible to make that lookaround match (or fail in the case of a negative lookaround). But once the lookaround is passed, the engine will not backtrack into it if anything after it fails (unless it then also starts to backtrack things in front of the lookaround and has to reevaluate everything anyway).

05AB1E, 7 bytes
Lvy¹¿i¼

Explained
Lv        # for each x in range(1,n)
  y¹¿     # GCD(x,n)
     i¼   # if true (1), increase counter
          # implicitly display counter

Try it online

Probably this wasn't possible when you posted it, but some 5-byters are possible now: L€¿1¢; Lʒ¿}g; L€¿ΘO.

Haskell, 31 30 bytes
\n->sum[1|x<-[1..n],gcd n x<2]

1 byte saved, thanks to @Damien.
Selects values with gcd = 1, maps each to 1, then takes the sum.

You can replace ==1 by <2

Common Lisp, 58 bytes
(defun o(x)(loop for i from 1 to x if (=(gcd x i)1)sum 1))

This is a simple loop which counts up 1 to the given n and increments the sum if gcd = 1. I use the function name o since t is the true boolean value. Not nearly the shortest but fairly simple.

Does CL not have some sort of anonymous function?

MATLAB / Octave, 21 bytes
@(n)sum(gcd(n,1:n)<2)

Creates an anonymous function named ans which can be called with the integer n as the only input: ans(n)
Online Demo

APL, 7 bytes
+/1=⊢∨⍳

This is a monadic function train that takes an integer on the right. The approach here is the obvious one: sum (+/) the number of times the GCD of the input and the numbers from 1 to the input (⊢∨⍳) is equal to 1 (1=).
Try it here

JavaScript (ES6), 53 bytes
f=(n,k=n)=>k--&&(C=(a,b)=>b?C(b,a%b):a<2)(n,k)+f(n,k)

Try it online!

Brachylog v2, 16 bytes
{>ℕ≜;?ḋˢ{⊇ᵛ!}Ė}ᶜ

Try it online!
{             }ᶜ    Count the number of possible ways that:
  ℕ≜                some non-negative integer
 >                  less than the input
    ;?              and the input
      ḋˢ            have prime factorizations
        {⊇ᵛ!}       the largest shared subset of which
             Ė      is empty.

Brachylog v2, 16 bytes
⟨⟦₅zg⟩{ḋˢ⊇ᵛ!Ė}ˢl

Try it online!
   z                Cycling zip
 ⟦₅                 the range from 0 to one less than the input
⟨   g⟩              with a list containing only the input.
      {      }ˢ     Map where possible over the pairs:
       ḋˢ           the prime factorizations'
         ⊇ᵛ!        largest shared subset
            Ė       is empty.
               l    For how many pairs did it succeed?

A nuance that my explanations fail to capture is that ḋ fails given an input of 1, so if ḋˢ is given a list containing 1, the 1 is essentially discarded and ignored--so the ⊇ᵛ! (which is really "find any common subset, then discard all of this predicate's choice points", hence the braces in the first solution) of the remaining single number is its entire prime factorization, decidedly not empty, unless the list was nothing but 1s in which case everything is empty.

Husk, 7 bytes
ṁo=1⌋¹ḣ

Try it online!
ṁo=1⌋¹ḣ
ṁ     ḣ     # sum of function applied to 1..input
 o          # join 2 functions:
    ⌋¹      # greatest common divisor with input
  =1        # equals 1

Actually, 11 bytes
;╗R`╜g`M1@c

Try it online!
Explanation
;╗R`╜g`M1@c   register stack             remarks

                       44
;                      44 44
 ╗            44       44
  R           44       [1 2 3 .. 44]
       M      44       10                for example
    ╜         44       10 44
     g        44       2
              44       [1 2 1 .. 44]     gcd of each with register
        1     44       [1 2 1 .. 44] 1
         @    44       1 [1 2 1 .. 44]
          c   44       20                count

With built-in
▒

Try it online!

You can alternatively use `;╗R`╜g1=`MΣ` for the same byte count

JavaScript (ES6), 67 bytes
f=n=>[...Array(n)].reduce(r=>r+=g(n,++i)<2,i=0,g=(a,b)=>b?g(b,a%b):a)

Batch, 151 145 144 bytes
@echo off
set t=
for /l %%i in (1,1,%1)do call:g %1 %%i
echo %t%
exit/b
:g
set/ag=%1%%%2
if not %g%==0 call:g %2 %g%
if %2%==1 set/at+=1

Edit: Saved 4 bytes by removing unnecessary spaces. Saved 1 byte by using +=. Saved 1 byte by clearing t as += will interpret that as 0 anyway. Saved 1 byte thanks to @EʀɪᴋᴛʜᴇGᴏʟғᴇʀ.

Pari/GP, 24 bytes
n->sum(i=1,n,gcd(i,n)<2)

Try it online!

TI-84 BASIC, 19 bytes
Prompt A:sum(seq(1=gcd(A,B),B,1,A

Japt -mx, 2 bytes
jN

Try it here

?? How it works ??

JavaScript (Node.js), 42 bytes
n=>(g=k=>k&&((k/n|0)*k%n>n-2)+g(k-1))(n*n)

Try it online!
Direct port of Dennis' solution (<- also see the explanation in that answer) to JavaScript.
Alternatives:
n=>(g=k=>k&&g(k-1)+!(~((k/n|0)*k)%n))(n*n)
n=>(g=k=>k&&g(k-1)+!(((k/n|0)*k-1)%n))(n*n)
n=>(g=k=>k&&g(k-1)+!((k/n|0)*k%n-n+1))(n*n)
f=(n,k=0)=>k<n*n&&((k/n|0)*k%n>n-2)+f(n,k+1)

I think this can be useful in other challenges, since it's shorter than all the existing JavaScript answers.

Vyxal s, 5 bytes
ɾ$ġ1=

Try it Online!
No totient builtin
Inclusive range, swap with input, gcd, equal to 1, sum

Thunno 2 L, 3 bytes
æĠḅ

Try it online!
Explanation
æĠḅ  # Implicit input
æ    # Filter by:
 Ġ   #  GCD with input
  ḅ  #  Equals one?
     # Length of list
     # Implicit output

Hoon, 56 bytes
|=
a/@
(lent (skim (gulf 1 a) |=(@ =(1 d:(egcd +< a)))))

Measure the length of the list [1...a] after keeping all the elements where GCD(i, a) == 1

Arturo, 34 bytes
$->n[enumerate..1n'x->2>gcd@[x,n]]

Try it

><> (Fish), 76 bytes
0i::?v~~n;
v&~$1\:&:&:&%?v$:&:&%?
/~v?:-2&      <
r \1+\20.
1.   \6
\+r1-20.

Try it

SageMath, 41 bytes
Run it on SageMathCell!
f=lambda n:sum(gcd(i,n)<2 for i in[1..n])

Nekomata, 4 bytes
RG1Ĉ

Attempt This Online!
RG1Ĉ
R       Range from 1 to input
 G      GCD
  1Ĉ    Count 1s