A decades-long study reveals hidden clues about who stays sharp—and who may still face unexpected risks.