Expand (x + 1)³ and the solver answers x³ + 3x² + 3x + 1. The coefficients 1, 3, 3, 1 are the fourth row of the triangle, and they count the ways of choosing which bracket each term comes from: one way to take three x's, three ways to take two x's and one 1, three ways to take one x, one way to take only the 1's.
The reverse direction works on the same screen: factor x³ + 3x² + 3x + 1 and the answer comes back as (x + 1) · (x + 1) · (x + 1). It is worth checking with a number, because cube expansions are where sign slips are most common: at x = 7 both routes must land on 512, and they do.
Answer
x³ + 3x² + 3x + 1
How to read it
The solver's simplify line for (x + 1)³. Feeding the polynomial back through factor returns (x + 1) · (x + 1) · (x + 1).
Source
The binomial coefficients appear in the tenth-century commentary of Halayudha on Pingala's Chandaḥśāstra; Blaise Pascal's treatise on the triangle is from 1653–54
Work it in the calculator
These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.