Let $n$ be a positive integer and $p$ a fixed prime. We have a deck of $n$ cards, numbered $1,\ 2,\ldots,\ n$ and $p$ boxes for put the cards on them. Determine all posible integers $n$ for which is possible to distribute the cards in the boxes in such a way the sum of the numbers of the cards in each box is the same.
Problem
Source: VII Centroamerican and Caribbean Olympiad 2005, Problem 6
Tags: modular arithmetic, induction, number theory proposed, number theory
19.07.2007 13:00
Jutaro wrote: Let $ n$ be a positive integer and $ p$ a fixed prime. We have a deck of $ n$ cards, numbered $ 1,\ 2,\ldots,\ n$ and $ p$ boxes for put the cards on them. Determine all posible integers $ n$ for which is possible to distribute the cards in the boxes in such a way the sum of the numbers of the cards in each box is the same. Any solution to this problem ? Leon
19.07.2007 14:22
$ n=kp^{2}\ k\in\mathbb{Z}^{*}$ is solution I try to show that it is the only solution
19.07.2007 15:05
aviateurpilot wrote: $ n=kp^{2}\ k\in\mathbb{Z}^{*}$ is solution I try to show that it is the only solution In fact $ n=2kp$ is solution.
19.07.2007 15:40
Hmm... For $ p=5$ we have that $ n=14$ is a solution. In fact \[ 1+2+3+4+5+6=21 \] \[ 7+14=21 \] \[ 8+13=21 \] \[ 9+12=21 \] \[ 10+11=21 \] I think that : 1) for $ p=2$ the solutions are the such that $ n\equiv 0,3 \pmod 4$ 2) for $ p>2$ the solutions are the $ n>p$ such that $ n^{2}+n \equiv 0 \pmod p$. but I was not able to prove this. Has someone the official solution please ? Leon
19.07.2007 15:50
pco wrote: aviateurpilot wrote: $ n=kp^{2}\ k\in\mathbb{Z}^{*}$ is solution I try to show that it is the only solution In fact $ n=2kp$ is solution. ok, $ p^{2}\neq 2kp$ so it's (possible) to find other solutions $ \neq 2kp ,kp^{2}$ who know
19.07.2007 16:30
19.07.2007 17:16
mszew wrote:
wes it's trivial, but we get just $ 2p|n(n+1)$
19.07.2007 18:02
aviateurpilot wrote: mszew wrote:
wes it's trivial, but we get just $ 2p|n(n+1)$ For example $ p=n=3$ ????
19.07.2007 18:10
hallo $ pco$ why $ 2kp$ is solution? i will post mly solution for $ kp^{2}$
19.07.2007 18:47
aviateurpilot wrote: hallo $ pco$ why $ 2kp$ is solution? i will post mly solution for $ kp^{2}$ $ 2kp$ is solution for the following reason : First step : 1) distribute cards $ 1$ to $ p$ in boxes $ 1$ to $ p$ 2) distribute cards $ p+1$ to $ 2p$ in boxes $ p$ to $ 1$ (reverse order) Then you have distributed $ 2p$ cards and each box contains exactly the same sum $ 2p+1$ Second step : 3) distribute cards $ 2p+1$ to $ 3p$ in boxes $ 1$ to $ p$ 4) distribute cards $ 3p+1$ to $ 4p$ in boxes $ p$ to $ 1$ (reverse order) Then you have distributed $ 4p$ cards and each box contains exactly the same sum $ 8p+2$ And so on $ k^{th}$ step : $ 2k-1$) distribute cards $ (2k-2)p+1$ to $ (2k-1)p$ in boxes $ 1$ to $ p$ $ 2k$) distribute cards $ (2k-1)p+1$ to $ 2kp$ in boxes $ p$ to $ 1$ (reverse order) Then you have distributed $ 2kp$ cards and each box contains exactly the same sum $ k(2kp+1)$
19.07.2007 19:58
$ 2p\mid n(n+1)$ $ p=2$ mod $ 4$ we have $ 4\mid n$ or $ 4\mid(n+1)$ $ 1)$ $ n=4 k$ or $ 2)$ $ n=4 k-1$ $ 1)$ $ (1,4,5,8,\dots,4k-3,4k)$ and $ (2,3,6,7,\dots,4k-2,4k-1)$ $ 2)$ $ (1,2,4,7,\dots,4k-4,4k-1)$ and $ (3,5,6,\dots,4k-3,4k-2)$ $ p\ge3$ mod $ p$ we have $ p\mid n$ or $ p\mid(n+1)$ $ 3)$ $ n=k p$ or $ 4)$ $ n=k p-1$ I am working on both cases and try to post a solution for them
19.07.2007 22:59
thanks $ pco$ $ n=kp^{2}$ is solution for the following reason : we take $ f: \mathbb{N}^{2}\to \mathbb{N}$ $ f((h,r))=ph+r'$ where $ r'\equiv r[p]$ and $ r\in\{1,2,...,p\}$ then we take for $ i=1..p$: $ B_{i}=\{f(s,i+s) |\ s\in\{0,1,2,...,kp-1\}\}$ and we see that $ i\neq j$ gives $ B_{i}\cap B_{j}=\emptyset$ and the sum of element of $ B_{i}$ is: $ \sum_{s=0}^{kp-1}f(s,i+s)=p(\sum_{s=0}^{kp-1}s)+k(1+2+...+p)$ $ =p\frac{kp(pk-1)}{2}+\frac{kp(p+1)}{2}$ $ =\frac{kp(p^{2}k+1)}{2}$ $ =\frac{1}{p}(\frac{n(n+1)}{2})$
09.04.2013 07:50
All numbers given by the divisibility condition actually work. For any odd $p$ and $k\ge 2$ we actually can only use $n=kp$ and $n=kp-1$.
The case $p=2$ is similar but easier, all numbers $n$ with $4\mid n$ or $4\mid n+1$ work. : )