Newly single philanthropist Patsy Kahn – who made headlines when she bought Bernie Madoff’s Upper East Side penthouse with her then-husband, toy mogul Al Kahn – has just purchased her own posh pad at swanky 1100 Park Ave., the Post has learned.

Kahn – whose ex-husband is the marketing genius behind such phenomenons as the Cabbage Patch dolls and Pokemon phenom –purchased the two bedroom, three bathroom co-op in the white glove pre-war 18-story building for $4 million, according to public record.

The elegant apartment boasts a giant terrace – a key selling point for Kahn.

Kahn also bought her own Hamptons mansion for around $4 million as well, sources tell the Post.

At the same time, Kahn is selling the Madoff penthouse for $17.25 million – far more than the $8 million she paid for it. The listing broker is Dolly Lenz.

“The economic climate is better now, and she has done a full renovation,” a source said.

That apartment – where Madoff spent years plotting his elaborate $65 billion Ponzi scheme — includes four fireplaces and was rumored to have its own secret room when the Madoffs lived there. It also has a gorgeous terrace.

At the time, Bernie Madoff was president of the co-op board.

The building, at 133 E. 64th St., also boasts a famous resident, celebrity journalist Matt Lauer – who, ironically, never knew he was living in the same building as one of the greatest criminal minds of two centuries, and one of his generation’s top stories, until Madoff’s arrest.