Divisible Dates












10












$begingroup$


The day of the month, and the month of the year, often simultaneously divide the year. Most recently it happened on January 3, 2019 because both 1 (January) and 3 divide 2019.



In our era, since 1/1/1, which years have had the most such dates?










share|improve this question











$endgroup$












  • $begingroup$
    For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
    $endgroup$
    – Van
    Jan 25 at 15:11










  • $begingroup$
    @Van Yes, both.
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:16










  • $begingroup$
    can we solve this with some code? :)
    $endgroup$
    – Flying_whale
    Jan 25 at 15:17










  • $begingroup$
    @Flying_whale: Go!
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:18
















10












$begingroup$


The day of the month, and the month of the year, often simultaneously divide the year. Most recently it happened on January 3, 2019 because both 1 (January) and 3 divide 2019.



In our era, since 1/1/1, which years have had the most such dates?










share|improve this question











$endgroup$












  • $begingroup$
    For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
    $endgroup$
    – Van
    Jan 25 at 15:11










  • $begingroup$
    @Van Yes, both.
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:16










  • $begingroup$
    can we solve this with some code? :)
    $endgroup$
    – Flying_whale
    Jan 25 at 15:17










  • $begingroup$
    @Flying_whale: Go!
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:18














10












10








10


1



$begingroup$


The day of the month, and the month of the year, often simultaneously divide the year. Most recently it happened on January 3, 2019 because both 1 (January) and 3 divide 2019.



In our era, since 1/1/1, which years have had the most such dates?










share|improve this question











$endgroup$




The day of the month, and the month of the year, often simultaneously divide the year. Most recently it happened on January 3, 2019 because both 1 (January) and 3 divide 2019.



In our era, since 1/1/1, which years have had the most such dates?







arithmetic






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 26 at 14:14







Bernardo Recamán Santos

















asked Jan 25 at 14:56









Bernardo Recamán SantosBernardo Recamán Santos

2,6401346




2,6401346












  • $begingroup$
    For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
    $endgroup$
    – Van
    Jan 25 at 15:11










  • $begingroup$
    @Van Yes, both.
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:16










  • $begingroup$
    can we solve this with some code? :)
    $endgroup$
    – Flying_whale
    Jan 25 at 15:17










  • $begingroup$
    @Flying_whale: Go!
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:18


















  • $begingroup$
    For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
    $endgroup$
    – Van
    Jan 25 at 15:11










  • $begingroup$
    @Van Yes, both.
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:16










  • $begingroup$
    can we solve this with some code? :)
    $endgroup$
    – Flying_whale
    Jan 25 at 15:17










  • $begingroup$
    @Flying_whale: Go!
    $endgroup$
    – Bernardo Recamán Santos
    Jan 25 at 15:18
















$begingroup$
For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
$endgroup$
– Van
Jan 25 at 15:11




$begingroup$
For clarification: Is a divisible date one in which either the day or month divide the year, or one in with both do?
$endgroup$
– Van
Jan 25 at 15:11












$begingroup$
@Van Yes, both.
$endgroup$
– Bernardo Recamán Santos
Jan 25 at 15:16




$begingroup$
@Van Yes, both.
$endgroup$
– Bernardo Recamán Santos
Jan 25 at 15:16












$begingroup$
can we solve this with some code? :)
$endgroup$
– Flying_whale
Jan 25 at 15:17




$begingroup$
can we solve this with some code? :)
$endgroup$
– Flying_whale
Jan 25 at 15:17












$begingroup$
@Flying_whale: Go!
$endgroup$
– Bernardo Recamán Santos
Jan 25 at 15:18




$begingroup$
@Flying_whale: Go!
$endgroup$
– Bernardo Recamán Santos
Jan 25 at 15:18










5 Answers
5






active

oldest

votes


















11












$begingroup$

I'm going to go with




1680




factors:




1,2,3,4,5,6,7,8,10,12,14,15,16,20,21,24,28,30




