Vitamin B3 deficiency
The classic triad of diarrhea, dermatitis, and dementia (3 Ds) is characteristic of Pellagra, which is caused by Niacin (Vitamin B3) deficiency. A fourth D - death - can occur if left untreated. This condition is also associated with a photosensitive dermatitis.