The Horror of the Nested Sum

A nested sum is one in which one summation is inside another. Let the function f ( m , n ) f(m,n) be equal to the nested sum a 1 = 1 m ( a 2 = 1 a 1 ( a 3 = 1 a 2 ( ( a n 1 = 1 a n 2 ( a n = 1 a n 1 a n ) ) ) ) ) . \displaystyle \sum_{a_1=1}^{m} \left(\displaystyle \sum_{a_2=1}^{a_1} \left(\displaystyle \sum_{a_3=1}^{a_2} \left(\cdots \left(\displaystyle \sum_{a_{n-1}=1}^{a_{n-2}} \left(\displaystyle \sum_{a_n=1}^{a_{n-1}} a_n\right)\right)\cdots\right)\right)\right). For how many values of n 1000 n\leq 1000 will f ( m , n ) f ( m + 1 , n ) f(m,n)|f(m+1,n) if m = 11 m=11 ?


The answer is 91.

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.

1 solution

First, note that f ( m , n ) f(m,n) can be defined recursively as follows. { f ( m , n ) = m 1 if n = 1 f ( m , n ) = k = 1 m 1 f ( m k , n 1 ) if n > 0 \begin{cases} f(m, n)= m-1 & \text{if } n=1 \\ f(m, n) = \sum \limits_{k=1}^{m-1} f(m-k, n-1) & \text{if } n>0 \end{cases} We try to find another function which satisfies the same recursion.

Let g ( m , n ) g(m, n) denote the number of positive integer solutions to the equation a 1 + a 2 + + a n + 1 = m a_1 + a_2 + \cdots + a_{n+1}= m . Note that when n = 1 n=1 , g ( m , n ) g(m,n) is simply the number of positive integer solutions to a 1 + a 2 = m a_1+a_2= m . Each choice of a 1 a_1 determines a unique a 2 a_2 , and a 1 a_1 must lie in the range [ 1 , m 1 ] [1, m-1] for both a 1 a_1 and m a 1 m-a_1 to be positive, which shows that g ( m , 1 ) = m 1 g(m, 1)= m-1 .

We shall now show that g ( m , n ) = k = 1 n 1 g ( m k , n 1 ) g(m,n)= \sum \limits_{k=1}^{n-1} g(m-k, n-1) . Consider the equation a 1 + a 2 + + a n + 1 = m a_1 + a_2 + \cdots + a_{n+1}= m . Let's say we fix the variable a n + 1 a_{n+1} . If a n + 1 = 1 a_{n+1}=1 , the equation becomes a 1 + a 2 + + a n = m 1 a_1+a_2+\cdots + a_n= m-1 , which has g ( m 1 , n 1 ) g(m-1, n-1) solutions by our definition. Similarly, if a n + 1 = 2 a_{n+1}= 2 , the equation becomes a 1 + a 2 + + a n = m 2 a_1+a_2+\cdots + a_n= m-2 , which has g ( m 2 , n 1 ) g(m-2, n-1) solutions. In general, if a n + 1 = k a_{n+1}=k , the equation a 1 + a 2 + + a n = m k a_1 + a_2 + \cdots + a_n = m-k has g ( m k , n 1 ) g(m-k, n-1) solutions. Since a n + 1 { 1 , 2 , , m 1 } a_{n+1} \in \{1, 2, \cdots , m-1\} , we conclude that g ( m , n ) = k = 1 m 1 g ( k 1 , n 1 ) g(m, n) = \sum \limits_{k=1}^{m-1} g(k-1, n-1) .

Notice that g ( m , n ) g(m, n) has the same initial values of f ( m , n ) f(m, n) and they both follow the same recursion. A simple inductive argument shows that f ( m , n ) f(m, n) and g ( m , n ) g(m, n) are identically equal. But from stars and bars formula, we know that g ( m , n ) = ( m + n n + 1 ) g(m, n)= \dbinom{m+n}{n+1} . Hence, f ( m , n ) = ( m + n n + 1 ) ( m , n ) N 2 f(m, n)= \dbinom{m+n}{n+1} \ \forall \ (m, n) \in \mathbb{N}^2 .

Then, note that f ( 12 , n ) f ( 11 , n ) = ( 12 + n n + 1 ) ( 11 + n n + 1 ) = ( 12 + n ) ! 11 ! ( 11 + n ) ! 10 ! = 12 + n 11 . \dfrac{f(12,n )}{f(11, n)}= \dfrac{\dbinom{12+n}{n+1}}{\dbinom{11+n}{n+1}} = \dfrac{\dfrac{(12+n)!}{11!}}{\dfrac{(11+n)!}{10!}}= \dfrac{12+n}{11}.

It is easy to verify that there are 91 \boxed{91} values of n n in the range [ 1 , 1000 ] [1, 1000] which make the 12 + n 11 \dfrac{12+n}{11} an integer.

How is f ( m , 1 ) = m 1 f(m,1) = m-1 ? Isnt f ( m , 1 ) = a 1 = 1 m a 1 = m ( m + 1 ) 2 f(m,1) = \displaystyle \sum_{a_1 = 1}^{m} a_1 = \frac{m(m+1)}{2} ?

Siddhartha Srivastava - 7 years, 4 months ago

Log in to reply

Oh yes, you're correct! It should've been f ( m , 0 ) = m 1 f(m,0)= m-1 . That demands a slight change of my arguments, but my logic is still true in its core.

Sreejato Bhattacharya - 7 years, 4 months ago

Log in to reply

How is f(m,0) defined?

Kenny Lau - 6 years, 11 months ago

This problem seems like a generalization of a problem I made a long time ago.

Daniel Liu - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...