Suppose that m≡1mod4 is a prime and that n≡3mod4 is a primitive root modulo m. In this paper we obtain a relation between the class number of the imaginary quadratic field \Q(−nm) and the digits of the base n expansion of 1/m. Secondly, if m≡3mod4, we study some convoluted sums involving the base n digits of 1/m and arrive at certain congruence relations involving the class number of \Q(−m) modulo certain primes p which properly divide n+1.