Ray Kurzweil has a surrealist's eye for disorientation. The lobby of his offices outside Boston have the quality of a Dadaist art gallery: nothing is quite what it seems. Immediately inside the door is an old metal box that turns out to be a dictation machine built by Thomas Edison. An old man is sitting next to it, with a badge on his lapel that reads: "I'm an inventor". He is George, the receptionist tells me, and he is made of wax. A cabinet along the hall is covered entirely in boxes of vitamin pills, hundreds of them, from acai berry, red yeast rice and milk thistle to a very large jar marked "Anti-ageing multi-pack".

The sensation of strangeness intensifies inside Kurzweil's personal office. Several handwritten placards are stacked against the wall. "NO RIGHTS FOR BOTS!" says one. An oil painting of a white rabbit and a drawing of Jerry Garcia of the Grateful Dead are propped up against the desk, which is lined with dozens of volumes of the Tom Swift children's adventure series.

Then Kurzweil himself flurries into the room, half an hour late, looking flustered. He starts an instant banter with the photographer, informing him that the white rabbit is a representation of virtual reality and an allusion to the psychedelic song by Jefferson Airplane. The Tom Swift books, he adds, were his favourite reading when he was seven. It's all getting a little too weird, and the interview hasn't even begun yet.

Let's begin with the uncontested facts. Ray Kurzweil is an inventor of considerable repute, an expert on the information technology revolution and the future of artificial intelligence. As a young man he put together some of the earliest electronic keyboards and created a machine that can scan and read printed literature to blind people - the first customer was Stevie Wonder, who has become a lifelong friend. He boasts countless awards, is in the US inventors hall of fame, has written several New York Times bestsellers, and sits on the board of the Massachusetts Institute of Technology. He is the subject of a documentary, Transcendent Man, that will be released this year and is completing his own film, The Singularity is Near. And lest any doubt about his standing remains, Bill Gates regards him as the "best person I know at predicting the future of artificial intelligence".

To cap all that, a new university opening next month will be named after one of his key theories. Sponsored by Google, the Singularity University will be housed on the Silicon Valley campus of Nasa. It will bring together some of the biggest names in frontier disciplines such as bio- and nano-technology, neuroscience and artificial intelligence. The university will open its doors in July to 40 students paying $25,000 (£17,000) each for a nine-week course. Their challenge will be to come up with new ideas addressing some of the world's most pressing problems. On the agenda: climate change, world poverty and hunger.

Were the story of Ray Kurzweil to end at this point, we would be left with an impressive though not wildly out of the ordinary technology pioneer. But Kurzweil is anything but ordinary. Take what he tells me about the prospects for medical intervention.

With the completion of the human genome, he says, health and medicine have become a branch of information technology. "We have now the software of life - the code that underlines it. We have tools now to change the software. How often do you go without updating the software on your cellphone? Probably not more than a couple of weeks as it updates automatically. When was the last time you updated the software running in your body? It is out of date."

In the land of Kurzweil, the possibility of reprogramming the body is not a dry academic theory, it is a blueprint for how to lead your life.

That's why he has a cabinet covered in vitamin boxes, including those anti-ageing packs. He has turned himself into a living medical experiment with the hope - more than that, the expectation - that it will allow him to live far into the distant future and perhaps forever. Every day he takes about 150 supplements with the aim of reprogramming his biochemistry. Once a week he spends a day at a health clinic having particular compounds fed into him intravenously.

What on earth does he do that for? The answer is that though he turned 61 on Thursday, he believes that physically he is preserving himself to be much younger. "How old am I really? I've stayed around 40. I was 38 biologically when I was 40, and I'm 40 or 41 today. There is a biological ageing test and that's what it registers for me."

White rabbits, Grateful Dead, 61-year-olds with the biology of someone two decades their junior. Is now the time to terminate the interview and run screaming out of the office? He calmly insists that his pursuit of youth is quite logical.

"People ask me whether I think taking all these supplements will allow me to live hundreds of years. No. The point is only to stay in good shape another 15 years or so before we have developed the ability to reprogram our biology through nanotechnology using nanobots - blood-cell sized devices in our bloodstream that will keep us healthy."

Does he really want to live forever? Wouldn't the thrill of life start to fade after a few thousand years or so?

"If the future remained the same and no new ideas or experiences happened then ultimately we'd grow weary. But that is not the case. The future is going to be a very exciting place, and that's why I'd like to stick around to see it."

The burning sense of the future's potential has been with him since a very early age. He decided to be an inventor when he was five, he says. "My parents provided me with all these erector sets and construction toys, and I had the idea that if you put these parts together you could create transcendent effects. I didn't have that vocabulary, but I did have the feeling that you could do magical things and solve problems."

From the age of seven he began reading those Tom Swift books, devouring one after another. Each book, with titles like Tom Swift and His Airship and Tom Swift and His Wireless Message, has an identical plot: the world is faced with an existential crisis; Tom goes into the basement of his house and tinkers with some gadgets; Tom emerges with an invention that will save the day.

