Pascal's triangle is a triangular diagram where the values of two numbers added together produce the one below them.
This is the start of it:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
You can see that the outside is all 1s, and each number is the sum of the two above it. This continues forever.
Your challenge is to count the number of times a value \$> 1\$ appears in Pascal's triangle.
For example, with the value 6:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
It occurs three times. It will never occur more because after this, all numbers other than 1s will be greater than it.
As pointed out by tsh, this is A003016.
Scoring
This is code-golf, shortest wins!
Testcases
2 => 1
4 => 2
6 => 3
10 => 4
28 => 4
20 => 3
120 => 6