## A certain character twisted average value of the digits of rational numbers and the class numbers of imaginary quadratic fields

### Volume 208 / 2023

Acta Arithmetica 208 (2023), 215-233
MSC: Primary 11A63; Secondary 11R29.
DOI: 10.4064/aa220114-28-5
Published online: 21 August 2023

#### Abstract

We give a closed formula for a certain character twisted average value of the digits of the base $g$ expansion of $a/m$ ($2\leq m\in \mathbb N$, $a \in \mathbb N$, $1\leq a \lt m$, $(a,m)=1$). The closed formula involves the first generalized Bernoulli numbers, and we can apply it to the class number of any imaginary quadratic field. In particular, Girstmair’s formula about the class number of $\mathbb Q(\sqrt{-p})$ with a prime $p\equiv 3$ (mod 4) is generalized to the case $p\equiv 1$ (mod 4).