For Tom Swift read Ray Kurzweil. By the age of 13 he was designing software. While still a teenager he was setting up companies to exploit his ideas, and selling them for large sums. His urge to invent was insatiable, and it led him to an obsession with futurology.

It began mundanely. To maximise the profit from his inventions he started to study technology trends in an attempt to divine the best moment to launch any new product. In the process, he made what he considers an extraordinary discovery: that the trajectory of new technologies was astonishingly predictable.

More importantly, the graph they followed was not linear, as most people thought, but exponential. "Most people's expectation of the future is that the current pace will continue, despite the fact that the power of technology is doubling every year."

This was his eureka moment, and in his view it revolutionises everything. He uses the example of a person walking a certain distance. If the person takes 30 linear steps - 1, 2, 3, 4, 5 - they travel 30 units. But if those steps are exponential - 2, 4, 8, 16, 32 - they reach 1 billion.

So it is with technology. "When I was an undergraduate at MIT we shared one computer that took up a whole building. The cellphone in your pocket is a million times cheaper and a thousand times more powerful. That's a billion times the sales performance - and we'll do it again in the next 25 years."

This identification of the exponential growth in technological firepower, coupled with a fervent belief that there is no problem that cannot be solved through its application, is the key to Kurzweil. It unlocked his predictions of the coming of the internet, the fall of the Soviet Union partly as a result of the spread of communications, and the defeat of the world chess champion by a computer (he was a year out - in the 1980s he predicted 1998; Garry Kasparov lost to Deep Blue in 1997).

Exponential growth also lies at the heart of his aspirations for the new Singularity University. Through it he wants to pursue solar energy as a solution to climate change. "Right now about half a percent of the world's energy needs are from solar, so people say 'Oh, that's not a big deal'. But solar has doubled every two years - and it's only eight doublings away from 100%. In 20 years it could meet all the world's energy needs."

Similarly, Kurzweil detects in the explosion of cellphone use across Africa the opportunity to combat illness and hunger. He wants to design software that could be downloaded on to all African cellphones that would easily diagnose and provide remedial directions for leading local diseases.

Listening to Kurzweil's high-velocity monologue, it's almost shocking how optimistic he is. After the 20th century's disasters with centralised planning, and this century's disasters involving terrorism and the black hole of the financial system, it's not fashionable to talk about the inevitable march of progress.

But Kurzweil is unwavering. "People very often don't realise how far we've come. Think of the improvements that we've seen: human life expectancy was 37 in 1800, 48 in 1900 ..." And in 2035?

His prediction in that regard is that by 2029 computers will be able to pass the Turing test - that is, pass themselves off as human in conversation. Soon after that the "singularity" will have been reached, the point at which artificial intelligence will so far exceed the human brain that ordinary mortals will no longer be able to keep up.

By 2035 the human brain and computers will begin to merge - literally. Those nanobots will be used to vastly extend the reach of human intelligence. They will allow us to control all our senses by computer and enter a full virtual reality in which we could become other people. (Ray tells me that since the age of eight his fantasy has been to become a female rock singer called Ramona.)

Kurzweil predicts looming human protests against the granting of legal rights to human-computer mergers, which explains the "NO RIGHTS FOR BOTS!" placard in his office: it was a prop used in his forthcoming film.

The problem with the more outlandish side of his thinking is that it has earned him a reputation for crankiness that in turn casts a shadow over his genuinely important work. As one critic put it: "It's as if you took a lot of very good food and some dog excrement and blended it all up so that you can't possibly figure out what's good or bad."

Surely he resents such comments, and the damage to his overall standing?

"I'm not uncomfortable with the controversy," he replies. "It's part of the process new ideas have to go through."

I leave Kurzweil's cluttered office carrying enough food for thought to last me, oh, at least a couple of hundred years. Is it time to start popping those pills?

On the plane back to New York I open one of his books and read the inscription he has written inside. "To Ed, to a (very) long and healthy life. Ray."

The eureka moments

1963 Aged 15, Kurzweil wrote his first computer program to help alleviate boredom. It was picked up by IBM

1965 Developed a program that wrote music in the style of famous composers

1974-6 Designed the first computer program that could understand letter shapes in any font, wrote a program that converted scanned text into synthesised speech, and then combined the two inventions to create the Kurzweil reading machine. This "read" printed text aloud through a voice synthesiser, for the use of blind people. First customer: Stevie Wonder. The machine was as big as a table; now it fits in the pocket

1984 Perfected the electronic keyboard. Used sampling of the sounds of instruments to produce rich authentic reproductions of the entire orchestra. His Kurzweil K250 is used by Keith Emerson, Herbie Hancock, Eric Clapton and others

1987 Invented a program that does the reverse of his reading machine - converting a person's spoken voice into type