Am I a Rude Number?Print the fingering for the note on a saxophoneProgram touch-tone instructions for my...

Changing the laptop's CPU. Should I reinstall Linux?

Cat is tipping over bed-side lamps during the night

Why don't key signatures indicate the tonic?

Square Root Distance from Integers

Which communication protocol is used in AdLib sound card?

Plausible reason for gold-digging ant

How do you voice extended chords?

Has Britain negotiated with any other countries outside the EU in preparation for the exit?

What game did these black and yellow dice come from?

How do you catch Smeargle in Pokemon Go?

Play Zip, Zap, Zop

Is "the fire consumed everything on its way" correct?

Strange "DuckDuckGo dork" takes me to random website

How to not let the Identify spell spoil everything?

How do you funnel food off a cutting board?

Is using an 'empty' metaphor considered bad style?

How does one write from a minority culture? A question on cultural references

Citing paywalled articles accessed via illegal web sharing

In Linux what happens if 1000 files in a directory are moved to another location while another 300 files were added to the source directory?

Looking for a specific 6502 Assembler

How can the probability of a fumble decrease linearly with more dice?

Is there a defined priority for pattern matching?

After checking in online, how do I know whether I need to go show my passport at airport check-in?

Is a new boolean field better than null reference when a value can be meaningfully absent?



Am I a Rude Number?


Print the fingering for the note on a saxophoneProgram touch-tone instructions for my fingersIs this even or odd?Is this number a factorial?Is this number triangular?Am I a Cullen Number?Am I an Automorphic Number?Is this any number?Octal Calculator with Primality checkIs it a Sphenic Number?













3












$begingroup$


For a while now, I've been running into a problem when counting on my fingers, specifically, that I can only count to ten. My solution to that problem has been to count in binary on my fingers, putting up my thumb for one, my forefinger for two, both thumb and forefinger for three, etc. However, we run into a bit of a problem when we get to the number four. Specifically, it requires us to put up our middle finger, which results in a rather unfortunate gesture, which is not typically accepted in society. This type of number is a rude number. We come to the next rude number at 36, when we raise the thumb on our second hand and the middle finger of our first hand. The definition of a rude number is any number that, under this system of counting, results in us putting up only the middle finger of any hand. Once we pass 1023 (the maximum number reachable on one hand), assume we continue with a third hand, with additional hands added as required.



Your Task:



Write a program or function that receives an input and outputs a truthy/falsy value based on whether the input is a rude number.



Input:



An integer between 0 and 10^9 (inclusive).



Output:



A truthy/falsy value that indicates whether the input is a rude number.



Test Cases:



Input:    Output:
0 ---> falsy
3 ---> falsy
4 ---> truthy
25 ---> falsy
36 ---> truthy
127 ---> falsy
131 ---> truthy


Scoring:



This is code-golf, so the lowest score in bytes wins.










share|improve this question











$endgroup$








  • 2




    $begingroup$
    assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
    $endgroup$
    – Veskah
    1 hour ago






  • 1




    $begingroup$
    @Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    You can reach 1023 on one hand? O_o
    $endgroup$
    – ASCII-only
    11 mins ago
















3












$begingroup$


For a while now, I've been running into a problem when counting on my fingers, specifically, that I can only count to ten. My solution to that problem has been to count in binary on my fingers, putting up my thumb for one, my forefinger for two, both thumb and forefinger for three, etc. However, we run into a bit of a problem when we get to the number four. Specifically, it requires us to put up our middle finger, which results in a rather unfortunate gesture, which is not typically accepted in society. This type of number is a rude number. We come to the next rude number at 36, when we raise the thumb on our second hand and the middle finger of our first hand. The definition of a rude number is any number that, under this system of counting, results in us putting up only the middle finger of any hand. Once we pass 1023 (the maximum number reachable on one hand), assume we continue with a third hand, with additional hands added as required.



Your Task:



Write a program or function that receives an input and outputs a truthy/falsy value based on whether the input is a rude number.



Input:



An integer between 0 and 10^9 (inclusive).



Output:



A truthy/falsy value that indicates whether the input is a rude number.



Test Cases:



Input:    Output:
0 ---> falsy
3 ---> falsy
4 ---> truthy
25 ---> falsy
36 ---> truthy
127 ---> falsy
131 ---> truthy


Scoring:



This is code-golf, so the lowest score in bytes wins.










share|improve this question











$endgroup$








  • 2




    $begingroup$
    assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
    $endgroup$
    – Veskah
    1 hour ago






  • 1




    $begingroup$
    @Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    You can reach 1023 on one hand? O_o
    $endgroup$
    – ASCII-only
    11 mins ago














