The AIDS drug AZT can improve memory and attention and ease other mental problems that are frequent symptoms of AIDS, a study published Thursday in the New England Journal of Medicine shows. HIV, the AIDS virus, attacks the brain as well as the body's immune system. Mental lapses can be the first signs of the disease. The latest study, directed by Dr. Frederick A. Schmitt of the University of Kentucky Medical Center, confirms earlier reports showing that AZT can relieve these mental symptoms, at least in their first stages. The drug, also known as zidovudine and Retrovir, is the only medicine approved for AIDS treatment. While it does not cure AIDS, AZT relieves victims' physical symptoms and prolongs their lives.