A NYT article Taking Early Retirement May Retire Memory, Too reports on a study by two economists that shows that in countries where people work longer people have sharper memories. See the graph.
While the study is not conclusive it does point to an interesting result. If causation is established rather than just correlation it would be important to know what aspect of work is producing cognitive longevity. A quote from the article:
"If work does help maintain cognitive functioning, it will be important to find out what aspect of work is doing that, Dr. Suzman said. “Is it the social engagement and interaction or the cognitive component of work, or is it the aerobic component of work?” he asked. “Or is it the absence of what happens when you retire, which could be increased TV watching?”