from the beginning of a <i>zh&#257;ng</i> cycle: k=0 means the first year in the cycle, k=1 the second year, k=2 the third year, ..., k=18 the 19th (last) year. The value of J(k) is an indicator of whether or not the year has a leap month: J(k)=0 means no leap month, J(k)=1 means there is a leap month. The sequence 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1 appearing in J(k) shown in the table is exactly the 3-3-3-2-3-3-2 pattern. The value of R(k) is the total number of months from the first m