An IMO inspired problem












14














This problem from IMO 1988 is said to be one of the most elegant ones in functional equations.



Problem : The function $f$ is defined on the set of all positive integers as follows:
begin{align}
f(1) = 1, f(3) &= 3, f(2n) = f(n), \
f(4n+1) &= 2f(2n+1) - f(n), \
f(4n+3) &= 3 f(2n+1) - 2f(n)
end{align}
Find the number of $n$ with $f(n) = n, 1 leq n leq 1988$.



The main idea towards the solution is realizing that these conditions stand for the fact that $f(n)$ just reverses the digits in the binary representation of the number $n$. So, essentially the solution is finding the number of binary pallindromes $leq 1988_{10}$.



My question is the following: How to reformulate the problem so that $f(n)$ reverses the digits of $n$ in its ternary representation. Or even better, can we reformulate it for a general base $k$?



Thanks.










share|cite|improve this question



























    14














    This problem from IMO 1988 is said to be one of the most elegant ones in functional equations.



    Problem : The function $f$ is defined on the set of all positive integers as follows:
    begin{align}
    f(1) = 1, f(3) &= 3, f(2n) = f(n), \
    f(4n+1) &= 2f(2n+1) - f(n), \
    f(4n+3) &= 3 f(2n+1) - 2f(n)
    end{align}
    Find the number of $n$ with $f(n) = n, 1 leq n leq 1988$.



    The main idea towards the solution is realizing that these conditions stand for the fact that $f(n)$ just reverses the digits in the binary representation of the number $n$. So, essentially the solution is finding the number of binary pallindromes $leq 1988_{10}$.



    My question is the following: How to reformulate the problem so that $f(n)$ reverses the digits of $n$ in its ternary representation. Or even better, can we reformulate it for a general base $k$?



    Thanks.










    share|cite|improve this question

























      14












      14








      14


      4





      This problem from IMO 1988 is said to be one of the most elegant ones in functional equations.



      Problem : The function $f$ is defined on the set of all positive integers as follows:
      begin{align}
      f(1) = 1, f(3) &= 3, f(2n) = f(n), \
      f(4n+1) &= 2f(2n+1) - f(n), \
      f(4n+3) &= 3 f(2n+1) - 2f(n)
      end{align}
      Find the number of $n$ with $f(n) = n, 1 leq n leq 1988$.



      The main idea towards the solution is realizing that these conditions stand for the fact that $f(n)$ just reverses the digits in the binary representation of the number $n$. So, essentially the solution is finding the number of binary pallindromes $leq 1988_{10}$.



      My question is the following: How to reformulate the problem so that $f(n)$ reverses the digits of $n$ in its ternary representation. Or even better, can we reformulate it for a general base $k$?



      Thanks.










      share|cite|improve this question













      This problem from IMO 1988 is said to be one of the most elegant ones in functional equations.



      Problem : The function $f$ is defined on the set of all positive integers as follows:
      begin{align}
      f(1) = 1, f(3) &= 3, f(2n) = f(n), \
      f(4n+1) &= 2f(2n+1) - f(n), \
      f(4n+3) &= 3 f(2n+1) - 2f(n)
      end{align}
      Find the number of $n$ with $f(n) = n, 1 leq n leq 1988$.



      The main idea towards the solution is realizing that these conditions stand for the fact that $f(n)$ just reverses the digits in the binary representation of the number $n$. So, essentially the solution is finding the number of binary pallindromes $leq 1988_{10}$.



      My question is the following: How to reformulate the problem so that $f(n)$ reverses the digits of $n$ in its ternary representation. Or even better, can we reformulate it for a general base $k$?



      Thanks.







      contest-math functional-equations






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Mar 16 '14 at 20:15









      Sandeep ThilakanSandeep Thilakan

      1,706615




      1,706615






















          1 Answer
          1






          active

          oldest

          votes


















          8














          In general for base $k$:



          $$ eqalign{f(kn ) &= f(n)cr
          f(k^2 n + a k + b) &= k f(kn+b) + a f(kn+1) - (k - a -1) f(n)cr}$$
          for $a = 0, ldots, k-1$, $b = 1, ldots, k-1$.






          share|cite|improve this answer























            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: "69"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fmath.stackexchange.com%2fquestions%2f714652%2fan-imo-inspired-problem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            8














            In general for base $k$:



            $$ eqalign{f(kn ) &= f(n)cr
            f(k^2 n + a k + b) &= k f(kn+b) + a f(kn+1) - (k - a -1) f(n)cr}$$
            for $a = 0, ldots, k-1$, $b = 1, ldots, k-1$.






            share|cite|improve this answer




























              8














              In general for base $k$:



              $$ eqalign{f(kn ) &= f(n)cr
              f(k^2 n + a k + b) &= k f(kn+b) + a f(kn+1) - (k - a -1) f(n)cr}$$
              for $a = 0, ldots, k-1$, $b = 1, ldots, k-1$.






              share|cite|improve this answer


























                8












                8








                8






                In general for base $k$:



                $$ eqalign{f(kn ) &= f(n)cr
                f(k^2 n + a k + b) &= k f(kn+b) + a f(kn+1) - (k - a -1) f(n)cr}$$
                for $a = 0, ldots, k-1$, $b = 1, ldots, k-1$.






                share|cite|improve this answer














                In general for base $k$:



                $$ eqalign{f(kn ) &= f(n)cr
                f(k^2 n + a k + b) &= k f(kn+b) + a f(kn+1) - (k - a -1) f(n)cr}$$
                for $a = 0, ldots, k-1$, $b = 1, ldots, k-1$.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Mar 17 '14 at 2:16

























                answered Mar 17 '14 at 1:26









                Robert IsraelRobert Israel

                319k23208458




                319k23208458






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics 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%2fmath.stackexchange.com%2fquestions%2f714652%2fan-imo-inspired-problem%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

                    1300-talet

                    1300-talet

                    Has there ever been an instance of an active nuclear power plant within or near a war zone?