1200 followers problem!

Consider a 1200 digit number N a = a a a a a a a 1200 a ’s N_a=\underbrace{aaaa\dots aaa}_{\text{1200 } a\text{'s} } .

Define φ a \varphi_a as the number of zeroes in the decimal representation of the quotient obtained when N a N_a is divided by 37.

Compute a = 1 9 φ a \displaystyle\sum_{a=1}^9 \varphi_a .


Bonus: Generalize this.


The answer is 4788.

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.

4 solutions

Nihar Mahajan
Jun 13, 2015

First observe that 37 111 37 \ | \ 111 and so 37 a a a 37 \ | \ \overline{aaa} .Since 1200 1200 is a multiple of 3 3 , N a N_a 's decimal representation can be grouped as 400 400 parts of a a a aaa .So , when N a N_a is divided by a a a \overline{aaa} the quotient will be 1001001001 001001 \overline{1001001001\dots 001001} with no remainder. Since a a a N a \overline{aaa} \ | \ N_a and 37 a a a 37 \ | \ \overline{aaa} , we have 37 N a 37 \ | \ N_a . Observe that :

37 × 3 = 111 37 × 6 = 222 37 × 9 = 333 37 × 12 = 444 37 × 15 = 555 37 × 18 = 666 37 × 21 = 777 37 × 24 = 888 37 × 27 = 999 37 \times 3 = 111 \\ 37 \times 6 = 222 \\ 37 \times 9 = 333 \\ 37 \times 12 = 444 \\ 37 \times 15 = 555 \\ 37 \times 18 = 666 \\ 37 \times 21 = 777 \\ 37 \times 24 = 888 \\ 37 \times 27 = 999

When a a a = 37 δ a \overline{aaa}=37\delta_a where δ a \delta_a is a one digit number of form 3 a a , 1 a 3 3a \forall \ a \ , \ 1\leq a \leq 3 , the quotient when N a N_a is divided by 37 37 will be of form δ a 00 δ a 00 δ a 00 δ a \overline{\delta_a00\delta_a00\delta_a\dots00\delta_a} where 00 δ a 00\delta_a appears 399 399 times , which means 0 0 appears ( 399 × 2 ) (399 \times 2) for 1 value of a a . Since 1 a 3 1\leq a \leq 3 we have :

a = 1 3 φ a = 399 × 6 \Rightarrow\Large\displaystyle\sum_{a=1}^3 \varphi_a= 399 \times 6

When a a a = 37 δ a \overline{aaa}=37\delta_a where δ a \delta_a is a two digit number of form 3 a a , 4 a 9 3a \forall \ a \ , \ 4\leq a \leq 9 , the quotient when N a N_a is divided by 37 37 will be of form δ a 0 δ a 0 δ a 0 δ a \overline{\delta_a0\delta_a0\delta_a\dots0\delta_a} where 0 δ a 0\delta_a appears 399 399 times , which means 0 0 appears ( 399 ) t i m e s (399) \ times for 1 value of a a . Since 4 a 9 4\leq a \leq 9 , we have:

a = 4 9 φ a = 399 × 6 \Rightarrow\Large\displaystyle\sum_{a=4}^9 \varphi_a =399 \times 6

a = 1 9 φ a = 2 ( 399 × 6 ) = 399 × 12 = 4788 \Rightarrow\Large\displaystyle\sum_{a=1}^9 \varphi_a = 2(399\times 6) = 399\times 12 = \boxed{4788}

So, a stronger generalization would be, for a x x -digit number N a N_a where 3 x 3\mid x and N a N_a is defined for a Z 9 + a\in\Bbb{Z^+_{\leq 9}} as given in the problem, we have,

φ a = { 2 ( x 3 1 ) 1 a 3 x 3 1 4 a 9 \varphi_a=\begin{cases}\begin{array}{ccc}2\left(\dfrac x3-1\right)&\forall&1\leq a\leq 3\\ \dfrac x3-1&\forall&4\leq a\leq 9\end{array}\end{cases}

Now, consider S x \mathcal{S_x} as the sum of all φ i \varphi_i 's for N x N_x . We have,

S x = k = 1 9 φ k = ( k = 1 3 2 ( x 3 ) 3 ) + ( k = 4 9 x 3 3 ) S x = 2 3 ( 3 x 9 ) + 1 3 ( 6 x 18 ) = 2 x 6 + 2 x 6 S x = 4 x 12 = 4 ( x 3 ) \mathcal{S_x}=\sum_{k=1}^9\varphi_k=\left(\sum_{k=1}^3\frac{2(x-3)}{3}\right)+\left(\sum_{k=4}^9\frac{x-3}{3}\right)\\ \implies \mathcal{S_x}=\frac 23(3x-9)+\frac 13(6x-18)=2x-6+2x-6\\ \implies \boxed{\mathcal{S_x}=4x-12=4(x-3)}


The problem posed here is finding the value of S 1200 \mathcal{S}_{1200} which can easily be evaluated to be 4788 4788 .

Prasun Biswas - 6 years ago

Log in to reply

Yes , you have answered the bonus question! Nice work!

Nihar Mahajan - 6 years ago

Who downvoted your comment?

Nihar Mahajan - 6 years ago

Log in to reply

Obviously someone who either doesn't like me or found some flaw in my work.

Prasun Biswas - 6 years ago

Good question, and congrats for 1200 followers

Mr X - 5 years, 11 months ago

Log in to reply

Thanks! :)

Nihar Mahajan - 5 years, 11 months ago
Cody Johnson
Jun 14, 2015

a a a / 37 = 3 a aaa/37=3\cdot a . For 1200 3 1 = 399 \frac{1200}{3}-1=399 of the a a a aaa 's, the leading zeros appear. There are no trailing zeros of 3 a 3a for 1 a 9 1\le a\le9 , so just count leading zeros. 1 a 3 1\le a\le3 gives 2 2 leading zeros of 3 a 3a ; 4 a 9 4\le a\le9 gives 1 1 leading zeros of 3 a 3a . So it's 399 ( 2 ( 3 1 + 1 ) + 1 ( 9 4 + 1 ) ) = 4788 399\cdot(2\cdot(3-1+1)+1\cdot(9-4+1))=4788

Terry Smith
Jun 15, 2015

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 ) = n n n 37 = 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 400 1 ) = ( 2400 6 ) " 0 s " . T o t a l 4800 12 = 4788 " 0 s " . For ~integer~P_n=nnn, ~~f(n)=\dfrac {nnn}{37}=3*n.\\\text{ THREE member Group A, n=1 2, 3, f(n )is only one digit number,} \\\text { and has TWO leading 0's.} \\ \text{SIX member Group B, n=4, 5, . . . , 9, f(n) is two digit number,} \\ \text {and has ONE leading 0.}\\ \text{ There are 400 groups of nnn in }P_n.\\ \text {In Group A, 2 * 400 " 0s " for each member, BUT} \\ \text{first two "0s" being leading "0s" of } P_n~~itself,~~has~ to~ be~ eliminated. \\\text {So Group A contribute 3 * (2 * 400-2)= (2400-6) " 0s ".} \\ \text {SIX member Group B, in similar fashon,}\\ contribute~~ to~~ 6 * ( 1 * 400 -1)=(2400-6) " 0s ".\\Total~~ 4800-12=~~~~~~~~~~~{ \huge \color{#D61F06}{4788} }~~ " 0s ". \\~~\\ 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

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...