It's one of the most enduring musical mysteries: Lennon or McCartney?

The composition of many Beatles songs is attributed to Lennon-McCartney.

But that little hyphen can hide a lot.

Dalhousie University Prof. Jason Brown has used mathematics to untangle the authorship of disputed Beatles songs.

"They agreed on a lot of their songs. But on a few songs they disagreed," Brown said of the two British songwriting giants.

"And in particular they disagreed on In My Life, with Paul McCartney saying he wrote all the music and John saying, no, he wrote the music, and then later he said, 'Well, perhaps Paul helped a little bit in the middle 8.'"

John Lennon and Yoko Ono sing Give Peace a Chance during their Bed-In at a Montreal hotel in 1969. The Dalhousie researchers found, among other things, there's a high probability that Lennon wrote Do You Want to Know a Secret? (Yoko Ono/YouTube)

McCartney, shown performing on the Halifax Commons on July 11, 2009, tends to use vocal leaps of an octave or more in his songwriting — think 'all the lonely people, where do they all belong,' according to the Dalhousie researchers. (Andrew Vaughan/The Canadian Press)

But where memory failed, math has picked up the puzzle pieces.

Brown, Harvard University statistician Mark Glickman and Harvard student Ryan Song deconstructed about 70 Beatles songs on albums between 1963's Please Please Me and 1966's Revolver.

The researchers analyzed each Lennon or McCartney song — or sometimes even parts of songs — in five different ways, including the notes of the melodies, the transitions between those notes, the chords, the sequences of chords and the "contours" — whether consecutive notes rise, fall or stay the same.

Using the results from the songs with known authorship, they were able to analyze the patterns in the disputed songs to figure out who wrote the music.

'Controversial' findings

The results? There's only about a two per cent chance that Paul McCartney wrote In My Life.

"These findings would be controversial," Brown said. "Beatles fans tend to have favourites. There are people who are John people and people who are Paul people, there are George people and Ringo people.

"In My Life is a questionable song and it's a famous song. And people have strong feelings one way or the other, whether they're musicians or non-musicians, about the song."

Dalhousie Prof. Jason Brown used mathematics to untangle the authorship of disputed Beatles songs. (CBC)

The work by Brown and Glickman found that McCartney almost certainly wrote The Word. There's a high probability that Lennon wrote Do You Want to Know a Secret? — which was sung by Harrison — and the bridge in And I Love Her.

They also discovered some patterns that may not be apparent to the casual listener or even Beatlemaniacs.

McCartney, for instance, tends to use vocal leaps of an octave or more in his songwriting — think "all the lonely people, where do they all belong" — whereas Lennon uses a more narrow range. Lennon often alternates between the tonic and the 6 chord, while McCartney often goes between the tonic and the 4 chord.

"These are tiny little things that you might not recognize by listening to them," Brown said. "You don't want to go by what you just believe in your heart is the differences between the two."

Lifelong Beatles fan

Brown said his love of the Beatles began early in life.

"In my early teenage years, I used to play piano and I was the kind of student who would try to fool his teacher and practise only the half-hour before my lesson," he said.

Then he heard the Beatles.

"I threw away the piano and I began to teach myself guitar, and I practised eight, 10 hours a day."

Brown's love of the Beatles has endured and for him, understanding the math behind the music only makes it better.

"As a mathematician, I'm constantly exposed to brilliant mathematics. But as a musician, I'm constantly exposed to brilliant songwriting. And I appreciate it," he said.

"I think the more you analyze it, the deeper you get into the sophistication, the brilliance of the composers."

Read more articles at CBC Nova Scotia