Factoring a year to get a date

152 Views Asked by At

Let's factor 2024: $2024=8\times 11\times 23$. So we can make a date: 8/11/23, or August 11, 2023. Or we could also make 11/8/23, November 8, 2023 (if you live in Europe, they will be switched).

Question: is there any year any time soon such that its factorization will give a date in the same year?

This could obviously be formulated (and generalized) as a problem in number theory, but I will not do it here.

Note that lots of years will not have a factorization that can be interpreted as a date in format mm/dd/yy. And some will give factorizations with multiple interpretations (besides the US/Europe date format...)

If such a year exists, then a person born on the corresponding date could claim to have a really special date of birth....

3

There are 3 best solutions below

2
On BEST ANSWER

Let the date be of the form $a/b/c$ and we wish to find dates such that $abc = 2000 + c$. For any year $c | $year, hence the last two digits should divide the first two. Python tells me that this is: $$ Y = \{2001, 2002, 2004, 2005, 2008, 2010, 2016, 2020, 2025, 2040, 2050, 2080, 2100\}$$ All of the years except for $2025, 2040, 2050, 2080$ have passed, and I choose not to count $2100$ since it's not in the twenty first century and $c=0$. Regardless, we would then divide each year by $c$, create a prime factorization and check all the pairs to see if $a \in [1,12]$, $b \in [1,31]$ (and make sure no illegal dates). Python again tells me the following: $$\begin{align} D_{2025} &= \{(3,27,25),(9,9,25)\}\\ D_{2040} &= \{(3,17,40)\} \\ D_{2050} &= \{\} \\ D_{2080} &= \{(1,26,80),(2,13,80)\} \end{align} $$ In the case of $2050$, $\frac{2050}{50} = 41$ which is prime, so it's not possible. I believe these are all of the cases in the twenty-first century that are upcoming, but I could be wrong. My code below is:

def factor(n):
    factors = []
    i = 2
    while n != 1:
        if n % i == 0:
            n /= i
            factors.append(i)
        else:
            i += 1
    return factors
ans = []

for year in range(2001,2101):
    if year % (year - 2000) == 0:
        ans.append(year)

years = [2025,2040,2050,2080]
dates = []
for year in years:
    q = year / (year - 2000)
    pfs = factor(q)
    print(pfs)

ob = '{'
cb = '}'
print(f'Y = {ob}{ans}{cb}')

Also I saw in the comments someone said $1/1/2027$ is trivial, but I'm fairly sure (by my interpretation at least) that dates like this aren't allowed since $1 \cdot 1 \cdot 27 \not = 2027$.

0
On
  1. Take year $Y$
  2. Extract the last $2$ digits of $Y$, say it's $L$. So $ L = 45$ for $Y = 2945$ e.g. $Y - 2000 = L$
  3. Find all numbers ($a$ and $b$) such that $abL = Y$ (A factorzation subroutine is needed)
  4. Check whether $a$ and $b$ are valid dates ($< 12$ or $<31$. If $12 < a < 31$, then $a$ is a day, otherwise it can be both a day and a month. $b$ should be checked in the same way.
  5. If they are valid dates, print $a/b/L$ or $b/a/L$
0
On

If the year is 100a + b, then we want this number to be divisible by b, which means 100a is divisible by b. We also want the quotient to be a product of one number <= 12 and one number <= 31. With b <= 5 the quotient will be too large.

a = 20: Factors of 100a from 6 to 99 are: 8, 10, 16, 20, 25, 40, 50 and 80.

2008 / 8 = 251, prime, not a date.
2010 / 10 = 201 = 3 * 67, not a date.
2016 / 16 = 126 = 6 * 21 = 7 * 18 = 9 * 14, three dates.
2020 / 20 = 101, prime, not a date.
2025 / 25 = 81 = 3 * 27 = 9 * 9, two dates.
2040 / 40 = 51 = 3 * 17, one date.
2050 / 50 = 41, prime, not a date.
2080 / 80 = 26 = 1 * 26 = 2 * 13, two dates. 

a = 21: Factors of 100a from 6 to 99 are 6, 7, 10, 12, 14, 15, 20, 21, 25, 28, 30, 35, 42, 50, 60, 70, 75, 84.

2106 / 6 = 351 = 13 * 27, not a date.
2107 / 7 = 301 = 7 * 43, not a date.
2110 / 10 = 211, prime, not a date.
2112 / 12 = 176 = 8 * 22 = 16 * 11, two dates.
2114 / 14 = 151, prime, not a date.
2115 / 15 = 141 = 3 * 47, not a date.
2120 / 20 = 106 = 2 * 53, not a date.
2121 / 21 = 101, prime, not a date.
2125 / 25 = 85 = 5 * 17, one date.
2128 / 28 = 76 = 4 * 19, one date.
2130 / 30 = 71, prime, not a date.
2135 / 35 = 61, prime, not a date.
2142 / 42 = 51 = 3 * 17, one date.
2150 / 50 = 43, prime, not a date.
2160 / 60 = 36 = 2 * 18 = 3 * 12 = 4 * 9 = 6 * 6, six dates.
2170 / 70 = 31 = 1 * 31, one date.
2175 / 75 = 29 = 1 * 29, one date.
2184 / 84 = 26 = 1 * 26 = 2 * 13, two dates.

a = 19: Factors of 100a from 6 to 99 are 10, 19, 20, 25, 38, 50, 76, and 95.

1910 / 10 = 191, prime, not a date.
1919 / 19 = 101, prime, not a date.
1920 / 20 = 96 = 4 * 24 = 6 * 16 = 8 * 12, four dates.
1925 / 25 = 77 = 7 * 11, two dates.
1938 / 38 = 51 = 3 * 17, one date.
1950 / 50 = 39 = 3 * 13, one date.
1976 / 76 = 26 = 2 * 13, one date.
1995 / 95 = 21 = 1 * 21 = 3 * 7, three dates.

So 27th of March, 2025, is the next special day, followed by the 9th of September in the same year.