So it hits on




179 days (10 months times 18 days, minus 30th of February)




Method:



Looked up




Highly composite numbers, picked the largest that's smaller than 2019.







share|improve this answer









$endgroup$













  • $begingroup$
    Van got more days then this, so shouldn’t his be the accepted answer?
    $endgroup$
    – tyobrien
    Jan 26 at 1:58










  • $begingroup$
    @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
    $endgroup$
    – Bass
    Jan 26 at 2:25





















6












$begingroup$

I found




with a bit of code i found 1680 with 179 dates you can run it here : https://rextester.com/YITA38880







share|improve this answer











$endgroup$





















    5












    $begingroup$

    I believe I can beat JonMark Perry's answer:




    1260 = 2 x2 x3 x3 x5 x7


    For months, I can get 1, 2, 3, 4, 5, 6, 7, 9, 10, & 12 (10 - same).


    But for days, I get:


    1, 2, 3, 4, 5, 6, 7, 9, 10, 12 & 14, 15, 18, 20, 21, 28, 30 (17 - one more than Jon)







    share|improve this answer









    $endgroup$





















      4












      $begingroup$

      I'd be surprised if you can beat:




      1080. It equals $2^3times3^3times5$, and so covers $1,2,3,4,5,6,8,9,10,12,15,18,20,24,27,30$ for days and $1,2,3,4,5,6,8,9,10,12$ for months.







      share|improve this answer









      $endgroup$





















        4












        $begingroup$

        This is a small enough set that a very simple program should be able to just brute-force it in a fraction of a second. So, here's a Python version. And, just to verify it, here's a wildly different one).1



        If you run either one, the winner is:




        1680, with 179 divisible days.




        This makes perfect sense, for the reason Bass explains, but the brute-forcing shows how you could get the answer even without thinking very far.



        That record obviously won't stand forever,2 but how soon will the record be broken?



        Just change the outer loop to for year in itertools.count(1): to keep scanning until the end of time,3 and you'll see that:




        2520 will have 208 divisible days.






        1. Depending on the Python version, the datetime type may assume proleptic Georgian, so it'll incorrectly treat 400, 800, and 1200 as leap years. None of those three years is divisible by 29, so it won't make a difference. But better to actually get the rule right, as in the first version, than to get it wrong and then explain why it doesn't matter, right?



        2. 2329089562800 is a leap year divisible by every number up to 31, so, assuming we use the Gregorian calendar that long, it will have 366 divisible dates.



        3. Going all the way to 2329089562800 without optimizing the algorithm would probably take a while, but you can hit ^C after you get the first post-2019 record, or after you've seen enough that you're bored.






        share|improve this answer









        $endgroup$













          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "559"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f78853%2fdivisible-dates%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          11












          $begingroup$

          I'm going to go with




          1680




          factors:




          1,2,3,4,5,6,7,8,10,12,14,15,16,20,21,24,28,30




          So it hits on




          179 days (10 months times 18 days, minus 30th of February)




          Method:



          Looked up




          Highly composite numbers, picked the largest that's smaller than 2019.







          share|improve this answer









          $endgroup$













          • $begingroup$
            Van got more days then this, so shouldn’t his be the accepted answer?
            $endgroup$
            – tyobrien
            Jan 26 at 1:58










          • $begingroup$
            @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
            $endgroup$
            – Bass
            Jan 26 at 2:25


















          11












          $begingroup$

          I'm going to go with




          1680




          factors:




          1,2,3,4,5,6,7,8,10,12,14,15,16,20,21,24,28,30




          So it hits on




          179 days (10 months times 18 days, minus 30th of February)




          Method:



          Looked up




          Highly composite numbers, picked the largest that's smaller than 2019.







          share|improve this answer









          $endgroup$













          • $begingroup$
            Van got more days then this, so shouldn’t his be the accepted answer?
            $endgroup$
            – tyobrien
            Jan 26 at 1:58










          • $begingroup$
            @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
            $endgroup$
            – Bass
            Jan 26 at 2:25
















          11












          11








          11





          $begingroup$

          I'm going to go with




          1680




          factors:




          1,2,3,4,5,6,7,8,10,12,14,15,16,20,21,24,28,30




          So it hits on




          179 days (10 months times 18 days, minus 30th of February)




          Method:



          Looked up




          Highly composite numbers, picked the largest that's smaller than 2019.







          share|improve this answer









          $endgroup$



          I'm going to go with




          1680




          factors:




          1,2,3,4,5,6,7,8,10,12,14,15,16,20,21,24,28,30




          So it hits on




          179 days (10 months times 18 days, minus 30th of February)




          Method:



          Looked up




          Highly composite numbers, picked the largest that's smaller than 2019.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 25 at 15:39









          BassBass

          30.4k472186




          30.4k472186












          • $begingroup$
            Van got more days then this, so shouldn’t his be the accepted answer?
            $endgroup$
            – tyobrien
            Jan 26 at 1:58










          • $begingroup$
            @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
            $endgroup$
            – Bass
            Jan 26 at 2:25




















          • $begingroup$
            Van got more days then this, so shouldn’t his be the accepted answer?
            $endgroup$
            – tyobrien
            Jan 26 at 1:58










          • $begingroup$
            @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
            $endgroup$
            – Bass
            Jan 26 at 2:25


















          $begingroup$
          Van got more days then this, so shouldn’t his be the accepted answer?
          $endgroup$
          – tyobrien
          Jan 26 at 1:58




          $begingroup$
          Van got more days then this, so shouldn’t his be the accepted answer?
          $endgroup$
          – tyobrien
          Jan 26 at 1:58












          $begingroup$
          @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
          $endgroup$
          – Bass
          Jan 26 at 2:25






          $begingroup$
          @tyobrien If you look at the bottom right hand corner of the answer, you'll notice that this isn't the JonMark Perry answer Van managed to beat. :-)
          $endgroup$
          – Bass
          Jan 26 at 2:25













          6












          $begingroup$

          I found




          with a bit of code i found 1680 with 179 dates you can run it here : https://rextester.com/YITA38880







          share|improve this answer











          $endgroup$


















            6












            $begingroup$

            I found




            with a bit of code i found 1680 with 179 dates you can run it here : https://rextester.com/YITA38880







            share|improve this answer











            $endgroup$
















              6












              6








              6





              $begingroup$

              I found




              with a bit of code i found 1680 with 179 dates you can run it here : https://rextester.com/YITA38880







              share|improve this answer











              $endgroup$



              I found




              with a bit of code i found 1680 with 179 dates you can run it here : https://rextester.com/YITA38880








              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 25 at 19:26

























              answered Jan 25 at 15:33









              Flying_whaleFlying_whale

              1,909425




              1,909425























                  5












                  $begingroup$

                  I believe I can beat JonMark Perry's answer:




                  1260 = 2 x2 x3 x3 x5 x7


                  For months, I can get 1, 2, 3, 4, 5, 6, 7, 9, 10, & 12 (10 - same).


                  But for days, I get:


                  1, 2, 3, 4, 5, 6, 7, 9, 10, 12 & 14, 15, 18, 20, 21, 28, 30 (17 - one more than Jon)







                  share|improve this answer









                  $endgroup$


















                    5












                    $begingroup$

                    I believe I can beat JonMark Perry's answer:




                    1260 = 2 x2 x3 x3 x5 x7


                    For months, I can get 1, 2, 3, 4, 5, 6, 7, 9, 10, & 12 (10 - same).


                    But for days, I get:


                    1, 2, 3, 4, 5, 6, 7, 9, 10, 12 & 14, 15, 18, 20, 21, 28, 30 (17 - one more than Jon)







                    share|improve this answer









                    $endgroup$
















                      5












                      5








                      5





                      $begingroup$

                      I believe I can beat JonMark Perry's answer:




                      1260 = 2 x2 x3 x3 x5 x7


                      For months, I can get 1, 2, 3, 4, 5, 6, 7, 9, 10, & 12 (10 - same).


                      But for days, I get:


                      1, 2, 3, 4, 5, 6, 7, 9, 10, 12 & 14, 15, 18, 20, 21, 28, 30 (17 - one more than Jon)







                      share|improve this answer









                      $endgroup$



                      I believe I can beat JonMark Perry's answer:




                      1260 = 2 x2 x3 x3 x5 x7


                      For months, I can get 1, 2, 3, 4, 5, 6, 7, 9, 10, & 12 (10 - same).


                      But for days, I get:


                      1, 2, 3, 4, 5, 6, 7, 9, 10, 12 & 14, 15, 18, 20, 21, 28, 30 (17 - one more than Jon)








                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 25 at 15:22









                      VanVan

                      59312




                      59312























                          4












                          $begingroup$

                          I'd be surprised if you can beat:




                          1080. It equals $2^3times3^3times5$, and so covers $1,2,3,4,5,6,8,9,10,12,15,18,20,24,27,30$ for days and $1,2,3,4,5,6,8,9,10,12$ for months.







                          share|improve this answer









                          $endgroup$


















                            4












                            $begingroup$

                            I'd be surprised if you can beat:




                            1080. It equals $2^3times3^3times5$, and so covers $1,2,3,4,5,6,8,9,10,12,15,18,20,24,27,30$ for days and $1,2,3,4,5,6,8,9,10,12$ for months.







                            share|improve this answer









                            $endgroup$
















                              4












                              4








                              4





                              $begingroup$

                              I'd be surprised if you can beat:




                              1080. It equals $2^3times3^3times5$, and so covers $1,2,3,4,5,6,8,9,10,12,15,18,20,24,27,30$ for days and $1,2,3,4,5,6,8,9,10,12$ for months.







                              share|improve this answer









                              $endgroup$



                              I'd be surprised if you can beat:




                              1080. It equals $2^3times3^3times5$, and so covers $1,2,3,4,5,6,8,9,10,12,15,18,20,24,27,30$ for days and $1,2,3,4,5,6,8,9,10,12$ for months.








                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 25 at 15:10









                              JonMark PerryJonMark Perry

                              20.1k64098




                              20.1k64098























                                  4












                                  $begingroup$

                                  This is a small enough set that a very simple program should be able to just brute-force it in a fraction of a second. So, here's a Python version. And, just to verify it, here's a wildly different one).1



                                  If you run either one, the winner is:




                                  1680, with 179 divisible days.




                                  This makes perfect sense, for the reason Bass explains, but the brute-forcing shows how you could get the answer even without thinking very far.



                                  That record obviously won't stand forever,2 but how soon will the record be broken?



                                  Just change the outer loop to for year in itertools.count(1): to keep scanning until the end of time,3 and you'll see that:




                                  2520 will have 208 divisible days.






                                  1. Depending on the Python version, the datetime type may assume proleptic Georgian, so it'll incorrectly treat 400, 800, and 1200 as leap years. None of those three years is divisible by 29, so it won't make a difference. But better to actually get the rule right, as in the first version, than to get it wrong and then explain why it doesn't matter, right?



                                  2. 2329089562800 is a leap year divisible by every number up to 31, so, assuming we use the Gregorian calendar that long, it will have 366 divisible dates.



                                  3. Going all the way to 2329089562800 without optimizing the algorithm would probably take a while, but you can hit ^C after you get the first post-2019 record, or after you've seen enough that you're bored.






                                  share|improve this answer









                                  $endgroup$


















                                    4












                                    $begingroup$

                                    This is a small enough set that a very simple program should be able to just brute-force it in a fraction of a second. So, here's a Python version. And, just to verify it, here's a wildly different one).1



                                    If you run either one, the winner is:




                                    1680, with 179 divisible days.




                                    This makes perfect sense, for the reason Bass explains, but the brute-forcing shows how you could get the answer even without thinking very far.



                                    That record obviously won't stand forever,2 but how soon will the record be broken?



                                    Just change the outer loop to for year in itertools.count(1): to keep scanning until the end of time,3 and you'll see that:




                                    2520 will have 208 divisible days.






                                    1. Depending on the Python version, the datetime type may assume proleptic Georgian, so it'll incorrectly treat 400, 800, and 1200 as leap years. None of those three years is divisible by 29, so it won't make a difference. But better to actually get the rule right, as in the first version, than to get it wrong and then explain why it doesn't matter, right?



                                    2. 2329089562800 is a leap year divisible by every number up to 31, so, assuming we use the Gregorian calendar that long, it will have 366 divisible dates.



                                    3. Going all the way to 2329089562800 without optimizing the algorithm would probably take a while, but you can hit ^C after you get the first post-2019 record, or after you've seen enough that you're bored.






                                    share|improve this answer









                                    $endgroup$
















                                      4












                                      4








                                      4





                                      $begingroup$

                                      This is a small enough set that a very simple program should be able to just brute-force it in a fraction of a second. So, here's a Python version. And, just to verify it, here's a wildly different one).1



                                      If you run either one, the winner is:




                                      1680, with 179 divisible days.




                                      This makes perfect sense, for the reason Bass explains, but the brute-forcing shows how you could get the answer even without thinking very far.



                                      That record obviously won't stand forever,2 but how soon will the record be broken?



                                      Just change the outer loop to for year in itertools.count(1): to keep scanning until the end of time,3 and you'll see that:




                                      2520 will have 208 divisible days.






                                      1. Depending on the Python version, the datetime type may assume proleptic Georgian, so it'll incorrectly treat 400, 800, and 1200 as leap years. None of those three years is divisible by 29, so it won't make a difference. But better to actually get the rule right, as in the first version, than to get it wrong and then explain why it doesn't matter, right?



                                      2. 2329089562800 is a leap year divisible by every number up to 31, so, assuming we use the Gregorian calendar that long, it will have 366 divisible dates.



                                      3. Going all the way to 2329089562800 without optimizing the algorithm would probably take a while, but you can hit ^C after you get the first post-2019 record, or after you've seen enough that you're bored.






                                      share|improve this answer









                                      $endgroup$



                                      This is a small enough set that a very simple program should be able to just brute-force it in a fraction of a second. So, here's a Python version. And, just to verify it, here's a wildly different one).1



                                      If you run either one, the winner is:




                                      1680, with 179 divisible days.




                                      This makes perfect sense, for the reason Bass explains, but the brute-forcing shows how you could get the answer even without thinking very far.



                                      That record obviously won't stand forever,2 but how soon will the record be broken?



                                      Just change the outer loop to for year in itertools.count(1): to keep scanning until the end of time,3 and you'll see that:




                                      2520 will have 208 divisible days.






                                      1. Depending on the Python version, the datetime type may assume proleptic Georgian, so it'll incorrectly treat 400, 800, and 1200 as leap years. None of those three years is divisible by 29, so it won't make a difference. But better to actually get the rule right, as in the first version, than to get it wrong and then explain why it doesn't matter, right?



                                      2. 2329089562800 is a leap year divisible by every number up to 31, so, assuming we use the Gregorian calendar that long, it will have 366 divisible dates.



                                      3. Going all the way to 2329089562800 without optimizing the algorithm would probably take a while, but you can hit ^C after you get the first post-2019 record, or after you've seen enough that you're bored.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jan 25 at 21:25









                                      abarnertabarnert

                                      1413




                                      1413






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Puzzling Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          Use MathJax to format equations. MathJax reference.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f78853%2fdivisible-dates%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Mario Kart Wii

                                          The Binding of Isaac: Rebirth/Afterbirth

                                          What does “Dominus providebit” mean?