Find number of times in a year when a date occurs on a specified weekday. Is there a mathematical way to find how many days in a week have a certain numbered day? 
For example, if we wanted to find the times the $13$th fell in the year $1900$, then by looking at a calendar, we can see that it fell once of Sun, Mon, and Wed. Twice on Sat, Thurs, Fri. And, thrice on Tue. Is there a mathematical way to tell how many times a certain day falls on which day, given the year?
 A: Yes, there are algorithms to find the number of times a date falls an a specified weekday on any given year, but they are usually a little gnarly. Not hard, just a lot of steps. The many steps come from having to account for months having different numbers of days, and leap years, etc. 
Let's denote the weekdays "Sun, Mon, Tue,..., Sat" by the numbers $0,1,2,...,6$ respectively.
First notice that if the date $13$, falls on some weekday $d$ in January, then the next month (February) it will fall on the weekday $d+31 \equiv d+3\mod 7$. In March it would fall on $d+31+28\equiv d+3\mod 7$ (assuming we're not in a leap year). In April, $d+31+28+31=d+6\mod 7$ and so on. Here is the complete list of what you add to your weekday for each month in order:
$$ 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 $$
And in case you are dealing with a leap year, then add $1$ to the months after February. The list becomes: 
$$ 0, 3, 4, 0, 2, 5, 0, 3, 6, 1, 4, 6 $$   
These are the two patters for every possible year. So if we take your case of $1900$, which is not a leap year, and if we know that January 13th is a Saturday $= 6$. Then we just add $6$ to each of the numbers in our non-leap-year list and keep the result modulo $7$, which gives: 
$$ 6, 2, 2,5,0,3,5,1,4,6,2,4$$
Interpreting the result gives that the date $13$ falls on a Saturday Jan and Oct, on a Tuesday in Feb, Mar and Nov, and so on. 

Here is the general pattern: Let $Y$ denotes the year. If the date $d$ occurs on weekday $w$ in January, then the following tables hold:
  $$\begin{array}{c|c|c}
&\text{Y is not leap year} & \text{Y is leap year} \\\hline
d \text{ occurs on }w & 2 \text{ times} & 3 \text{ times} \\\hline
d \text{ occurs on }w+1 & 1 \text{ time} & 1 \text{ time} \\\hline
d \text{ occurs on }w+2 & 1 \text{ time} & 1 \text{ time} \\\hline
d \text{ occurs on }w+3 & 3 \text{ times} & 2 \text{ times} \\\hline
d \text{ occurs on }w+4 & 1 \text{ time} & 2 \text{ times} \\\hline
d \text{ occurs on }w+5 & 2 \text{ times} & 1 \text{ time} \\\hline
d \text{ occurs on }w+6 & 2 \text{ times} & 2 \text{ times} \\\hline
\end{array}$$

The only thing we are missing in the general case is that we need to know what the weekday $w$ of $d$ is in January of year $Y$. We can find that by using the Doomsday Rule developed by John Conway. Here is a summary of how it works for finding the weekday $w$ of January $d$, of year $Y$:


*

*If the first two digits of the year is $18$, $19$, $20$, or $21$, then set $a=2$, $a=0$, $a=6$, or $a=4$ respectively.

*Let $y$ denote the second pair of digits in the year. Define $k:=y+\lfloor \frac{y}{4}\rfloor$.

*Set $l=0$. If [$4$ divides $Y$ and $100$ does not divide $Y$] or [$400$ divides $Y$], then $Y$ is a leap year, and we set $l=-1$. 

*Now $w = a+k+d+l\mod 7$ gives the weekday of January $d$th.


Example: Take your case with year $1900$ and date $13$. The first two digits in the year are $19$, so we set $a=0$. The second two digits are $00$ or equivalently $0$, so $k=0+\lfloor \frac{0}{4}\rfloor=0$. Now in step three $l=0$ since neither condition is satisfied [$1900$ is divisible by $4$ and $100$] and  [$1900$ is not divisible by $400$]. So finally we get that $w=a+k+d+l= 0+0+13+0=6\mod 7$. Thus Jan $13$th $1900$ is a Saturday. Now we can read from the table that in $1900$ the $13$th is a 
$$ \begin{array}{c} 
\text{Saturday } 2 \text{ times}\\
\text{Sunday } 1 \text{ times}\\
\text{Monday } 1 \text{ times}\\
\text{Tuesday } 3 \text{ times}\\
\text{Wednesday } 1 \text{ times}\\
\text{Thursday } 2 \text{ times}\\
\text{Friday } 2 \text{ times}\\
\end{array}
$$  
Note that this method only works for dates up to 28. The dates 29, 30, 31 require some tweaking of the algorithm. 
