A Question about SOAP

For a positive integer n n greater than 1 1 , define the s um o f a ll p airs: Soap ( n ) \text{Soap}(n) as the sum of all possible pair products, made of distinct integers from 1 1 to n n .

For example, Soap ( 2 ) = ( 1 × 2 ) = 2 \text{Soap}(2) = (1 \times 2) = 2 Soap ( 3 ) = ( 1 × 2 ) + ( 1 × 3 ) + ( 2 × 3 ) = 11 \text{Soap}(3) = (1 \times 2) + (1 \times 3) + (2 \times 3) = 11

If the arithmetic mean of the products is an integer, then n n is defined as "Soapy".

For example,

  • 2 2 is "Soapy" since Soap ( 2 ) = 2 \text{Soap}(2) = 2 and there is 1 1 pair and 2 1 \frac21 is an integer
  • 3 3 is not "Soapy" since Soap ( 3 ) = 11 \text{Soap}(3) = 11 and there are 3 3 pairs and 11 3 \frac{11}{3} is not an integer

Are numbers of the form 1 0 k 10^k "Soapy", where k N k \in \mathbb{N} ?

Always Sometimes Never

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

Chew-Seong Cheong
Aug 17, 2018

We note that soap ( n ) \text{soap}(n) is defined as follows.

