They're called "magic squares," though no one really thinks they're magical. But for John Tzeng, who devises them and gives them out as gifts, the squares are a way of wishing Happy New Year.

Each square is made up of rows of numbers.No matter how you add them up - vertically, horizontally or diagonally - they come to the same total: 1977.

One square has three numbers of a side. The others have four, five, six, seven and nine. Tzeng said he hasn't yet figured out a square with eight numbers on a side totalling 1,977, but he's working on it.

Now a professor at D.C. Teachers College, Tzeng was born in China where magic squares were first devised about 4,000 years ago. In medieval Europe they were worn as good luck charms to ward off evil spirits or hung on houses to do the same thing. A print by Albrecht Durer in 1514 shows one of them being used, though not successfully. The print is entitled "Melancolia."

Benjamin Franklin worked out a series of magic squares for 1776, and Tzeng said he did the same thing last year for 1976. He also prepared magic circles, triangles, pyramids and cubes, each adding up to 1976 in dozens of ways. All of this numbered paraphernalia is in bright red, white and blue and decorates Tseng's living room in Takoma Park.

Tzeng said there are formulas for devising some of the simpler squares, but he said the harder ones can be done only by trial and error, sometimes requiring several days.

The trick, he said, is to get as many possible combinations of numbers adding up to the same sum. For instance, in the 4-by-4 squares, not only does every row, column, and diagonal add up to 1,977 but so do the four corner numbers, the four center numbers and any other group of four numbers that are either contiguously or symmetrically arranged. Overall, he said, there are more that 70 different combinations of numbers in the square that add up to 1,977.

Tzeng said he makes the magic squares because it's fun, and hopefully because they will make learning math more fun for children, including his son, Nigel, 11, who checks out his father's handiwork with a calculator.