i was doing this ques and i find it quiet interesting
Find all 7 digit nos made from 5 and 7 such that they are divisible by 5 and 7 both
I wonder what the first 6 digits are :P
what do u mean made from 5 and 7
yea last digit will be 5 :)
yeah units digit has to be 5 xxx xxx 5 I guess rest of the 6 digits must be found from divisibility rule of 7
i mean like this- 5757575 555557 7 digit nos having only 5 and 7
ah okay :)
oaky so lets start somewhere
\(\sum\limits_{i=0}^{6}a_i10^i \equiv \sum\limits_{i=0}^{6}a_i 3^i \pmod{7} \) \(a_0 = 5\)
i think like umm lets take an example- in this case we are considering only 4 digits number made from 5 and 7 so let the number be abcd so d=5 and abcd=1000a+100b+10c+5 this is divisible by 7 so\[\frac{ 1000a }{ 7}+\frac{ 100b }{ 7 }+\frac{ 10c }{ 7 }+\frac{ 5}{ 7}=abcd\] we need to get rid of that 5/7 so if we can a 30/7 from 1000a/7 +100b/7 +10c/7 then we can get rid of it cause 30/7+5/7=5 :) so basically we need to find number of total combinations following this logic
the number of possiblities for the 6 digits is the same as the number of 6 digit binary numbers
that wuld be abcd/7 and not abcd
\(\sum\limits_{i=0}^{6}a_i10^i \\~\\ \equiv \sum\limits_{i=0}^{6}a_i 3^i \\~\\ \equiv a_0 + 3a_1+2a_2 -a_3 - 3a_4-2a_5+a_6 \pmod{7} \) and we know that \(a_0 = 5\)
so you want to choose \(a_1, \ldots, a_6\) such that the expression, \(5 + 3a_1+2a_2 -a_3 - 3a_4-2a_5+a_6\) is divisible by \(7\)
I don't see an easy way to figure out all those 6 coefficients using just one eqn..
I was trying to figure out the second digit this way by looking at this \[(2n+1)35 \equiv 70n+35\mod 100\] since our number must be an odd multiple of 35 in order to have the last digit remain 5. The only values of n that will work are when: \[n \equiv 2 \mod 10\] or \[n \equiv 6 \mod 10\] then I did a mini fourier transform of two terms to interpolate the cases: \[ n = 4 +(-1)^k\] so k=0 when n=2 and k=1 when n=6 and I plugged this in: \[ 70n+35 \equiv 70(4+(-1)^k)+35 \equiv 350 +(-1)^k 70 +35\mod 100\] Maybe writing mod 100 is inappropriate, I'm slowly building up the pieces although this is probably a tough and confusing road to walk. lol
nice, but i know the answer, second digit is either 5 or 7 :P
Yeah of course what am I thinking lol.
nice, but i know the answer, second digit is either 5 or 7 :P neither has 100% probability for sure
In my mind I'm thinking of looking for a way to sift out the numbers from 5555555 to 5777777 that are divisible by 35.
Wow that's dyslexia probably
In my mind I thought 7777775 to 5555555 and thought, oh that's backwards and then I flipped it haha
Ahh I think that might work if we consider binary number system, but we're considering decimal.. so we don't really have any easy hold on how many "decimal" numbers are divisible by 35 that use only the digits 5 and 7
Yeah beats me for right now, kinda just playing around. I am not to good with fermat's little theorem but I immediately thought we could do something clever with divisibility since we know: \[35=6^2-1\] I have this sixth sense when it comes to geometric series, I'm always looking for something that's like 1 less than a power xD
Can we start at 5555555 and somehow rule out how to add \(2*10^k\) to it in multiple ways?
It's kinda like an array of booleans or something
Or is this the binary number thing you were talking about earlier that I somehow missed out on :O
i ended up making a tree .-.
ok it worked :) first solution 7555555
ok all solusions 7555555 7755755 5557755 5755575 7775775 5757775 5577775
ok so i have figured it out u guys want hint or solution and ikram u got most of solutions and the second last is wrong
ugh lol
ok waiting ur solution :)
ok :) we know that the last digit is 5 now we need to find the 6digits if the number is divisible by 7 then if we replace the all the 7s in number with 0 still the number has to be divisible by 7. for example- 5577775 is divisible by 7 and 5577775=5500005+77770 we know that 77770 is divisible by 7 so 5500005 has to be divisible by 7 so each number is formed by adding some numbers from the set- {50, 500,5000, 50000, 500000, 5000000} along with 5 (: now lets see what remainders we get on dividing the numbers frm the set by 7 the respective remainders are-{1,3,2,6,4,5} now its sufficient to check the remainders which add up to a number of form 2+7k since the last digit is already 5. putting k=0,1..... we get the remainders which add up to 2+7k form--->{2}, {3,6} , {4,5}, {2,3,4}, {1,3,5}, {1,2,6}, {2,3,5,6}, {1,4,5,6}, {1,2,3,4,6} these correspond to these numbers- 7775775 7757575 5577775 7575575 5777555 7755755 5755575 5557755 7555555 :)
nice :) good work
very clean explanation
thanks :)
Brute force check: Select[Map[FromDigits, Select[Permutations[{5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7}, 7], Length[#] == 7 &]], Divisible[#, 7] && Divisible[#, 5] &] {5557755, 5577775, 5755575, 5777555, 7555555, 7575575, 7755755, 7757575, 7775775}
Join our real-time social learning platform and learn together with your friends!