All Questions
92
questions
13
votes
4
answers
1k
views
Counting (Number theory / Factors)
I'm stuck with this counting problem: I have an expression:
$T = (N!) \times (N!) / D$ where, $D \in [1 - N!]$, i.e. $D$ takes all values from $1$ to $N!$ and I'm to count the number of points where $...
7
votes
1
answer
830
views
Alice and Bob make all numbers to zero game
Alice and Bob are playing a number game in which they write $N$ positive integers. Then the players take turns, Alice took first turn.
In a turn :
A player selects one of the integers, divides it ...
6
votes
2
answers
2k
views
How can I reduce a number?
I'm trying to work on a program and I think I've hit a math problem (if it's not, please let me know, sorry). Basically what I'm doing is taking a number and using a universe of numbers and I'm ...
6
votes
2
answers
255
views
Number of sudokus with no consecutive arithmetic progression of length 3 in any row or column.
How many such Sudokus are there? Any reference to papers, books, articles or any insight into the problem will be greatly appreciated.
I've tried several search engines, scholarly and not, with no ...
6
votes
1
answer
749
views
Count expressions with 1s and 2s
Given at most X number of 1s and at most Y number of 2s. How many different evaluation results are possible when they are formed in an expression containing only addition + sign and multiplication * ...
5
votes
2
answers
656
views
Construct $4 \times 4$ magic square with fixed "1"
The method I have found to generate $4\times 4$ magic squares gives me a result in which the number "1" is at of the corners of the square. How can we extend this to a method to generate a magic ...
5
votes
1
answer
146
views
$X^A \equiv B \pmod{2K + 1}$
I recently found this problem which asks you to find an algorithm to find all $X$ such that $X^A \equiv B \pmod{2K + 1}$.
Is there something special about the modulus being odd that allows us to ...
5
votes
2
answers
191
views
Pigeonhole principle based algorithm
I was trying to solve this problem.
http://olympiads.hbcse.tifr.res.in/olympiads/wp-content/uploads/2016/09/inmosol-15.pdf
INMO-2015 P6. From a set of $11$ square integers, show that one can choose ...
4
votes
1
answer
2k
views
Expected value when die is rolled $N$ times
Suppose we have a die with $K$ faces with numbers from 1 to $K$ written on it, and integers $L$ and $F$ ($0 < L \leq K$). We roll it $N$ times. Let $a_i$ be the number of times (out of the $N$ ...
4
votes
2
answers
38
views
Can we find an $x, y : x < y$ and $x, y > 0$ and $\lfloor \frac{n}{x}\rfloor$ < $\lfloor \frac{n}{y}\rfloor$ for some integer $n > 0$?
I know there are no solutions when we have just the fraction without the floor, but how do we consider solutions when the floor is there?
4
votes
1
answer
118
views
Computing binomial symbols modulo m
While procrastinating, I decided to play around with computing binomial symbols modulo $m$, $$\binom{n}{r} \equiv q \pmod{m}, 0 \leq q < m.$$ Using Pascal's formula, I discovered that this may be ...
4
votes
1
answer
893
views
Card Shuffling [SPOJ]
The original question is posted on SPOJ, and included below:
Here is an algorithm for shuffling N cards:
1) The cards are divided into K equal piles, where K is a factor of N.
2) The ...
4
votes
1
answer
195
views
Combinations of red and black balls
Given $N$ Identical Red balls and $M$ Identical Black balls, in how many ways we can arrange them such that not more than $K$ adjacent balls are of same color.
Example : For $1$ Red ball and $1$ ...
4
votes
0
answers
120
views
How to compute n choose k modulo a prime power efficiently using extended Lucas' Theorem? [duplicate]
Possible Duplicate:
Lucas Theorem but without prime numbers
This question mentions a strategy for computing C(n, k) modulo a composite number, but leaves out the details. The use of the Chinese ...
3
votes
3
answers
354
views
why $m$ power by $n$ equals sum of $n$ numbrs
$$m^n=\sum_{i=0}^n(m-1)^i\binom{n}i$$
(a) I want to find a formula for the above and then prove it by induction. But there is two variable right those are $m$ and $n$. I know that this is true, ...