My sister lost her first baby at about the same time. They had a funeral and everything for him. He was so beautiful. She lost her next pregnancy too, it was twins and she was not large enough to carry them. They just sort of started falling out. This was 35-40 years ago so now they would be able to do more I believe but she was devastated.
The dad was a good ol' country boy and did not want to go through that again and she had a hard time getting him to want more children. They finally had a daughter that was full term. She went to the doc every week throughout the whole pregnancy. Every little blip was a crisis to her, who could blame her. She almost expected the baby to not be born and it was hard for her to get excited.
I think the best thing you can do, since you are not close, is to just be supportive of any decisions they make to get pregnant again, not get pregnant again, etc...they are going through the death of a child and won't be thinking clearly for some time.
Send them a nice card and if they have a service of any kind try to attend or at least treat it seriously like you would want if you lost a child.