The letters of the day on “Sesame Street” are H, B and O.

Sesame Workshop, the nonprofit group behind the children’s television program, has struck a five-year deal with HBO, the premium cable network, that will bring first-run episodes of “Sesame Street” exclusively to HBO and its streaming outlets starting in the fall.

The partnership, announced Thursday, will allow the financially challenged Sesame Workshop to significantly increase its production of “Sesame Street” episodes and other new programming. The group will produce 35 new “Sesame Street” episodes a year, up from the 18 it now produces. It will also create a spinoff series based on the “Sesame Street” Muppets along with another new educational series for children.

After nine months of appearing only on HBO, the shows will be available free on PBS, home to “Sesame Street” for the last 45 years.

It is an unexpected union: the nonprofit behind a TV show created to teach children in underserved communities matched with the premium cable network that targets affluent adults with innovative programming. But the deal speaks to the digital transformation upending the television business, primarily the explosion of streaming video creating a generation of children who watch shows on demand, often on a mobile phone or tablet, instead of flipping on a TV.