His peripatetic career as a number theorist, with him and his wife taking numerous types of work in the United States and abroad to support themselves during the Great Depression, fortuitously brought him into the center of research into early electronic computing.
During his studies at Berkeley, Lehmer met Emma Markovna Trotskaia, a Russian student of his father's, who had begun with work toward an engineering degree but had subsequently switched focus to mathematics, earning her B.A.
Lehmer became a National Research Fellow, allowing him to take positions at the California Institute of Technology from 1930 to 1931 and at Stanford University from 1931 to 1932.
After being awarded a second National Research Fellowship, the Lehmers moved on to Princeton, New Jersey between 1932 and 1934, where Dick spent a short time at the Institute for Advanced Study.
From 1945 to 1946, Lehmer served on the Computations Committee at Aberdeen Proving Grounds in Maryland, a group established as part of the Ballistics Research Laboratory to prepare the ENIAC for utilization following its completion at the University of Pennsylvania's Moore School of Electrical Engineering; the other Computations Committee members were Haskell Curry, Leland Cunningham, and Franz Alt.
The problem run during the 3-day Independence Day weekend of July 4, 1946, with John Mauchly serving as computer operator, ran around the clock without interruption or failure.
Upon his return to Berkeley, he made plans for building the California Digital Computer (CALDIC) with Paul Morton and Leland Cunningham.
The Lehmers also assisted Harry Vandiver with his work on Fermat's Last Theorem, using the Standards Western Automatic Computer to do many calculations involving Bernoulli numbers.
Moving the curtains aside revealed a very small blackboard, whereupon Lehmer said "Well, I guess we won't be doing any analytic number theory!"