All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Digit Anagram II (Posted on 2019-01-29) Difficulty: 3 of 5
Prove that for every positive integer m there exists a positive integer k, such that 2km is a digit anagram of km.

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 3.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
seems true - here are examples, but no proof | Comment 1 of 11
To get some insight I found the smallest satisfying k for m=1,60.
I list them below and also give the program that generated them.

I believe there must be some recursion used in the proof because the same sequences keep recurring:  e.g 2517... 2148....
There are a lot of patterns below, even when digits begin to get used twice. 

A key to the recursion I think is the similar answers to m=1,2,3
(One km product can be shown to satisfy many m's.) But that's all I got so far. 


          m              k             km              2km
----------------------------------------------------------------------

           1      125874      125874      251748

           2       62937      125874      251748

           3       41958      125874      251748

           4      269631     1078524     2157048

           5      214857     1074285     2148570

           6       20979      125874      251748

           7       17982      125874      251748

           8      157338     1258704     2517408

           9       13986      125874      251748

          10      125874     1258740     2517480

          11       12987      142857      285714

          12       89877     1078524     2157048

          13       10989      142857      285714

          14        8991      125874      251748

          15       71619     1074285     2148570

          16       78669     1258704     2517408

          17       63972     1087524     2175048

          18        6993      125874      251748

          19       15039      285741      571482

          20       62937     1258740     2517480

          21        5994      125874      251748

          22       12987      285714      571428

          23       54243     1247589     2495178

          24       52446     1258704     2517408

          25       43497     1087425     2174850

          26       10989      285714      571428

          27        4662      125874      251748

          28       44955     1258740     2517480

          29       36306     1052874     2105748

          30       41958     1258740     2517480

          31       35082     1087542     2175084

          32       46206     1478592     2957184

          33        4329      142857      285714

          34       31986     1087524     2175048

          35       35451     1240785     2481570

          36       29959     1078524     2157048

          37        3402      125874      251748

          38       28233     1072854     2145708

          39        3663      142857      285714

          40      269631    10785240    21570480

          41       30429     1247589     2495178

          42        2997      125874      251748

          43       95409     4102587     8205174

          44       33543     1475892     2951784

          45       23873     1074285     2148570

          46       27369     1258974     2517948

          47       27342     1285074     2570148

          48       26223     1258704     2517408

          49       25461     1247589     2495178

          50      214857    10742850    21485700

          51       21324     1087524     2175048

          52       49752     2587104     5174208

          53       26469     1402857     2805714

          54        2331      125874      251748

          55       25587     1407285     2814570

          56       22959     1285704     2571408

          57        5013      285741      571482

          58       18153     1052874     2105748

          59        6993      412587      825174

          60       20979     1258740     2517480



        program anagram

        implicit none

        integer k,m,km,km2,d1,d2,flag

c note: I accidentally reversed the meaning of k and m w/o problem  

                do k=1,60

                do m=1,1000000

                km=k*m

                km2=2*k*m

                d1 = alog10(1.*km)

                d2 = alog10(1.*km2)

                flag=0

                if(d1.eq.d2)call ana(km,km2,d1,flag)

                   if(flag.eq.1)then

                   print*,k,m,km,km2

                   go to 1

                   endif

                enddo

1          enddo

           end


        subroutine ana(km,km2,d1,flag)

        implicit none

        integer i,km,km2,d1,flag,bin1(0:9),bin2(0:9),num1,num2,

        1 dig1,dig2

        flag=0

           do i=0,9

           bin1(i)=0

           bin2(i)=0

           enddo


        num1=km

        num2=km2

           do i=d1,0,-1

           dig1=num1/10**i

           dig2=num2/10**i

           bin1(dig1)=bin1(dig1)+1

           bin2(dig2)=bin2(dig2)+1

           num1=num1-dig1*10**i

           num2=num2-dig2*10**i

           enddo


           do i=0,9

           if(bin1(i).ne.bin2(i))go to 1

           enddo

        flag=1

1       return

        end

Edited on January 28, 2021, 10:34 pm
  Posted by Steven Lord on 2019-01-30 04:52:52

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (11)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information