3












3








3





$begingroup$


For a while now, I've been running into a problem when counting on my fingers, specifically, that I can only count to ten. My solution to that problem has been to count in binary on my fingers, putting up my thumb for one, my forefinger for two, both thumb and forefinger for three, etc. However, we run into a bit of a problem when we get to the number four. Specifically, it requires us to put up our middle finger, which results in a rather unfortunate gesture, which is not typically accepted in society. This type of number is a rude number. We come to the next rude number at 36, when we raise the thumb on our second hand and the middle finger of our first hand. The definition of a rude number is any number that, under this system of counting, results in us putting up only the middle finger of any hand. Once we pass 1023 (the maximum number reachable on one hand), assume we continue with a third hand, with additional hands added as required.



Your Task:



Write a program or function that receives an input and outputs a truthy/falsy value based on whether the input is a rude number.



Input:



An integer between 0 and 10^9 (inclusive).



Output:



A truthy/falsy value that indicates whether the input is a rude number.



Test Cases:



Input:    Output:
0 ---> falsy
3 ---> falsy
4 ---> truthy
25 ---> falsy
36 ---> truthy
127 ---> falsy
131 ---> truthy


Scoring:



This is code-golf, so the lowest score in bytes wins.










share|improve this question











$endgroup$




For a while now, I've been running into a problem when counting on my fingers, specifically, that I can only count to ten. My solution to that problem has been to count in binary on my fingers, putting up my thumb for one, my forefinger for two, both thumb and forefinger for three, etc. However, we run into a bit of a problem when we get to the number four. Specifically, it requires us to put up our middle finger, which results in a rather unfortunate gesture, which is not typically accepted in society. This type of number is a rude number. We come to the next rude number at 36, when we raise the thumb on our second hand and the middle finger of our first hand. The definition of a rude number is any number that, under this system of counting, results in us putting up only the middle finger of any hand. Once we pass 1023 (the maximum number reachable on one hand), assume we continue with a third hand, with additional hands added as required.



Your Task:



Write a program or function that receives an input and outputs a truthy/falsy value based on whether the input is a rude number.



Input:



An integer between 0 and 10^9 (inclusive).



Output:



A truthy/falsy value that indicates whether the input is a rude number.



Test Cases:



Input:    Output:
0 ---> falsy
3 ---> falsy
4 ---> truthy
25 ---> falsy
36 ---> truthy
127 ---> falsy
131 ---> truthy


Scoring:



This is code-golf, so the lowest score in bytes wins.







code-golf number decision-problem






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 38 mins ago







Gryphon

















asked 1 hour ago









GryphonGryphon

3,1891963




3,1891963








  • 2




    $begingroup$
    assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
    $endgroup$
    – Veskah
    1 hour ago






  • 1




    $begingroup$
    @Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    You can reach 1023 on one hand? O_o
    $endgroup$
    – ASCII-only
    11 mins ago














  • 2




    $begingroup$
    assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
    $endgroup$
    – Veskah
    1 hour ago






  • 1




    $begingroup$
    @Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
    $endgroup$
    – Gryphon
    1 hour ago










  • $begingroup$
    You can reach 1023 on one hand? O_o
    $endgroup$
    – ASCII-only
    11 mins ago








2




2




$begingroup$
assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
$endgroup$
– Veskah
1 hour ago




$begingroup$
assume we continue with a third hand, When it comes to being rude, teamwork makes the dream work.
$endgroup$
– Veskah
1 hour ago




1




1




$begingroup$
@Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
$endgroup$
– Gryphon
1 hour ago




$begingroup$
@Veskah turns out that for the bounds of the question, you only need 3 people to make any given number. Sure beats the old kind of counting on fingers.
$endgroup$
– Gryphon
1 hour ago












$begingroup$
Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
$endgroup$
– Gryphon
1 hour ago




$begingroup$
Also, I don't have the time at the moment, but if anyone could figure out an equation for this sequence, that'd be great.
$endgroup$
– Gryphon
1 hour ago












$begingroup$
You can reach 1023 on one hand? O_o
$endgroup$
– ASCII-only
11 mins ago




$begingroup$
You can reach 1023 on one hand? O_o
$endgroup$
– ASCII-only
11 mins ago










5 Answers
5






active

oldest

votes


















2












$begingroup$


JavaScript (SpiderMonkey), 27 bytes





x=>/4/.test(x.toString(32))


Try it online!



This is a trivial solution, you just want to convert to base 32 and check if there is a 4 in it.






share|improve this answer









