Consider a 1200 digit number N a = 1200 a ’s a a a a … a a a .
Define φ a as the number of zeroes in the decimal representation of the quotient obtained when N a is divided by 37.
Compute a = 1 ∑ 9 φ a .
Bonus: Generalize this.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
So, a stronger generalization would be, for a x -digit number N a where 3 ∣ x and N a is defined for a ∈ Z ≤ 9 + as given in the problem, we have,
φ a = ⎩ ⎨ ⎧ 2 ( 3 x − 1 ) 3 x − 1 ∀ ∀ 1 ≤ a ≤ 3 4 ≤ a ≤ 9
Now, consider S x as the sum of all φ i 's for N x . We have,
S x = k = 1 ∑ 9 φ k = ( k = 1 ∑ 3 3 2 ( x − 3 ) ) + ( k = 4 ∑ 9 3 x − 3 ) ⟹ S x = 3 2 ( 3 x − 9 ) + 3 1 ( 6 x − 1 8 ) = 2 x − 6 + 2 x − 6 ⟹ S x = 4 x − 1 2 = 4 ( x − 3 )
The problem posed here is finding the value of S 1 2 0 0 which can easily be evaluated to be 4 7 8 8 .
Log in to reply
Yes , you have answered the bonus question! Nice work!
Who downvoted your comment?
Log in to reply
Obviously someone who either doesn't like me or found some flaw in my work.
Good question, and congrats for 1200 followers
a a a / 3 7 = 3 ⋅ a . For 3 1 2 0 0 − 1 = 3 9 9 of the a a a 's, the leading zeros appear. There are no trailing zeros of 3 a for 1 ≤ a ≤ 9 , so just count leading zeros. 1 ≤ a ≤ 3 gives 2 leading zeros of 3 a ; 4 ≤ a ≤ 9 gives 1 leading zeros of 3 a . So it's 3 9 9 ⋅ ( 2 ⋅ ( 3 − 1 + 1 ) + 1 ⋅ ( 9 − 4 + 1 ) ) = 4 7 8 8
Cheated again. I'm totally ashamed. Wait, no I'm not.
a = []
a << ('1' * 1 200).to i
a << ('2' * 1 200).to i
a << ('3' * 1 200).to i
a << ('4' * 1 200).to i
a << ('5' * 1 200).to i
a << ('6' * 1 200).to i
a << ('7' * 1 200).to i
a << ('8' * 1 200).to i
a << ('9' * 1 200).to i
b = []
a.each{|l|b << l / 37}
b.map!{|l|l.to_s.split('')}
c=0
b.each{|lob|
c += lob.inject(0){|cs,l|l == '0' ? cs+1 : cs}
}
puts c
F o r i n t e g e r P n = n n n , f ( n ) = 3 7 n n n = 3 ∗ n . THREE member Group A, n=1 2, 3, f(n )is only one digit number, and has TWO leading 0’s. SIX member Group B, n=4, 5, . . . , 9, f(n) is two digit number, and has ONE leading 0. There are 400 groups of nnn in P n . In Group A, 2 * 400 " 0s " for each member, BUT first two "0s" being leading "0s" of P n i t s e l f , h a s t o b e e l i m i n a t e d . So Group A contribute 3 * (2 * 400-2)= (2400-6) " 0s ". SIX member Group B, in similar fashon, c o n t r i b u t e t o 6 ∗ ( 1 ∗ 4 0 0 − 1 ) = ( 2 4 0 0 − 6 ) " 0 s " . T o t a l 4 8 0 0 − 1 2 = 4 7 8 8 " 0 s " . Generalisation:-\\P_m ~and~ Q_m~\text{are m digit numbers. N, a n digit number is}\\ \text {made up by repeatedly filling P_m or its part from the left.} \\\text {Find how many X are there if n is divided by Q_m.} \\ \text{N should be big enough to be out of reach of a calculator,}\\ \text {Q_m|P_m, and X any of 0 to 9 digits.} \\\text{Example:-{m=2, n=9, X=5}..}\\\text{A 9 digit number N is made up by filled with 51 or its part.} \\ \text{ Find number of 5 in N divided by 3.}\\Solution:-\dfrac {151515151} 3 =50505050.33~\implies~FOUR~~5s
Problem Loading...
Note Loading...
Set Loading...
First observe that 3 7 ∣ 1 1 1 and so 3 7 ∣ a a a .Since 1 2 0 0 is a multiple of 3 , N a 's decimal representation can be grouped as 4 0 0 parts of a a a .So , when N a is divided by a a a the quotient will be 1 0 0 1 0 0 1 0 0 1 … 0 0 1 0 0 1 with no remainder. Since a a a ∣ N a and 3 7 ∣ a a a , we have 3 7 ∣ N a . Observe that :
3 7 × 3 = 1 1 1 3 7 × 6 = 2 2 2 3 7 × 9 = 3 3 3 3 7 × 1 2 = 4 4 4 3 7 × 1 5 = 5 5 5 3 7 × 1 8 = 6 6 6 3 7 × 2 1 = 7 7 7 3 7 × 2 4 = 8 8 8 3 7 × 2 7 = 9 9 9
When a a a = 3 7 δ a where δ a is a one digit number of form 3 a ∀ a , 1 ≤ a ≤ 3 , the quotient when N a is divided by 3 7 will be of form δ a 0 0 δ a 0 0 δ a … 0 0 δ a where 0 0 δ a appears 3 9 9 times , which means 0 appears ( 3 9 9 × 2 ) for 1 value of a . Since 1 ≤ a ≤ 3 we have :
⇒ a = 1 ∑ 3 φ a = 3 9 9 × 6
When a a a = 3 7 δ a where δ a is a two digit number of form 3 a ∀ a , 4 ≤ a ≤ 9 , the quotient when N a is divided by 3 7 will be of form δ a 0 δ a 0 δ a … 0 δ a where 0 δ a appears 3 9 9 times , which means 0 appears ( 3 9 9 ) t i m e s for 1 value of a . Since 4 ≤ a ≤ 9 , we have:
⇒ a = 4 ∑ 9 φ a = 3 9 9 × 6
⇒ a = 1 ∑ 9 φ a = 2 ( 3 9 9 × 6 ) = 3 9 9 × 1 2 = 4 7 8 8