While attention has doubled back onto the late singer-songwriter Harry Nilsson thanks to the integral use of his 1971 tune “Gotta Get Up” in the Netflix hit “Russian Doll,” his knack for getting inside your head and capturing the zeitgeist with his music has been happening for more than half a century. In 1967, he created a sort of Russian doll of his own, embedding multiple Beatles song within a single song.

Exquisitely arranged by virtue of Nilsson’s melodic and vocal brilliance, his 1967 recording of “You Can’t Do That” isn’t the straight cover song that the title suggests, but rather squeezes somewhere between 15 and 20 already-classic Beatles songs into a single, melodic consumable whole, while somehow clocking in at less than two and a half minutes. More than a medley and well beyond a megamix, this customized counterpoint homage must be considered the first great original mash-up.

He even captured the attentions of John Lennon and Paul McCartney, and since then the Beatles always have figured prominently in the Nilsson story. The relationship continues: Nilsson’s eldest son Zak, who has recently been diagnosed with cancer, received well wishes and a message of strength from none other than Sir Paul McCartney.

A gifted recording artist who first came to prominence in the latter 1960s and died in 1994, Nilsson had musical abilities that set him apart, including a mesmerizing singing voice with a wide expressive range and a brilliance for both harmony and composition. Combining those with a progressive knack for overdubbing his vocals in the studio, Nilsson came out blazing as a remarkable one-man band. Early on he worked with producer Phil Spector, saw his songs recorded by the Monkees and put out his first solo album on a small label. By 1967, he was poised for success, signing a $50,000 deal with RCA Records.

His RCA debut “Pandemonium Shadow Show” was auspicious, but what really put Nilsson on the map was an unexpected endorsement from the Beatles. That first album contained a mix of original songs and cover tunes including remakes of two Beatles tracks, the more straightforward “She’s Leaving Home” and the anything-but-linear “You Can’t Do That.” Beatles publicist and consummate tastemaker Derek Taylor said that he fell in love with the record while visiting America, and bought a box of “Pandemonium Shadow Show” LPs to distribute amongst industry hipsters, including his friends and employers, the Beatles.

Lennon and McCartney simply adored the album. When the Beatles held a press conference announcing the formation of their business entity Apple Corps, someone asked Lennon to name his favorite American artist and he replied, “Nilsson.” When McCartney was pressed to name his favorite American group, he also said, “Nilsson.” Lennon even called Harry after binge listening to “Pandemonium Shadow Show” for 36 hours.The next day, McCartney called him, too. It wasn’t long before Nilsson made a pilgrimage to London where he was welcomed into the Beatles’ inner circle.

Showcasing a splendid multi-tracked vocal performance on “She’s Leaving Home,” “Pandemonium Shadow Show” revealed Nilsson to be a concise master of musical form rivaling Messrs. Lennon and McCartney. Interestingly, his remake was recorded just ten days after the release of the “Sgt. Pepper’s Lonely Hearts Club Band” album that contained the original tune. As impressive as that may be, it’s his prescient rendition of “You Can’t Do That” that still stands out today.

As Nilsson once told it, his concept occurred in a flash of inspiration, “One time I was just toying with my guitar. I struck this chord and it seemed to lend itself to a million different songs. I noticed how many Beatles songs could be played on this one chord, so I run down to Wallach’s Music City on Sunset, at about midnight, just before it closed, bought the Beatles songbook, and finished the song that night.”

So then, how many Beatles songs can you count in your head while listening to Nilsson’s multilayered mash-up? Let us know in the comments section. We can’t get past 11 or 12 without losing track — some of them repeat, which gets confusing — and even diehard fans still argue online about which number in the high teens is the real figure.

Nilsson’s sonic milestone on “You Can’t Do That” wasn’t an isolated incident. His next RCA album, “Aerial Ballet,” included a version of the Fred Neil tune “Everybody’s Talkin’,” which became a Grammy-winning hit after being featured on the soundtrack of the landmark film “Midnight Cowboy.” After the success of “Everybody’s Talkin’,” there was renewed interest in Nilsson, so his first two RCA albums were revived together in odd fashion — selectively combined with Harry providing new studio tweaks, overdubs, adjustments and re-recording of some vocals — making the end product, “Aerial Pandemonium Ballet,” rock’s first actual remix album.

As time passed Nilsson’s life stayed linked to the Beatles, and he even bought a place near the London Apple office. It was at this home where Mama Cass Elliot was staying when she died, and four years later, drummer Keith Moon of the Who died in the very same room. Ultimately, Nilsson sold off the house to the Who’s Pete Townshend.

Nilsson reached peak popularity in the 1970s with albums like “Nilsson Schmilsson” and his classic cartoon/storytelling-soundtrack “The Point.” He even made a record with Lennon as his producer in 1974, an uneven affair entitled “Pussy Cats.” Those were drunken times for the two men and they had some notorious escapades in Los Angeles, actually getting thrown out of the Troubadour nightclub for heckling the Smothers Brothers. But the pair stayed close, and after John Lennon was shot and killed, Harry Nilsson was never the same. He devoted time and energy to supporting the Coalition to Stop Gun Violence and remained outspoken on the subject. Fittingly, his last-ever concert appearance was in 1992 when he joined Ringo Starr & His All-Starr Band onstage at Caesars Palace in Las Vegas.

Who says you can’t do that? Clearly not the Beatles themselves, whose mutual love affair with the singer-songwriter remains an integral part of the Harry Nilsson story.

“I got this letter from Paul McCartney the other day,” Zac Nilsson wrote in February.” He heard I had cancer and sent me this note. I was very touched that Harry’s friendship meant this much to Paul,” Zak said. He reprinted McCartney’s note, which wished Nilsson’s son the “very best of luck with your (chemo) treatment. My wife, Nancy, went through it years ago and stuck with it even though she hated it. She is now better and well, except for the fact she is married to me!!” And, he inevitably noted, “I was very privileged to know your Dad, whom I knew as a lovely guy and a great talent.”