![]() |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#12 | |
|
Jun 2003
505210 Posts |
Quote:
If we consider n lower order digits, they cycle with a periodicity 5^(n-1). So you need to find an n such that all 5^(n-1) residues turn up bad -- then that will constitute a rigorous proof. If we assume the digits of a residue (except the final 6) are randomly distributed, the probability of a given residue being good is (6/10)^(n-1). There are 5^(n-1) such residues. So on average, you expect (6/10)^(n-1) * 5^(n-1) = 3^(n-1) good residues. This is diverging. This approach is not going to work. Last fiddled with by axn on 2020-08-30 at 14:19 Reason: Removed example. LaurV got it on his own |
|
|
|
|
|
|
#13 | |
|
Romulan Interpreter
Jun 2011
Thailand
100101100010112 Posts |
Quote:
![]() ... Yep, we figured out as much
Last fiddled with by LaurV on 2020-08-30 at 14:27 |
|
|
|
|
|
|
#14 |
|
"Dylan"
Mar 2017
3×193 Posts |
This looked like an interesting problem to code up in Python. Here is one code snippet that does the search brute force, like the OP did:
Code:
#Challenge - find a power of 2 such that it does not have a power of 2 digit in its decimal expansion.
#we have a hint: the number is a power of 16, so we need to consider numbers of the form 2^4m
#but not m = 0, since 4m = 0, and 2^0 = 1, which implies 1 is a power of two.
#so we can start the search from m = 1
#a known solution is 65536 = 2^16, are there any more?
m = 1
while m<=100000:
p = 4*m
num = pow(2,p)
decimalexpansion = str(num)
length = len(decimalexpansion) #number of digits in the decimal expansion of 2^4m
goodchar = 0 #number of digits that aren't 1,2,4 or 8
for char in decimalexpansion:
if char == "1" or char == "2" or char == "4" or char == "8":
#we have found a power of 2 in the expansion, so this m is no good
#increment m and reset goodchar.
m += 1
goodchar = 0
break
else:
#increment goodchar
goodchar += 1
#did we reach the end of the number without finding a 1, 2, 4 or 8?
if goodchar == length:
#print the p and m value, increment m, reset goodchar, and break out of the for loop
print(p, ", ", m)
m += 1
goodchar = 0
break
else:
#keep going in the loop
continue
|
|
|
|
|
|
#15 | |
|
Jun 2003
13BC16 Posts |
Quote:
For example: Code:
Mod(16,10^52)^449745173682458698749542266945460 = 2907070905095635370900390399505557009995060033355776 (51 digits) |
|
|
|
|
|
|
#16 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
Quote:
Code:
? Mod(2,10^50)^5342684466535587793434484498741672 %26 = Mod(96996666999996996999999996669699999969969696669696, 100000000000000000000000000000000000000000000000000) |
|
|
|
|
|
|
#17 |
|
"Viliam FurÃk"
Jul 2018
Martin, Slovakia
2·3·5·19 Posts |
I did code it in Python, too:
Code:
f = open("strp.txt", "a")
def check(strp):
for a in strp:
if a == "1" or a == "2" or a == "4" or a == "8":
return 1
return 0
def nonpower2(a, b):
p = 16 ** a
strp = str(p)
if check(strp) == 0:
print(strp)
f.write("\n")
f.write(strp)
f.write("\n")
for x in range(a, b):
p *= 16
strp = str(p)
if check(strp) == 0:
print(strp)
f.write("\n")
f.write(strp)
f.write("\n")
|
|
|
|
|
|
#18 |
|
Feb 2017
Nowhere
110438 Posts |
Although periodicity goes out the window, and again it can never lead to a proof, Benford's Law tells us that the proportion of n for which the block of k leading digits is lacking a given nonempty proper subset of the decimal digits, tends to 0 as k increases without bound. For each k > 1, however, there will be a positive proportion of n's whose leading block of k digits lacks the digits in the given subset. (I say k > 1 to allow for the exceptional case that the leading digit is never 0.)
For k = 1, the proportion of n for which 2^n has a leading digit of 1, 2, 4 or 8 is log(2/1)/log(10) + log(3/2)/log(10)+log(5/4)/log(10)+log(9/8)/log(10) or 0.62518, approximately, and 2^n has a leading digit of 3, 5, 6, 7, or 9 for the other log(4/3)/log(10) + log(6/5)/log(10) + log(7/6) + log(8/7)/log(10) + log(10/9)/log(10) = .37482 approximately of n's. |
|
|
|
|
|
#19 | |
|
Aug 2006
175B16 Posts |
Quote:
[code]ok(n)=#setintersect(Set(digits(n)),[1,2,4,8])==0 do(N)=sum(n=3*10^(N-1),10^N-1,if(ok(n), log(1+1/n)/log(10))) |
|
|
|
|
|
|
#20 | |
|
Feb 2017
Nowhere
4,643 Posts |
Quote:
Since for x > 0 we have log(1+x) < x, the sum S is less than (number of terms)(largest term), S < 5*6N-1/(3*10N-1) = (3/5)N-2. Even this ludicrously conservative upper bound tends to 0 as N increases without bound. If 0 < x < 1 we have log(1 + x) > x/2, which gives the lower bound (5*6N-1)(1/2)10-N or S > (1/4)(3/5)N-1. Last fiddled with by Dr Sardonicus on 2020-09-01 at 12:31 Reason: xifnig spoty; awkward phrasing |
|
|
|
|
|
|
#21 |
|
Aug 2006
135338 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TDP as power used? | CRGreathouse | Hardware | 9 | 2016-02-06 18:46 |
| How much power am I really using? | petrw1 | Lounge | 19 | 2013-12-13 13:00 |
| Power 2 | JohnFullspeed | Miscellaneous Math | 45 | 2011-07-10 20:13 |
| mPrime doesn't use 100% of CPU-Power | Salamander89 | Software | 5 | 2009-12-01 03:10 |
| IBM Power 6 | Unregistered | Information & Answers | 7 | 2008-08-30 14:36 |