Nathaniel I. Grayson, a Silver Spring dentist who was convicted last week of contempt of court after he failed to produce records wanted by a Baltimore grand jury investigating him for Medicaid fraud, was sentenced to jail yesterday.

Baltimore Criminal Court Judge James W. Murphy said he was sure that Grayson had "intentionally failed" to turn over 42 sets of X-rays, patient charts and records that had been subpoenaed by the grand jury in June. He ordered the dentist, 40, to serve 89 days in the Baltimore city jail.

Grayson had argued at his trial last week that many of the records were lost in a burglary in June and attributed the absence of the rest to "sloppy bookkeeping and an incompetent clerical staff."

Assistant State's Attorney Stefan D. Cassella testified that the records the dentist did submit contained "deletions and obliterations" and that Grayson did not report that burglars had taken the records until the day before his trial was first scheduled in August.

Cassella said the case apparently marked the first in Maryland in which a defendant has gone to jail for failing to turn over documents to a grand jury, and that the investigation would continue.