Yesterday, on July 14th, 2021 (07/14/21), I observed on my LinkedIn post and on Facebook, that the month, day, and year components of the date are in arithmetic progression. I challenged my readers to find how many such dates are possible in a century.
My friend Prabu Parthasarathy on Facebook came up with the correct answer 336. I am still waiting to hear from him on his methodology. I was thinking the correct answer was 324 when my LinkedIn friend Keerthana mentioned that d=0 is also a valid AP. Yes, she was correct indeed!
I wrote a program to do a search for all such dates. https://github.com/rmadhuram/programming-challenges/blob/main/personal/date-ap.js. The following section lists all such dates.
Dates in mm/dd/yy format
Total Count | 336 |
Smallest Date | 01/01/01 |
Largest Date | 01/31/61 |
Ascending mm, dd, yy: d > 0 (288)
01/02/03 01/03/05 01/04/07 01/05/09 01/06/11 01/07/13 01/08/15 01/09/17 02/03/04 02/04/06 02/05/08 02/06/10 02/07/12 02/08/14 02/09/16 02/10/18 03/04/05 03/05/07 03/06/09 03/07/11 03/08/13 03/09/15 03/10/17 03/11/19 04/05/06 04/06/08 04/07/10 04/08/12 04/09/14 04/10/16 04/11/18 04/12/20 05/06/07 05/07/09 05/08/11 05/09/13 05/10/15 05/11/17 05/12/19 05/13/21 06/07/08 06/08/10 06/09/12 06/10/14 06/11/16 06/12/18 06/13/20 06/14/22 07/08/09 07/09/11 07/10/13 07/11/15 07/12/17 07/13/19 07/14/21 07/15/23 08/09/10 08/10/12 08/11/14 08/12/16 08/13/18 08/14/20 08/15/22 08/16/24 09/10/11 09/11/13 09/12/15 09/13/17 09/14/19 09/15/21 09/16/23 09/17/25 10/11/12 10/12/14 10/13/16 10/14/18 10/15/20 10/16/22 10/17/24 10/18/26 11/12/13 11/13/15 11/14/17 11/15/19 11/16/21 11/17/23 11/18/25 11/19/27 12/13/14 12/14/16 12/15/18 12/16/20 12/17/22 12/18/24 12/19/26 12/20/28 01/10/19 01/11/21 01/12/23 01/13/25 01/14/27 01/15/29 01/16/31 01/17/33 02/11/20 02/12/22 02/13/24 02/14/26 02/15/28 02/16/30 02/17/32 02/18/34 03/12/21 03/13/23 03/14/25 03/15/27 03/16/29 03/17/31 03/18/33 03/19/35 04/13/22 04/14/24 04/15/26 04/16/28 04/17/30 04/18/32 04/19/34 04/20/36 05/14/23 05/15/25 05/16/27 05/17/29 05/18/31 05/19/33 05/20/35 05/21/37 06/15/24 06/16/26 06/17/28 06/18/30 06/19/32 06/20/34 06/21/36 06/22/38 07/16/25 07/17/27 07/18/29 07/19/31 07/20/33 07/21/35 07/22/37 07/23/39 08/17/26 08/18/28 08/19/30 08/20/32 08/21/34 08/22/36 08/23/38 08/24/40 09/18/27 09/19/29 09/20/31 09/21/33 09/22/35 09/23/37 09/24/39 09/25/41 10/19/28 10/20/30 10/21/32 10/22/34 10/23/36 10/24/38 10/25/40 10/26/42 11/20/29 11/21/31 11/22/33 11/23/35 11/24/37 11/25/39 11/26/41 11/27/43 12/21/30 12/22/32 12/23/34 12/24/36 12/25/38 12/26/40 12/27/42 12/28/44 01/18/35 01/19/37 01/20/39 01/21/41 01/22/43 01/23/45 01/24/47 01/25/49 02/19/36 02/20/38 02/21/40 02/22/42 02/23/44 02/24/46 02/25/48 02/26/50 03/20/37 03/21/39 03/22/41 03/23/43 03/24/45 03/25/47 03/26/49 03/27/51 04/21/38 04/22/40 04/23/42 04/24/44 04/25/46 04/26/48 04/27/50 04/28/52 05/22/39 05/23/41 05/24/43 05/25/45 05/26/47 05/27/49 05/28/51 05/29/53 06/23/40 06/24/42 06/25/44 06/26/46 06/27/48 06/28/50 06/29/52 06/30/54 07/24/41 07/25/43 07/26/45 07/27/47 07/28/49 07/29/51 07/30/53 07/31/55 08/25/42 08/26/44 08/27/46 08/28/48 08/29/50 08/30/52 08/31/54 09/26/43 09/27/45 09/28/47 09/29/49 09/30/51 10/27/44 10/28/46 10/29/48 10/30/50 10/31/52 11/28/45 11/29/47 11/30/49 12/29/46 12/30/48 12/31/50 01/26/51 01/27/53 01/28/55 01/29/57 01/30/59 01/31/61 02/27/52 02/28/54 02/29/56 03/31/59 03/28/53 03/29/55 03/30/57 04/29/54 04/30/56 05/30/55 05/31/57
Descending mm, dd, yy: d < 0 (36)
02/01/00 04/02/00 06/03/00 08/04/00 10/05/00 12/06/00 03/02/01 05/03/01 07/04/01 09/05/01 11/06/01 04/03/02 06/04/02 08/05/02 10/06/02 12/07/02 05/04/03 07/05/03 09/06/03 11/07/03 06/05/04 08/06/04 10/07/04 12/08/04 07/06/05 09/07/05 11/08/05 08/07/06 10/08/06 12/09/06 09/08/07 11/09/07 10/09/08 12/10/08 11/10/09 12/11/10
Neutral mm, dd, yy: d = 0 (12)
01/01/01 02/02/02 03/03/03 04/04/04 05/05/05 06/06/06 07/07/07 08/08/08 09/09/09 10/10/10 11/11/11 12/12/12
Dates in dd/mm/yy format
Total Count | 156 |
Smallest Date | 01/01/01 |
Largest Date | 01/12/23 |
We can observe there is a very simple pattern when writing numbers in dd/mm/yy format. The total number of ascending is 1+2+3+…+11 = 66, and that of descending is 1+2+3+…+12 = 78.
Ascending dd, mm, yy: d > 0 (66)
01/02/03 01/03/05 01/04/07 01/05/09 01/06/11 01/07/13 01/08/15 01/09/17 02/03/04 02/04/06 02/05/08 02/06/10 02/07/12 02/08/14 02/09/16 02/10/18 03/04/05 03/05/07 03/06/09 03/07/11 03/08/13 03/09/15 03/10/17 03/11/19 04/05/06 04/06/08 04/07/10 04/08/12 04/09/14 04/10/16 04/11/18 04/12/20 05/06/07 05/07/09 05/08/11 05/09/13 05/10/15 05/11/17 05/12/19 06/07/08 06/08/10 06/09/12 06/10/14 06/11/16 06/12/18 07/08/09 07/09/11 07/10/13 07/11/15 07/12/17 08/09/10 08/10/12 08/11/14 08/12/16 09/10/11 09/11/13 09/12/15 10/11/12 10/12/14 11/12/13 01/10/19 01/11/21 01/12/23 02/11/20 02/12/22 03/12/21
Descending dd, mm, yy: d < 0 (78)
02/01/00 04/02/00 06/03/00 08/04/00 10/05/00 12/06/00 14/07/00 16/08/00 03/02/01 05/03/01 07/04/01 09/05/01 11/06/01 13/07/01 15/08/01 17/09/01 04/03/02 06/04/02 08/05/02 10/06/02 12/07/02 14/08/02 16/09/02 18/10/02 05/04/03 07/05/03 09/06/03 11/07/03 13/08/03 15/09/03 17/10/03 19/11/03 06/05/04 08/06/04 10/07/04 12/08/04 14/09/04 16/10/04 18/11/04 20/12/04 07/06/05 09/07/05 11/08/05 13/09/05 15/10/05 17/11/05 19/12/05 08/07/06 10/08/06 12/09/06 14/10/06 16/11/06 18/12/06 09/08/07 11/09/07 13/10/07 15/11/07 17/12/07 10/09/08 12/10/08 14/11/08 16/12/08 11/10/09 13/11/09 15/12/09 12/11/10 14/12/10 13/12/11 18/09/00 20/10/00 22/11/00 24/12/00 19/10/01 21/11/01 23/12/01 20/11/02 22/12/02 21/12/03
Neutral mm, dd, yy: d = 0 (12)
01/01/01 02/02/02 03/03/03 04/04/04 05/05/05 06/06/06 07/07/07 08/08/08 09/09/09 10/10/10 11/11/11 12/12/12
Photo by Artem Podrez from Pexels