This Tuesday New York City elects a new mayor. A week later, the city makes its first attempt to borrow money on its own in the public credit markets since the fiscal crisis erupted more than two and one-half years ago and shut the city out of the debt markets.

Edward I. Koch, the Democratic candidate in this overwhelmingly Democratic city, is well ahead in the polls and already is considered the presumptive mayor by many.

There is somewhat less certainty on the outcome of the city's note offering. It will in effect be a ginger testing of the waters to see how investors have reacted to the last two years of retrenchment, cutbacks, accounting reforms and debt restructuring that were accomplished by New York City under the constant threat of bankruptcy.

A successful note offering will go some small distance to bolster the city's financial soundness, which still hangs by a slender threat, and it also will give a sign of whether the city can start to shed the combination of multi-billion-dollar federal loans, city employee persion fund investments and state financial aid that has permitted New York to remain solvent in the interim.

Even the most optimistic observers say it will be a number of years before New York City can handle all of its own financing needs.

"Despite a significant record of achievement by the city that many would have not expected three years ago, the hoped-for result of the city's ability on July 1, 1978, to meet all of its credit needs - though these are much reduced, disciplined and limited - on its own is a goal that will not be realized," said city controller Harrison J. Goldin.

With a number of credit problems and uncertainties still to be resolved, Goldin estimates that it probably will take three more years to reach self-sufficiency with the city able to borrow more in successive stages.

But a well-received initial debt offering could make that date sooner, rather than later, and also could smooth the way for extending a scaled-down version of the federal seasonal loan program to New York City which is scheduled to expire next June 30.

To insure a successful investor reception, the offering of revenue anticipation notes on Nov. 15 has been studded with safe-guards that make the notes virtually risk free. The New York State legislature recently passed a bill that lets the city segregate the state education funds which will repay the notes when they come in a special escrow account.

Furthermore, the notes are scheduled to mature before next June 30, the end of the current fiscal year during which New York City is operating on a technically balanced budget - the first balanced budget in many years. The Federal Seasonal Loan Program still will be in effect. And the state's monitoring agency, the Emergency Financial Control Board, still will be watching over the city's finances. The board is scheduled to go out of business at the end of 1978.

And in a step toward full disclosure of where the city currently stands, the offering will be accompanied by a prospectus of more than 200 pages which tells most investors probably more than they want to know about the intricacies of the city's financial structure and the socioeconomic profile of the city - a far cry from the casual disclosures this city made the last time it raised money in the public markets.

The amount of the offering has yet to be decided but it will range betwen $300 million and $500 million, according to market conditions. While few doubt the city will be able to sell the notes, the litmus will be how much of a risk premium investors exact in the interest rate the city will have to pay.

When Ed Koch of whoever else might win this week's election takes over as mayor on Jan. 1, he will be presiding over a city that is financially more stable than four years ago. For example, $6 billion in short-term debt that had to be constantly rolled over has been completely replaced by long-term financing.

The city has been able to hew to its three-year financial plan to reduce a cumulative $1 billion deficit by June 30, 1978. And it was even able to contend with the unexpected requirement to pay off $1 billion in notes that had been subjected to a repayment moratorium but which was found to be unconstitutional.

The city this week, in fact, had to go to court to set a cutoff date for investors to turn in moratorium notes for repayment. It seems investors have been handing onto the once despised moratorium notes, enjoying the 6 per cent tax free-interest they pay.

However, the first year in office for the new Mayor may prove to be as arduous as the turbulent years presided over by beleaguered outgoing Mayor Abraham Beame.

A recent report by Deputy State Controller Sidney Schwartz, who is one of the city's many fiscal monitors, projects a budget deficit for fiscal 1979 of $468 million. And that is before making provisions for any possible wage increases for city employees, most of whose contracts expire early next year after three years of minimal wage gains.

For the next three fiscal years, the report puts the potential city deficit at $1.7 billion, making the magnitude of the next mayor's cost-cutting job about as large as took place over the last three years.

Pent-up wage demands by city employees are expected to lead to a major confrontation early in 1978, especially if Koch is the mayor since he has run a hard-line campaign on cost-cutting that was widely perceived as aimed directly at the unions. And union leaders have indicated they will go for catch up increases.

The new mayor also will have to seek an extension of the federal government loan program. President Carter has indicated his support for an extension, but supposedly has done nothing to prod Congress to move on this question so far.

Senate Banking Committee Chairman William Proxmire (D-Wisc.) will hold oversight hearings in mid-December on the New York City situation. The hearings will look at how New York City's financing went and what its future prospects are in the credit markets. In addition, the looming deficits for the coming fiscal years also will be examined. And the question of an extension of the federal loans, now set at $2.3 billion annually with repayment reqired each year, also is expected to come up.

Proxmire said he was reserving judgment on whether New York City should get further federal assistance but expressed pessimism about the attitude of Congress as a whole, noting the last program got through only narrowly after President Ford reluctantly backed the legislation and was able to swing Republican votes behind it.

"Carter won't bring many Republicans with him." Proxmire predicted, "I wouldn't be surprised if Congress just says no and would rather face the prospect of a New York City default. There is nothing assured about getting the votes for New York. After all, it will be an election year, and it's not the most popular argument you can make."

Tied into the question of the federal loan extension is what will replace the state's emergency financial control board when it expires at the end of next year. The EFCB has been able to backstop the city government in making politically unpopular cutbacks over the last two years, and most observers believe it is essential that there be some kind of similar independent watchdog agency to keep the city on the road to recovery and to reassure potential investors in city paper.

However, the argument over an outside monitor is extremely sensitive because it goes to the heart of the political sovereignty, power and independence of the next city government, and the debate is sure to be intense as to what form this independent agency should take.