I am perplexed

Let N N be a 2 n 2n digit number with digits d 1 , d 2 , d 3 , . . . , d 2 n d_{1},d_{2},d_{3},...,d_{2n} from left to right i . e i.e N = d 1 d 2 . . . . d 2 n N= \overline {d_{1}d_{2}....d_{2n}} where d p d_{p} is not equal to 0 0 , p = 1 , 2 , . . . , 2 n p=1,2,...,2n . Find the number of such N N so that the sum q = 1 n d 2 q 1 × d 2 q = e v e n \sum_{q=1}^{n}d_{2q-1} \times d_{2q}=even for n = 7 n=7 .


The answer is 11452152534536.

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.

2 solutions

Shivam Jadhav
Mar 27, 2016

d 1 , d 2 , . . . . . d 2 n d_{1},d_{2},.....d_{2n} can be from 1 , 2 , 3 , 4 , . . . , 9 1,2,3,4,...,9 only

j = 1 n d 2 j 1 d 2 j \sum_{j=1}^{n}d_{2j-1}d_{2j} is even If

( 1 ) (1) all the n n terms are even

( 2 ) (2) the number of odd terms in the sum is even

d 2 j 1 d 2 j d_{2j-1}d_{2j} is even if

( 1 ) (1) both d 2 j 1 d 2 j d_{2j-1}d_{2j} are even . There are 16 choices for this

( 2 ) (2) one of them is odd the other one is even ; there are 2 ( 5 ) ( 4 ) = 40 2(5)(4)=40 choices for this d 2 j 1 d_{2j-1} could be odd and d 2 j d_{2j} even or vice versa ).

Note d 2 j 1 d 2 j d_{2j-1}d_{2j} is odd for 25 25 choices .

For the sum to be even , an even number of such products must be odd . Number of ways in which k k of the n n terms are odd and the rest are even is ( n k ) . 2 5 k ( 56 ) n k \binom{n}{k}.25^{k}(56)^{n-k} .

Total sum is even if k s k's are even .

Total number of ways

P n = k = 0 [ n 2 ] ( n 2 k ) 2 5 2 k 5 6 n 2 k P_{n}=\sum_{k=0}^{[\frac{n}{2}]}\binom{n}{2k}25^{2k}56^{n-2k}

Here [ . ] [.] represents floor function.

Let Q n = k = 0 [ n 2 ] ( n 2 k + 1 ) 2 5 2 k + 1 5 6 n 2 k 1 Q_{n}= \sum_{k=0}^{[\frac{n}{2}]}\binom{n}{2k+1}25^{2k+1}56^{n-2k-1}

P n + Q n = ( 56 + 25 ) n P_{n}+Q_{n}=(56+25)^{n}

P n Q n = ( 56 25 ) n P_{n}-Q_{n}=(56-25)^{n}

Hence P n = 8 1 n + 3 1 n 2 P_{n}=\frac{81^{n}+31^{n}}{2} Now for n = 7 , P n = 11452152534536 n=7,P_{n}=11452152534536

Nicola Mignoni
Jun 26, 2020

The n n terms in the sum are the products of couples of digits, from 1 1 to 9 9 . Given d d digits, the number of even products E ( d ) E(d) and odd products O ( d ) O(d) out of the d 2 d^2 couples are

E ( d ) = d d 2 + d 2 d 2 = d 2 ( d + d 2 ) \displaystyle E(d)=d\bigg\lfloor \frac{d}{2} \bigg\rfloor + \bigg\lceil \frac{d}{2} \bigg\rceil \bigg\lfloor \frac{d}{2} \bigg\rfloor = \bigg\lfloor \frac{d}{2} \bigg\rfloor \bigg(d + \bigg\lceil \frac{d}{2} \bigg\rceil\bigg)

O ( d ) = d 2 2 \displaystyle O(d)= \bigg\lceil \frac{d}{2} \bigg\rceil ^2

This is easy to see putting the digits in a d × d d \times d matrix.

Hence, the formula in @Shivam Jadhav's solution becomes

P n = k = 0 n 2 ( n 2 k ) E ( d ) n 2 k O ( d ) 2 k = k = 0 n 2 ( n 2 k ) [ d 2 ( d + d 2 ) ] n 2 k d 2 4 k \displaystyle P_n = \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} E(d)^{n-2k}O(d)^{2k} = \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}\bigg[\bigg\lfloor \frac{d}{2} \bigg\rfloor \bigg(d + \bigg\lceil \frac{d}{2} \bigg\rceil\bigg)\bigg]^{n-2k} \bigg\lceil \frac{d}{2} \bigg\rceil ^{4k}

for n n odd.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...