3
$\begingroup$

Three Friday the $13$ths with digits (in yyyy-mm-dd) adding up to $13$ include 2006-01-13, 2006-10-13, and 2011-05-13.

So, how many such Friday the $13$ths (in the Gregorian calendar) are there from 1583-05-13 to 9999-08-13?

Case-by-case analysis

For January and October (equivalent in a non-leap year), the digits of the year must add up to $8$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $8$ is $\binom{8+4-1}{4-1}=\binom{11}{3}=165$.

For February and November (equivalent in a non-leap year), the digits of the year must add up to $7$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $7$ is $\binom{7+4-1}{4-1}=\binom{10}{3}=120$.

For March and December (which never start on the same day of the week), the digits of the year must add up to $6$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $6$ is $\binom{6+4-1}{4-1}=\binom{9}{3}=84$.

For April, the digits of the year must add up to $5$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $5$ is $\binom{5+4-1}{4-1}=\binom{8}{3}=56$.

For May, the digits of the year must add up to $4$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $4$ is $\binom{4+4-1}{4-1}=\binom{7}{3}=35$.

For June, the digits of the year must add up to $3$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $3$ is $\binom{3+4-1}{4-1}=\binom{6}{3}=20$.

For July, the digits of the year must add up to $2$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $2$ is $\binom{2+4-1}{4-1}=\binom{5}{3}=10$.

For August, the digits of the year must add up to $1$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $1$ is $\binom{1+4-1}{4-1}=\binom{4}{3}=4$.

For September, the digits of the year must add up to $0$. By the stars and bars method, the number of $4$-tuples of nonnegative integers adding up to $0$ is $\binom{0+4-1}{4-1}=\binom{3}{3}=1$.

Resulting years

Let's start with the simplest case first, namely September. The only resulting year would be $0000$, which would correspond to $1$ BC and be outside of the range.

Next, consider August. The resulting years are $0001$, $0010$, $0100$, and $1000$, all of which are outside of the range.

For July, the resulting years are $0002$, $0020$, $0200$, $2000$, $0011$, $0101$, $1001$, $0110$, $1010$, and $1100$. The only year within the $1583-9999$ range is $2000$, which did not have an F13 in July.

For June, the unordered sequence of nonzero digits could be $3$, $12$, or $111$. For the $3$ case, the only resulting year within the range is $3000$, which will have an F13 in June. For the $12$ case, the first digit must be a $2$, so the resulting years would be $2001$, $2010$, and $2100$, none of which have an F13 in June. Finally, for the $111$ case, all of the resulting years would be outside of the range.

For May, the unordered sequence of nonzero digits could be $4$, $13$, $22$, $112$, or $1111$. For the $4$ case, the only resulting year within the range is $4000$, which will not have an F13 in May (unless it becomes a non-leap year despite being divisible by $400$). For the $13$ case, the first digit must be a $3$, so the resulting years would be $3001$, $3010$, and $3100$, none of which have an F13 in May. For the $22$ case, the resulting years within the range are $2002$, $2020$, and $2200$, none of which have an F13 in May. For the $112$ case, the resulting years within the range are $2011$, $2101$, and $2110$, of which the first two ($2011$ and $2101$) have F13s in May. Finally, the $1111$ case is outside of the range.

So far, 3000-06-13, 2011-05-13, and 2101-05-13 were found. Let's keep going.

For April, the unordered sequence of nonzero digits could be $5$, $14$, $23$, $113$, $122$, or $1112$. For the $5$ case, the only resulting year within the range is $5000$, which will not have an F13 in April. For the $14$ case, the first digit must be a $4$, so the resulting years would be $4001$, $4010$, and $4100$, of which only $4001$ has an F13 in April. For the $23$ case, the resulting years within the range are $2003$, $2030$, $2300$, $3002$, $3020$, and $3200$, of which only $2300$ has an F13 in April. For the $113$ case, the resulting years within the range are $3011$, $3101$, and $3110$, none of which have F13s in April. For the $122$ case, the resulting years within the range are $2012$, $2021$, $2102$, $2120$, $2201$, and $2210$, of which only $2012$ and $2210$ have F13s in April. Finally, the only resulting year for the $1112$ case within the range is $2111$, which will not have an F13 in April.

