mersenneforum.org exponential growth patterns
 Register FAQ Search Today's Posts Mark Forums Read

 2015-10-03, 20:35 #1 MattcAnderson     "Matthew Anderson" Dec 2010 Oregon, USA 13×73 Posts exponential growth patterns Hi Math People, Are there integers n and m such that 2^m and 2^n have the same number of digits and the sum of the digits for 2^n and 2^m is the same? Maple code > a := Vector(30); > for b to 30 do a[b] := 2^b end do; > > print(n, 2^n, "numdigits in", 2^n, digitsum*of*2^n); for c to 30 do print(c, a[c], floor(log10(a[c]))+1, add(k, k = convert(a[c], base, 10))) end do; Regards, Matt
2015-10-03, 20:51   #2
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by MattcAnderson Hi Math People, Are there integers n and m such that 2^m and 2^n have the same number of digits and the sum of the digits for 2^n and 2^m is the same? Maple code > a := Vector(30); > for b to 30 do a[b] := 2^b end do; > > print(n, 2^n, "numdigits in", 2^n, digitsum*of*2^n); for c to 30 do print(c, a[c], floor(log10(a[c]))+1, add(k, k = convert(a[c], base, 10))) end do; Regards, Matt
well if 2^n and 2^m are the same number of digits n and m can't differ by more than 3 at last check since 2^4 >10
we then have the cases:

m=n+1 \\ 2^m=2*2^n
m=n+2 \\ 2^m= 4*2^n
m=n+3 \\ 2^m= 8*2^n

so it then comes down to how many digits affect others because:
1) 1 won't go past ten under anything but a carry from another place.
2) 2, won't go past ten except in that 3rd case or a carry.
3) 3 and 4 only break past ten in all but the first case of the three above or a carry
4) the rest go past ten regardless and 5 only affects 1 when it's the second case or higher, etc.

Last fiddled with by science_man_88 on 2015-10-03 at 20:52

2015-10-03, 21:00   #3
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

2·3·11·23 Posts

Quote:
 Originally Posted by MattcAnderson Hi Math People, Are there integers n and m such that 2^m and 2^n have the same number of digits and the sum of the digits for 2^n and 2^m is the same? Maple code > a := Vector(30); > for b to 30 do a[b] := 2^b end do; > > print(n, 2^n, "numdigits in", 2^n, digitsum*of*2^n); for c to 30 do print(c, a[c], floor(log10(a[c]))+1, add(k, k = convert(a[c], base, 10))) end do; Regards, Matt
There is only trivial solution (n=m). Let s(k) the sum of the digits of k, then s(k)-k is divisible by 9, so if s(2^n)=s(2^m) then 9 divides 2^m-2^n, say n<m there are only at most 3 possible cases (if 2^n and 2^m has the same number of digits): m=n+1,n+2,n+3. For these 2^m-2^n={1,3,7}*2^n so not divisible by 9.

 2015-10-04, 02:33 #4 LaurV Romulan Interpreter     "name field" Jun 2011 Thailand 265016 Posts Ye spoiled all the fun...

 Similar Threads Thread Thread Starter Forum Replies Last Post CuriousKit Miscellaneous Math 24 2015-04-06 18:40 Xyzzy mersennewiki 1 2010-12-01 23:05 davieddy Puzzles 10 2010-05-25 03:43 wustvn Puzzles 7 2008-11-20 14:00 SK8ER-91823 Twin Prime Search 4 2007-04-14 12:52

All times are UTC. The time now is 00:17.

Mon Nov 29 00:17:57 UTC 2021 up 128 days, 18:46, 0 users, load averages: 1.00, 1.16, 1.20