The high-bracket investors put up $37,500 and got a $150,000 tax deduction. The high-risk wildcat oil companies put up relatively little and got millions of dollars in loans to drill new wells. The high-flying bank got to pad its growing loan portfolio with loans that were to pay three points or more above the prime rate.

The drilling partnerships seemed almost too good to be true. And many of them were.

A series of such multi-million-dollar tax shelter deals that went sour this spring helped propel the Penn Square National Bank here into insolvency July 5.

The speculative gas and oil drilling partnerships--like those that Attorney General William French Smith invested in elsewhere--are a telling feature of the bank's collapse. The potential rewards for wealthy investors were great, typically promising tax deductions of more than $100,000 in return for an investment of one-quarter that amount. But the risks were equally great, events would show.

Many of the investments were in drilling ventures run by Longhorn Oil and Gas Co., a company specializing in tax shelters whose head, Carl P. Swan, was a Penn Square director.

In a typical deal, the investors purchased "limited" partnerships in a new well for $150,000, but only had to put up $37,500 in cash. For the rest, investors signed "letters of credit," under which their home banks promised to pay the remaining $112,500 to Penn Square if required. Longhorn then used the letters of credit as collateral to obtain loans from Penn Square to finance drilling operations. In effect, the letters were signed checks, waiting to be cashed.

Investors deducted the entire $150,000, contending that they were "at risk" for the full amount if the the drilling produced dry holes and Penn Square had to call on the letters of credit to cover the loan.

If the drilling ventures succeeded, however, the newly discovered oil or gas would become collateral for the loans and the letters of credit would never be used.

According to interviews with oil industry experts here, and testimony in some 100 lawsuits brought by angry investors around the country, it has become clear that Penn Square's aggressive management had pushed the bank into a large number of shelter schemes that could not pay back the millions loaned by the bank.

Oklahoma City sources charge that, when the drilling ventures did find oil and gas, Penn Square frequently relied on exaggerated estimates of the value of the new reserves provided by cooperative engineers rather than seeking independent appraisals.

For this and other reasons, including the slump in petroleum prices and the steady rise in interest rates, the successful drilling ventures Penn Square had financed weren't enough to make up for the failures, say sources familiar with the bank's failure.

Beginning this year, Penn Square began attempting to collect on the letters of credit. And in several parts of the country, investors went to court to block their banks from paying, charging fraud and arguing that they had been assured by Longhorn and by Bill T. Jennings, chairman of Penn Square, that their letters of credit would never be called--even though their sizable tax deductions had been based on accepting that risk.

Penn Square's inability to collect on those letters of credit is one of the reasons it failed, although it is not clear how much the bank lost this year in these transactions.

One lawyer representing investors in partnerships formed by Swan said Penn Square attempted unsuccessfully to collect $20 million in letters of credit this May, but bank officers and directors have declined to discuss Penn Square's business since the failure.

Letters of credit began to appear as key ingredients in tax shelters following the 1976 federal tax law revisions enacted by Congress to restrict the use of oil and gas drilling shelters. In 1976 Congress limited the size of a shelter deduction to the amount of money an investor risked. With the old shelter approach limited by Congress, accountants and tax lawyers turned to the use of letters of credit to boost the size of deductions and continue to minimize the investor's cash outlay, banking officials say.

Because investors take the risk that the letters of credit will be called, lawyers argue that investors are entitled to deduct $4 from their taxes for each $1 in cash they put up.

Last spring it was disclosed that Attorney General Smith had invested $16,500 in 1981 in a drilling partnership (unrelated to Penn Square) and had signed a letter of credit for $49,500, taking a $66,000 deduction for last year.

Lawyers who have established these partnerships say that these kinds of tax deductions could be found to violate tax regulations and are almost certain to be audited.