President Trump says he’s a genius. Sometimes people even say it for him.

“You’re an F-ing genius,” someone wrote to him on Twitter in 2013. “I.Q. tests confirm!” Trump replied. In fact, he wrote this weekend, his lifetime of success in business, TV and politics “would qualify as not smart, but genius . . . and a very stable genius at that!”

He has been somewhat less enthusiastic about providing evidence of his intelligence.

Trump has repeatedly challenged people to IQ tests, but when someone once asked him to prove his own score, he simply replied: “The highest, a‑‑hole!” The Washington Post asked the White House whether it would share his IQ test results on Sunday, if there are any, but got no immediate reply.

So be it. There’s no law that a president has to document his intelligence. But if Trump doesn’t, he should know that someone might come along and try to measure it for him.

It has happened before.

In 2006, a psychologist at the University of California at Davis applied a statistical algorithm to reams of presidential biographies, surveys, polls and other historical sources, and concluded that the smartest man to have occupied the White House was our sixth president, John Quincy Adams.

With an estimated IQ between 165 and 175, Adams was a genius by any common definition of the term, according to the study. By comparison, most people score about 100. (A child with an IQ in the 160s was declared smarter than Albert Einstein and Stephen Hawking by international tabloids.)

There are, of course, many asterisks beside Adams’s big number. He never took an intelligence test, which Politico notes were not invented until the early 1900s, long after his death. And the definition and meaning of an IQ has evolved even since then.

But as psychologist Dean Keith Simonton wrote in his 2006 study, Adams was among eight U.S. presidents declared geniuses in a 1926 study by an early intelligence researcher named Catharine Cox. She had sifted through the biographies of hundreds of famous people and worked out a method to estimate IQs based on childhood and adolescent achievements.

It’s not hard to see how Adams would have impressed her. As the University of Virginia’s Miller Center writes, he was the son of John Adams, who also was bound for the White House. Young Adams considered himself his family’s protector while his father was helping to plan the Revolutionary War. He crossed the Atlantic at age 10, rode mules from Spain to Paris, and passed the bar exam in the new United States of America at 23.

Simonton took Cox’s IQ estimates for Adams and other early presidents, and cross-referenced them with biographical information about their modern-day successors. He used some clever statistical techniques to build an intelligence matrix for all the presidents up to George W. Bush — about whose intelligence he was most curious.

The psychologist claimed that his method was nonpartisan and extremely accurate, and the journal Political Psychology deemed it robust enough to publish in 2006.

The second-smartest president in the study, by average score, was Thomas Jefferson — of the Declaration of Independence fame — followed by John F. Kennedy, who inspired his country to go to the moon.

Bill Clinton was the No. 4 White House genius, with an estimated IQ range between 136 and 159. Simonton explained why:

“His demonstrated capacity for mastering impressive amounts of complex and detailed information, his verbal eloquence and fluency, and his logical adroitness and sophistication — at times, as during the Monica Lewinsky scandal, verging on sophistry — places Clinton head and shoulders above his successor in terms of intellectual power.”

We’ll come to that successor in a moment. Keep in mind that the study was published before Barack Obama or Donald Trump became president.

“Unfortunately, given all of the attention recently attached to the incumbent’s intelligence, nobody has tried to followup my 2006 study,” Simonton wrote to The Washington Post. But, he added, “there’s something very striking about the incumbent’s insistence that he is both very stable and extremely intelligent. It comes across as very defensive, like he’s discussing aspects of his person about which he feels vulnerable.”

Simonton noted that people tried to cram Trump into the top of his list during the 2016 presidential campaign, ranking him just below Adams in a meme that still proliferates:

That’s fake news, though. Snopes traced the meme to an article on a hoax site that claimed to have calculated Trump’s IQ of 156 based on his college acceptance standards. Among a host of “logical missteps and factual inaccuracies,” Snopes wrote, the article didn’t even name Trump’s freshman school correctly.

Trump does not appear to have ever specified his IQ. “If he’s actually taken an IQ test, then why not report the results?” Simonton wrote to The Post. “I think we can guess why.”

Like Hawking, Trump once seemed dismissive of the concept of IQs. He wrote in his autobiography, “The Art of the Deal”:

“You can take the smartest kid at Wharton, the one who gets straight As and has a 170 IQ,” Trump wrote with his co-author in 2009, “and if he doesn’t have the instincts, he’ll never be a successful entrepreneur.”

A few years later, Trump challenged his secretary of state to an IQ test. He has claimed on Twitter to test “much higher” than Obama, who Simonton said is “obviously far more intelligent,” or George W. Bush.

If the 2006 study is correct, beating Bush might not be much of an achievement.

“Ever since George W. Bush was elected to the presidency, questions have emerged about his general intelligence,” Simonton wrote, noting the president’s infamous tied tongue. Rest assured, the psychologist concluded, “Bush is definitely intelligent.”

But not as smart as nearly every other president.

With an estimated IQ between 111 and 139, Bush was fourth-lowest on the list. He ranked just above Warren G. Harding, James Monroe and the much-maligned Ulysses S. Grant, who came in dead last with an IQ no higher than 130.

It wasn’t that Bush was necessarily dumber, Simonton explained, but he scored particularly badly on one of his metrics: curiosity.

“Despite being the scion of an elite family with worldwide connections, Bush’s hobbies appear limited to not much more than running, fishing, and baseball,” the psychologist wrote, quoting from a news article. “It would seem that the younger Bush does not make the impression of having wide interests or of being especially artistic, curious, sophisticated, complicated, and insightful,” he added.

We note that Bush has since taken up painting. Maybe it’s time for a retest.

Read more Retropolis:

The ups and (mostly) downs of Trump Shuttle, the president’s long-defunct airline

The mother who made George Washington — and made him miserable

JFK’s last birthday: Gifts, champagne and wandering hands on the presidential yacht

Trump implied Frederick Douglass was alive. The abolitionist’s family offered a ‘history lesson.’

Like Trump, JFK was tested by white supremacists. Here’s what he finally did about it.