soap ( n ) = j = 1 n 1 j k = j + 1 n k = j = 1 n 1 j ( ( n j ) ( j + 1 + n ) 2 ) Sum of AP: S = n ( a + l ) 2 = 1 2 j = 1 n 1 j ( n 2 j 2 + n j ) = 1 2 j = 1 n 1 ( ( n 2 + n ) j j 2 j 3 ) = 1 2 ( ( n 2 + n ) n ( n 1 ) 2 n ( n 1 ) ( 2 n 1 ) 6 n 2 ( n 1 ) 2 4 ) = n ( n 1 ) 24 ( 6 n 2 + 6 n 4 n + 2 3 n 2 + 3 n ) = n ( n 1 ) ( 3 n 2 + 5 n + 2 ) 24 = n ( n 1 ) ( n + 1 ) ( 3 n + 2 ) 24 \begin{aligned} \text{soap}(n) & = \sum_{j=1}^{n-1} j \sum_{k=j+1}^n k \\ & = \sum_{j=1}^{n-1} j \color{#3D99F6} \left(\frac {(n-j)(j+1+n)}2 \right) & \small \color{#3D99F6} \text{Sum of AP: } S = \frac {n(a+l)}2 \\ & = \frac 12 \sum_{j=1}^{n-1} j \left(n^2-j^2 + n - j\right) \\ & = \frac 12 \sum_{j=1}^{n-1} \left((n^2+n)j-j^2 - j^3\right) \\ & = \frac 12 \left(\frac {(n^2+n)n(n-1)}2-\frac {n(n-1)(2n-1)}6 - \frac {n^2(n-1)^2}4 \right) \\ & = \frac {n(n-1)}{24} \left(6n^2+6n - 4n+2 - 3n^2 + 3n \right) \\ & = \frac {n(n-1) \left(3n^2+5n +2 \right)}{24} \\ & = \frac {n(n-1)(n+1)(3n+2)}{24} \end{aligned}

We also note that the number of product pairs of soap ( n ) \text{soap}(n) is p ( n ) = T n 1 = n ( n 1 ) 2 p(n) = {\color{#3D99F6}T_{n-1}} = \dfrac {n(n-1)}2 , where T k \color{#3D99F6} T_k is the triangular number. Then we have

soap ( n ) p ( n ) = ( n + 1 ) ( 3 n + 2 ) 12 For n = 1 0 k = ( 1 0 k + 1 ) ( 3 × 1 0 k + 2 ) 12 \begin{aligned} \frac {\text{soap}(n)}{p(n)} & = \frac {(n+1)(3n+2)}{12} & \small \color{#3D99F6} \text{For } n = 10^k \\ & = \frac {\color{#D61F06}(10^k+1)\color{#3D99F6}(3\times 10^k+2)}{12} \end{aligned}

The factor 1 0 k + 1 \color{#D61F06}10^k+1 is always odd and has a sum of digits of 2. Therefore, it is not a multiple of 3. Therefore, for soap ( n ) p ( n ) \dfrac {\text{soap}(n)}{p(n)} to be an integer, 3 × 1 0 k + 2 \color{#3D99F6}3\times 10^k +2 must be divisible by 12. For k = 1 k=1 , 3 × 1 0 k + 2 = 32 m o d 12 = 8 0 3 \times 10^k+2 = 32 \bmod 12 = 8 \ne 0 . The factor is not divisible by 12. For k > 1 k > 1 , 3 × 1 0 k + 2 m o d 12 = 2 0 3 \times 10^k + 2 \bmod 12 = 2 \ne 0 . Therefore 1 0 k 10^k is never soapy.

Brian Moehring
Aug 16, 2018

Note that Soap ( n ) = 1 a < b n a × b = 1 2 1 a , b n a b a × b = 1 2 ( 1 a , b n a × b 1 a , b n a = b a × b ) = 1 2 ( a = 1 n a × b = 1 n b a = 1 n a 2 ) = 1 2 ( ( 1 + 2 + 3 + + n ) 2 ( 1 2 + 2 2 + 3 2 + + n 2 ) ) = 1 2 ( n 2 ( n + 1 ) 2 4 n ( n + 1 ) ( 2 n + 1 ) 6 ) = n ( n 1 ) ( n + 1 ) ( 3 n + 2 ) 24 \begin{aligned} \text{Soap}(n) &= \sum_{1\leq a < b \leq n} a\times b \\ &= \frac{1}{2}\sum_{1\leq a,b \leq n \atop a\neq b} a\times b \\ &= \frac{1}{2} \left(\sum_{1\leq a,b \leq n} a\times b - \sum_{1\leq a,b \leq n \atop a=b} a\times b\right) \\ &= \frac{1}{2} \left(\sum_{a=1}^n a \times \sum_{b=1}^n b - \sum_{a=1}^n a^2\right) \\ &= \frac{1}{2} \bigg(\left(1+2+3+\cdots +n\right)^2 - \left(1^2+2^2+3^2+\cdots+n^2\right)\bigg) \\ &= \frac{1}{2} \left(\frac{n^2(n+1)^2}{4} - \frac{n(n+1)(2n+1)}{6}\right) \\ &= \frac{n(n-1)(n+1)(3n+2)}{24} \end{aligned} and the number of pairs is ( n 2 ) = n ( n 1 ) 2 \binom{n}{2} = \frac{n(n-1)}{2} so the arithmetic mean of the products of pairs is Soap ( n ) × ( n 2 ) 1 = ( n ( n 1 ) ( n + 1 ) ( 3 n + 2 ) 24 ) × ( 2 n ( n 1 ) ) = ( n + 1 ) ( 3 n + 2 ) 12 \text{Soap}(n) \times \binom{n}{2}^{-1} = \left(\frac{n(n-1)(n+1)(3n+2)}{24}\right) \times \left(\frac{2}{n(n-1)}\right) = \frac{(n+1)(3n+2)}{12}

Now, n n is Soapy if and only if this is an integer, which implies 4 × ( n + 1 ) ( 3 n + 2 ) 12 = ( n + 1 ) ( 3 n + 2 ) 3 = ( n + 1 ) 2 n + 1 3 4\times \frac{(n+1)(3n+2)}{12} = \frac{(n+1)(3n+2)}{3} = (n+1)^2 - \frac{n+1}{3} is also an integer. That is, we have shown n is Soapy n + 1 0 ( m o d 3 ) n \text{ is Soapy} \implies n +1 \equiv 0 \pmod{3}

Here, if we let n = 1 0 k , n = 10^k, then 1 0 k + 1 1 k + 1 = 2 ≢ 0 ( m o d 3 ) 10^k +1 \equiv 1^k + 1 = 2 \not\equiv 0 \pmod{3} so numbers of the form 1 0 k 10^k for k N k\in \mathbb{N} are never \boxed{\text{never}} Soapy.


Remark: It wasn't necessary for this problem, but if you look at the formula given for the arithmetic mean, it's not hard to show that the following is a valid definition of being Soapy: n > 1 is an integer ( n is Soapy n 2 or 11 ( m o d 12 ) ) n>1 \text{ is an integer } \implies \bigg(n \text{ is Soapy} \iff n \equiv 2 \text{ or } 11 \pmod{12}\bigg)

Yes, the remark at the bottom is important if the logic needed to be traced backwards, as 2 and 11 are equal to 2 Mod 3, but so are 5 and 8 which aren't solutions. 1 0 k 10^{k} are always equal to 4 Mod 12. I did it that way.

Also, somewhat interestingly, 2018 is Soapy. This doesn't seem as special once you know that 2 in every 12 numbers are!

Stephen Mellor - 2 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...