Acting on a tip from a teen-age boy, Montgomery County police have arrested two other county teen-agers and accused them of painting a number of large black swastikas on the roof, door and sidewalk of the Gaithersburg Hebrew Congregation synagogue last July, according to police.

Assistant County Attorney Joanne Robertson said the county is considering filing the first civil suit for restitution under Montgomery's 1982 Anti-Hate Violence Act against the parents of the two 15-year-old boys who were arrested on Monday.

The law, which also established a $50,000 tipster fund to help fight a rash of religious and racial hate acts, allows the county to sue for restitution for victims and for replenishment of the reward fund.

Officials of the synagogue at 9915 Appleridge Rd. were unavailable for comment yesterday. But Sally Greenberg, assistant director of the Anti-Defamation League of B'nai B'rith's Washington area office, said, "Anything that can be done to make people more aware and force parents to be more responsive to the malicious acts of their children will benefit the whole community."

Montgomery has almost 87,000 Jewish residents, according to a recent study, about 14.5 percent of its total population. Acts of religious and racial hatred increased between 1983 and 1984, according to the Montgomery County Human Relations Commission and the Anti-Defamation League. The commission said 151 such incidents were reported in the county in 1984, compared with 145 in 1983. The League reported a 49 percent increase in such vandalism and violence between 1983 and 1984 in Maryland.

The boys, who were released to their parents' custody, told police they did not know that swastikas symbolize hatred of Jewish people, according to police spokesman Harry Geehreng. "You'd think kids 14 or 15 would know about the Holocaust and the Nazis but they said they did not. It's strange that they'd choose to put swastikas on a Jewish synagogue and not know what it meant," Geehreng said.

Because the boys are juveniles, their names are not being released. The tipster, who will be offered $1,000 from the county fund and another $1,000 contributed by the Independence Lodge B'nai B'rith No. 1776, will also remain anonymous.