$endgroup$





















    2












    $begingroup$

    Ruby, 36 19 bytes





    ->n{n.to_s(32)[?4]}


    Try it online!



    Saved 17 bytes with @tsh's method.






    share|improve this answer











    $endgroup$













    • $begingroup$
      This returns true for 2207, which has a binary representation of 100010011111
      $endgroup$
      – Embodiment of Ignorance
      23 mins ago










    • $begingroup$
      @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
      $endgroup$
      – Doorknob
      17 mins ago










    • $begingroup$
      I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
      $endgroup$
      – tsh
      14 mins ago












    • $begingroup$
      @tsh because I'm not as clever as you :)
      $endgroup$
      – Doorknob
      10 mins ago










    • $begingroup$
      Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
      $endgroup$
      – Embodiment of Ignorance
      5 mins ago



















    2












    $begingroup$


    Perl 6, 16 bytes





    {.base(32)~~/4/}


    Try it online!



    Checks if there is a 4 in the base 32 representation of the number. Returns either Nil as false or a Match containing a 4.



    You can prove this by the fact that $2^5 = 32$ so each digit is the state of each hand.





    share









    $endgroup$





















      1












      $begingroup$

      Regex (ECMAScript), 37 bytes



      ^((?=(x+)(2{31}x*))3)*(x{32})*x{4}$



      Try it online!



      ^
      (
      (?=(x+)(2{31}x*)) # 2 = floor(tail / 32); 3 = tool to make tail = 2
      3 # tail = 2
      )* # Loop the above as many times as necessary to make
      # the below match
      (x{32})*x{4}$ # Assert that tail % 32 == 4





      share|improve this answer











      $endgroup$





















        0












        $begingroup$


        Japt, 5 bytes



        sH ø4


        Try it online!



        Explanation



              // Implicit input
        sH // To a base-H (=32) string
        ø // Contains
        4 // 4 (JavaScript interprets this as a string)





        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.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "200"
          };
          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
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f180481%2fam-i-a-rude-number%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









          2












          $begingroup$


          JavaScript (SpiderMonkey), 27 bytes





          x=>/4/.test(x.toString(32))


          Try it online!



          This is a trivial solution, you just want to convert to base 32 and check if there is a 4 in it.






          share|improve this answer









          $endgroup$


















            2












            $begingroup$


            JavaScript (SpiderMonkey), 27 bytes





            x=>/4/.test(x.toString(32))


            Try it online!



            This is a trivial solution, you just want to convert to base 32 and check if there is a 4 in it.






            share|improve this answer









            $endgroup$
















              2












              2








              2





              $begingroup$


              JavaScript (SpiderMonkey), 27 bytes





              x=>/4/.test(x.toString(32))


              Try it online!



              This is a trivial solution, you just want to convert to base 32 and check if there is a 4 in it.






              share|improve this answer









              $endgroup$




              JavaScript (SpiderMonkey), 27 bytes





              x=>/4/.test(x.toString(32))


              Try it online!



              This is a trivial solution, you just want to convert to base 32 and check if there is a 4 in it.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 16 mins ago









              tshtsh

              9,14511650




              9,14511650























                  2












                  $begingroup$

                  Ruby, 36 19 bytes





                  ->n{n.to_s(32)[?4]}


                  Try it online!



                  Saved 17 bytes with @tsh's method.






                  share|improve this answer











                  $endgroup$













                  • $begingroup$
                    This returns true for 2207, which has a binary representation of 100010011111
                    $endgroup$
                    – Embodiment of Ignorance
                    23 mins ago










                  • $begingroup$
                    @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                    $endgroup$
                    – Doorknob
                    17 mins ago










                  • $begingroup$
                    I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                    $endgroup$
                    – tsh
                    14 mins ago












                  • $begingroup$
                    @tsh because I'm not as clever as you :)
                    $endgroup$
                    – Doorknob
                    10 mins ago










                  • $begingroup$
                    Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                    $endgroup$
                    – Embodiment of Ignorance
                    5 mins ago
















                  2












                  $begingroup$

                  Ruby, 36 19 bytes





                  ->n{n.to_s(32)[?4]}


                  Try it online!



                  Saved 17 bytes with @tsh's method.






                  share|improve this answer











                  $endgroup$













                  • $begingroup$
                    This returns true for 2207, which has a binary representation of 100010011111
                    $endgroup$
                    – Embodiment of Ignorance
                    23 mins ago










                  • $begingroup$
                    @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                    $endgroup$
                    – Doorknob
                    17 mins ago










                  • $begingroup$
                    I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                    $endgroup$
                    – tsh
                    14 mins ago












                  • $begingroup$
                    @tsh because I'm not as clever as you :)
                    $endgroup$
                    – Doorknob
                    10 mins ago










                  • $begingroup$
                    Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                    $endgroup$
                    – Embodiment of Ignorance
                    5 mins ago














                  2












                  2








                  2





                  $begingroup$

                  Ruby, 36 19 bytes





                  ->n{n.to_s(32)[?4]}


                  Try it online!



                  Saved 17 bytes with @tsh's method.






                  share|improve this answer











                  $endgroup$



                  Ruby, 36 19 bytes





                  ->n{n.to_s(32)[?4]}


                  Try it online!



                  Saved 17 bytes with @tsh's method.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 10 mins ago

























                  answered 56 mins ago









                  DoorknobDoorknob

                  54.9k17115352




                  54.9k17115352












                  • $begingroup$
                    This returns true for 2207, which has a binary representation of 100010011111
                    $endgroup$
                    – Embodiment of Ignorance
                    23 mins ago










                  • $begingroup$
                    @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                    $endgroup$
                    – Doorknob
                    17 mins ago










                  • $begingroup$
                    I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                    $endgroup$
                    – tsh
                    14 mins ago












                  • $begingroup$
                    @tsh because I'm not as clever as you :)
                    $endgroup$
                    – Doorknob
                    10 mins ago










                  • $begingroup$
                    Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                    $endgroup$
                    – Embodiment of Ignorance
                    5 mins ago


















                  • $begingroup$
                    This returns true for 2207, which has a binary representation of 100010011111
                    $endgroup$
                    – Embodiment of Ignorance
                    23 mins ago










                  • $begingroup$
                    @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                    $endgroup$
                    – Doorknob
                    17 mins ago










                  • $begingroup$
                    I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                    $endgroup$
                    – tsh
                    14 mins ago












                  • $begingroup$
                    @tsh because I'm not as clever as you :)
                    $endgroup$
                    – Doorknob
                    10 mins ago










                  • $begingroup$
                    Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                    $endgroup$
                    – Embodiment of Ignorance
                    5 mins ago
















                  $begingroup$
                  This returns true for 2207, which has a binary representation of 100010011111
                  $endgroup$
                  – Embodiment of Ignorance
                  23 mins ago




                  $begingroup$
                  This returns true for 2207, which has a binary representation of 100010011111
                  $endgroup$
                  – Embodiment of Ignorance
                  23 mins ago












                  $begingroup$
                  @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                  $endgroup$
                  – Doorknob
                  17 mins ago




                  $begingroup$
                  @EmbodimentofIgnorance That is the correct result, is it not? The second hand is 00100.
                  $endgroup$
                  – Doorknob
                  17 mins ago












                  $begingroup$
                  I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                  $endgroup$
                  – tsh
                  14 mins ago






                  $begingroup$
                  I don't speak Ruby. But why not ->n{n.to_s(32)=~/4/}?
                  $endgroup$
                  – tsh
                  14 mins ago














                  $begingroup$
                  @tsh because I'm not as clever as you :)
                  $endgroup$
                  – Doorknob
                  10 mins ago




                  $begingroup$
                  @tsh because I'm not as clever as you :)
                  $endgroup$
                  – Doorknob
                  10 mins ago












                  $begingroup$
                  Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                  $endgroup$
                  – Embodiment of Ignorance
                  5 mins ago




                  $begingroup$
                  Forgive me if I'm not understanding the question, but isn't the first hand of 2207 10001, the second 00111, and the third 11? None of them have their middle finger only up
                  $endgroup$
                  – Embodiment of Ignorance
                  5 mins ago











                  2












                  $begingroup$


                  Perl 6, 16 bytes





                  {.base(32)~~/4/}


                  Try it online!



                  Checks if there is a 4 in the base 32 representation of the number. Returns either Nil as false or a Match containing a 4.



                  You can prove this by the fact that $2^5 = 32$ so each digit is the state of each hand.





                  share









                  $endgroup$


















                    2












                    $begingroup$


                    Perl 6, 16 bytes





                    {.base(32)~~/4/}


                    Try it online!



                    Checks if there is a 4 in the base 32 representation of the number. Returns either Nil as false or a Match containing a 4.



                    You can prove this by the fact that $2^5 = 32$ so each digit is the state of each hand.





                    share









                    $endgroup$
















                      2












                      2








                      2





                      $begingroup$


                      Perl 6, 16 bytes





                      {.base(32)~~/4/}


                      Try it online!



                      Checks if there is a 4 in the base 32 representation of the number. Returns either Nil as false or a Match containing a 4.



                      You can prove this by the fact that $2^5 = 32$ so each digit is the state of each hand.





                      share









                      $endgroup$




                      Perl 6, 16 bytes





                      {.base(32)~~/4/}


                      Try it online!



                      Checks if there is a 4 in the base 32 representation of the number. Returns either Nil as false or a Match containing a 4.



                      You can prove this by the fact that $2^5 = 32$ so each digit is the state of each hand.






                      share











                      share


                      share










                      answered 7 mins ago









                      Jo KingJo King

                      23.7k257123




                      23.7k257123























                          1












                          $begingroup$

                          Regex (ECMAScript), 37 bytes



                          ^((?=(x+)(2{31}x*))3)*(x{32})*x{4}$



                          Try it online!



                          ^
                          (
                          (?=(x+)(2{31}x*)) # 2 = floor(tail / 32); 3 = tool to make tail = 2
                          3 # tail = 2
                          )* # Loop the above as many times as necessary to make
                          # the below match
                          (x{32})*x{4}$ # Assert that tail % 32 == 4





                          share|improve this answer











                          $endgroup$


















                            1












                            $begingroup$

                            Regex (ECMAScript), 37 bytes



                            ^((?=(x+)(2{31}x*))3)*(x{32})*x{4}$



                            Try it online!



                            ^
                            (
                            (?=(x+)(2{31}x*)) # 2 = floor(tail / 32); 3 = tool to make tail = 2
                            3 # tail = 2
                            )* # Loop the above as many times as necessary to make
                            # the below match
                            (x{32})*x{4}$ # Assert that tail % 32 == 4





                            share|improve this answer











                            $endgroup$
















                              1












                              1








                              1





                              $begingroup$

                              Regex (ECMAScript), 37 bytes



                              ^((?=(x+)(2{31}x*))3)*(x{32})*x{4}$



                              Try it online!



                              ^
                              (
                              (?=(x+)(2{31}x*)) # 2 = floor(tail / 32); 3 = tool to make tail = 2
                              3 # tail = 2
                              )* # Loop the above as many times as necessary to make
                              # the below match
                              (x{32})*x{4}$ # Assert that tail % 32 == 4





                              share|improve this answer











                              $endgroup$



                              Regex (ECMAScript), 37 bytes



                              ^((?=(x+)(2{31}x*))3)*(x{32})*x{4}$



                              Try it online!



                              ^
                              (
                              (?=(x+)(2{31}x*)) # 2 = floor(tail / 32); 3 = tool to make tail = 2
                              3 # tail = 2
                              )* # Loop the above as many times as necessary to make
                              # the below match
                              (x{32})*x{4}$ # Assert that tail % 32 == 4






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 10 mins ago

























                              answered 17 mins ago









                              DeadcodeDeadcode

                              1,7241419




                              1,7241419























                                  0












                                  $begingroup$


                                  Japt, 5 bytes



                                  sH ø4


                                  Try it online!



                                  Explanation



                                        // Implicit input
                                  sH // To a base-H (=32) string
                                  ø // Contains
                                  4 // 4 (JavaScript interprets this as a string)





                                  share|improve this answer









                                  $endgroup$


















                                    0












                                    $begingroup$


                                    Japt, 5 bytes



                                    sH ø4


                                    Try it online!



                                    Explanation



                                          // Implicit input
                                    sH // To a base-H (=32) string
                                    ø // Contains
                                    4 // 4 (JavaScript interprets this as a string)





                                    share|improve this answer









                                    $endgroup$
















                                      0












                                      0








                                      0





                                      $begingroup$


                                      Japt, 5 bytes



                                      sH ø4


                                      Try it online!



                                      Explanation



                                            // Implicit input
                                      sH // To a base-H (=32) string
                                      ø // Contains
                                      4 // 4 (JavaScript interprets this as a string)





                                      share|improve this answer









                                      $endgroup$




                                      Japt, 5 bytes



                                      sH ø4


                                      Try it online!



                                      Explanation



                                            // Implicit input
                                      sH // To a base-H (=32) string
                                      ø // Contains
                                      4 // 4 (JavaScript interprets this as a string)






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 13 mins ago









                                      ASCII-onlyASCII-only

                                      3,4601236




                                      3,4601236






























                                          draft saved

                                          draft discarded




















































                                          If this is an answer to a challenge…




                                          • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                          • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                            Explanations of your answer make it more interesting to read and are very much encouraged.


                                          • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.



                                          More generally…




                                          • …Please make sure to answer the question and provide sufficient detail.


                                          • …Avoid asking for help, clarification or responding to other answers (use comments instead).





                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f180481%2fam-i-a-rude-number%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

                                          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

                                          How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

                                          Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...