The U.S. Treasury prevented Fannie Mae from selling nearly $3 billion in low-income housing tax credits Friday because it concluded the sale would be too expensive for taxpayers. Fannie had made a deal to sell about half its $5.2 billion in tax credits to Goldman Sachs and Berkshire Hathaway and had gotten the go-ahead from its federal regulator. Because Fannie doesn’t have taxable income to offset, the credits are worthless to the company, and every quarter it must write them down as they lose value. A day earlier, Fannie had announced $520 million in losses related to the credits in the third quarter, and that more were coming unless the credits were sold. But Treasury concluded that the government would lose more tax dollars than it saved if the sale went through.