But even with six full-time staff members, he feels Stuyvesant takes his program less seriously than subjects with their own departments. “We’re just considered math teachers by the school and city,” he said. “All of this could go away at the whim of the principal.”

So in 2010, he decided that if he could not have his own department, he would have his own school.

He envisioned an elite institution with roughly 300 students per grade, all of whom would be admitted after demonstrating math proficiency. Computer science would be a standard part of the curriculum. Initially, he received encouraging feedback from the Board of Education, he said, but his proposal was rejected after the first application round.

Everything changed, however, after Fred Wilson came calling.

Mr. Wilson, 51, is a founder of Union Square Ventures, one of the bigger players in New York’s growing technology start-up scene, and had invested in some of the companies where Mr. Zamansky’s graduates now work. He learned about Mr. Zamansky’s proposal after his own son experienced frustration trying to learn to write computer code in middle school.

The two agreed that the public schools needed to become incubators for tech talent. “I was really impressed by what Mike was doing,” Mr. Wilson remembered. “He had lots of alums who’d gone onto Carnegie Mellon and M.I.T. and Stanford, and had come back to the city because they were born and raised here. And I thought: that’s amazing, that’s what we want to happen.”

Mr. Wilson went back to the Department of Education with Mr. Zamansky’s proposal, but this time with a significant sweetener: he promised to cover the one-time costs of starting a new school. Space was available in Washington Irving High School in Gramercy, near the city’s tech corridor. But the budget for hiring staff, a principal and designing a new curriculum was considerable.

This time, the project was approved.

A flurry of meetings followed. The city advocated for a small school of about 100 students per class whose electives would focus almost solely on computer science. They also wanted the school to be unscreened — meaning no entrance examinations.