All the single month cases have been considered at this point, resulting only in 3000-06-13, 2011-05-13, 2101-05-13, 4001-04-13, 2300-04-13, 2012-04-13, and 2210-04-13.

For the other months, the number of cases to consider gets larger very quickly.

For January, the resulting F13 years are $2006$, $2051$, $2141$, $2204$, $3032$, $3122$, $3212$, $3302$, $4040$, $4130$, and $5111$.

For February, the resulting F13 years are $2032$, $2122$, $2320$, $3103$, $4111$, and $4201$.

For March, the resulting F13 years are $3012$, $4020$, and $5001$.

For October, the resulting F13 years are $2006$, $2051$, $2141$, $3122$, $3302$, $4130$, $4220$, $4400$, $5111$, and $8000$.

For November, the resulting F13 years are $2122$, $2212$, $3040$, $3103$, $3220$, $4111$, and $4201$.

For December, the resulting F13 years are $2013$, $2211$, $2301$, and $4002$.

So, here are all such F13s (sorted by month then year):

  • January 13, 2006 (2006-01-13)
  • January 13, 2051 (2051-01-13)
  • January 13, 2141 (2141-01-13)
  • January 13, 2204 (2204-01-13)
  • January 13, 3032 (3032-01-13)
  • January 13, 3122 (3122-01-13)
  • January 13, 3212 (3212-01-13)
  • January 13, 3302 (3302-01-13)
  • January 13, 4040 (4040-01-13)
  • January 13, 4130 (4130-01-13)
  • January 13, 5111 (5111-01-13)
  • February 13, 2032 (2032-02-13)
  • February 13, 2122 (2122-02-13)
  • February 13, 2320 (2320-02-13)
  • February 13, 3103 (3103-02-13)
  • February 13, 4111 (4111-02-13)
  • February 13, 4201 (4201-02-13)
  • March 13, 3012 (3012-03-13)
  • March 13, 4020 (4020-03-13)
  • March 13, 5001 (5001-03-13)
  • April 13, 2012 (2012-04-13)
  • April 13, 2210 (2210-04-13)
  • April 13, 2300 (2300-04-13)
  • April 13, 4001 (4001-04-13)
  • May 13, 2011 (2011-05-13)
  • May 13, 2101 (2101-05-13)
  • June 13, 3000 (3000-06-13)
  • October 13, 2006 (2006-10-13)
  • October 13, 2051 (2051-10-13)
  • October 13, 2141 (2141-10-13)
  • October 13, 3122 (3122-10-13)
  • October 13, 3302 (3302-10-13)
  • October 13, 4130 (4130-10-13)
  • October 13, 4220 (4220-10-13)
  • October 13, 4400 (4400-10-13)
  • October 13, 5111 (5111-10-13)
  • October 13, 8000 (8000-10-13)
  • November 13, 2122 (2122-11-13)
  • November 13, 2212 (2212-11-13)
  • November 13, 3040 (3040-11-13)
  • November 13, 3103 (3103-11-13)
  • November 13, 3220 (3220-11-13)
  • November 13, 4111 (4111-11-13)
  • November 13, 4201 (4201-11-13)
  • December 13, 2013 (2013-12-13)
  • December 13, 2211 (2211-12-13)
  • December 13, 2301 (2301-12-13)
  • December 13, 4002 (4002-12-13)

So, it looks like the answer is $48$.

$\endgroup$
1
  • 2
    $\begingroup$ $1$. Is this proof-verification? Or are you already confident your calculation is correct? $2$. Where did this problem come from? Did you make it up? $\endgroup$
    – Brian Tung
    Commented Nov 5, 2022 at 19:26

0

You must log in to answer this question.

Browse other questions tagged .