For some people, solving Sudoku problems points to a certain level of geekiness.

But for a Prime Minister of a country to spend time to create a computer programe to automatically solve it - that is uber geeky cool.

And that is why Prime Minister Lee Hsien Loong shared his Sudoku solver programme online.

"To generate buzz, and send young people a clear message that tech is cool. Even if you have grey hair, you can still try be cool," he said, to rousing applause from his audience.

He was speaking at the official opening of the Singapore University of Technology and Design (SUTD) at Somapah Road on Friday evening.

Mr Lee said it has become more challenging to attract students and graduates to study and work in the science, technology, engineering and math (STEM) sectors, even as the country's education system has placed strong emphasis in these subjects.

This, he said, is due to industry trends, which have sent people looking for jobs in fields such as real estate, finance, law, and medicine.

Generational changes, too, have played a part.

"Students who have grown up in a more developed economy take science and technology more for granted, and pursue interests in other areas," said Mr Lee.

But Singapore will need strong STEM capabilities as it moves ahead into the next 50 years, he added.

"Building greener homes, connecting our waterways and parks, expanding our public transport networks, embarking on complex projects like the High Speed Rail link between Jurong East and Kuala Lumpur, all these require expertise and skills in engineering, technology, and design," said Mr Lee.

This means that there will be no lack of jobs, or challenges, for SUTD's graduates, he added.

The university is Singapore's fourth and focuses on engineering, technology and design. It was set up in collaboration with the Massachusetts Institute of Technology, and took in its first batch of students in 2012.

The university operated in an interim campus in Dover Road then but moved to its current location near Upper Changi Road earlier this year.

The varsity is now in its first phase of development, and takes up 15.8 hectares. It will eventually expand to be approximately 23 hectares.

With the university stands four traditional Chinese timbre structures - two antique houses, one pavilion, and one opera stage - from the Ming and Qing dynasty.

They were donated by Hong Kong movie star Jackie Chan, who graced Friday's opening ceremony too.