Math Genius: Unique solution of the equation $prod_{i=1}^m(a_i+1)prod_{i=1}^n(b_i)=prod_{i=1}^m(a_i)prod_{i=1}^n(b_i+1)$

Original Source Link

Let $a_i$ be a sequence of $m$ distinct odd integers and $b_i$ a sequence of $n$ distinct odd integers.

We have to prove that,
$$prod_{i=1}^m(a_i+1)prod_{i=1}^n(b_i)=prod_{i=1}^m(a_i)prod_{i=1}^n(b_i+1)$$ has only one solution: $n=m$ with $a_i=b_i$ for $1le ile n$ (neglecting the sorting of sequence members).

For a disproof a counterexample is sufficient:
The both sequences $(a_1,a_2,a_3)=(135,85,215)$ and $(b_1,b_2,b_3)=(65,165,415)$ satisfy the introduced product equality:

$136cdot86cdot216cdot65cdot165cdot415=135cdot85cdot215cdot66cdot166cdot416$

Another example are the sequences $(a_1,a_2)=(4887,110591)$ and $(b_1,b_2)=(6335,17919)$:

$4888cdot110592cdot6335cdot17919=4887cdot110591cdot6336cdot17920$

Tagged : / / / /

Server Bug Fix: Length of an integer is part of its digits [closed]

Original Source Link

How many positive integers less than 1,000,000,000 contain their length as part of their digit string?
Example: 123466 has a length of 6 and 6 is one of its digits. Hence this number needs to be counted.

For any $d$ the number of integers of length up to $k$ with no digit $d$ (where $1leq dleq9$) is $9^k$ since each of the $k$ digits (padding at left with zeros if need be) is allowed to be one of 9 things. Hence, the number of length exactly $k$ with no digit $d$ (for any particular $d$) is $9^k-9^{k-1}$. This is true in particular when $d=k$, so the number of length-$k$ numbers not containing their length (when $1leq kleq9$) is also $9^k-9^{k-1}$, and therefore the number of length-$k$ numbers that do contain their length is $(10^k-10^{k-1})-(9^k-9^{k-1})$ which we might prefer to write as $(10^k-9^k)-(10^{k-1}-9^{k-1})$. Summing this for $k$ from 1 to 9 we get $(10^9-9^9)-(10^0-9^0)=10^9-9^9$.

This equals

612579511, a figure already found by Glorfindel by looking it up in OEIS, but as can be seen above the calculation is very straightforward.

The answer is

612579511

Reasoning: there are

  • 1 number of length 1 with digit 1
  • 18 numbers of length 2 with digit 2 (12, 22, … 92, and 20 … 29, but don’t count 22 twice!)
  • 252 of length 3 with digit 3 (90 ending on 3, 81 where the middle digit is 3 but the last one isn’t, 81 where the first digit is 3 but the last two aren’t)
  • We could enumerate the rest, but that would be tedious. Fortunately, the sequence is in OEIS
  • 4: 3168
  • 5: 37512
  • 6: 427608
  • 7: 4748472
  • 8: 51736248
  • 9: 555626232
  • Summing them gives the final answer.

There is an other way to find the solution.

Since we are limited to digit $0-9$, we are interested by the numbers
between $1$ and $999,999,999$. We now remove the numbers that doesn’t
satisfy the condition.

How many 1 digit numbers doesn’t have the number $1$ in it? There are
$8$ such numbers.

How many 2 digits numbers doesn’t have the number $2$ in it? There are
$8times9$ such numbers.

How many 3 digits numbers doesn’t have the number $3$ in it? There are
$8times9times9$ such numbers.

More generaly, how many k digits numbers doesn’t have the number $k$
in it? There are $8times9^{k-1}$ such numbers.

Our answer is
$$999,999,999-8-8times9-8times9^2-8times9^3-8times9^4-8times9^5-8times9^6-8times9^7-8times9^8=612,579,511$$

Given any positive integer,

it is always possible to construct another integer with that many digits that includes the original integer itself.

Therefore, there are at least

as many such integers as there are all integers altogether.

There cannot be any more than that, because the resulting integers are, well, integers.

If you

pad the numbers with leading zeroes so that they always have 9 digits

then it becomes easier to count how many there are because you then don’t have to split it into cases.

There are $10^9$ strings of 9 digits. Those that start with one or more zeroes represent numbers with fewer digits.

There are $9^9$ strings of consisting of the digits $0$ to $8$. Any such string uniquely corresponds to a number not containing its length: If its length is $n$, just increment every digit that is $n$ or greater (the length is not affected by incrementing non-zero digits so this process is reversible).

Therefore there are $10^9-9^9$ numbers containing its own length as a digit at least once.

Tagged : / /

Math Genius: Is there a way to know when $(a+l_n)^n+(b+k_n)^n$ is an integer for integer $a$, $b$ and rational $l_n$, $k_n$ with $l_n+k_n=1$?

Original Source Link

Working with some sequences, I’ve gotten to something like this:

$$(a+l_n)^n+(b+k_n)^n tag{1}$$

where $a,bin mathbb{N}$ and $l_n,k_ninmathbb{Q}cap(0,1)$ $forall n in mathbb{N}backslash{0,1}$, such that $l_n+k_n=1$.

My first thought was that it cannot be integer never, but then I remembered the Fibonacci numbers where something with the sum of two irrational numbers that is natural. So,

Is there a way to know when $(1)$ is an integer?

Any help please? Thanks in advance!

Edit: After doing some work on my problem, I got to:
$$l_n=frac{2^{n-1}-1}{2^n} qquad k_n=frac{2^{n-1}+1}{2^n}$$
With this extra information, would this be helpful in order to find a solution?

Let’s start with a simple form:

$A=(a+frac{c}{d})+(b+frac{e}{d})$

It can be seen that if $d big|c+e$ then A can be an integer. For example:

$(13+frac{7}{15})+(17+frac{8}{15})=frac{465}{15}=31$

$(7+frac{3}{5})+(3+frac{2}{5})=frac{465}{15}=15$

Where denominators of fraction are equal. We can make denominators equal in the case they are not equal. Let $l_n=frac{c}{d}$ and $k_n=frac{e}{f}$, then we may write:

$A=(a+frac{c}{d})+(b+frac{e}{f})=(a+frac{c.f}{d.f})+(b+frac{e.d}{f.d})$

Then the condition is:

$d.fbig|c.f+e.d$

For example we have:

$c=2$,$d=5$, $e=3$ and we want to find $f$ such that the condition is provided, we must have:

$ed+cf=15+2f=t(5f)$

The only solution is:

$t=1$, $15=5f-2f=3f$$f=5$

Now let $a=8$ and $b=11$ we have:

$(8+frac{2}{5})+(11+frac{3}{5})=frac{100}{5}=20$

For general form $A=(a+frac{c}{d})^n+(b+frac{e}{f})^n$

n must be odd ,let $n=2t+1$,such that A can be reduced but the condition will be the same, i.e in following relation:

$A=(a+frac{c}{d})^{2t+1}+(b+frac{e}{d})^{2t+1}=big[(a+frac{c}{d})+(b+frac{e}{f})big]((a+frac{c}{d})^{2t}(b+frac{e}{f})+ . . . )$

if $(a+frac{c}{d})+(b+frac{e}{f})$ is integer, then A is integer and for that we must have:

$d.fbig|c.f+e.d$

c, d, e and f can be functions of n, for example $c=2^n$, $d=5^n$ etc.

Tagged :

Math Genius: Solving two simultaneous modular equations for a maximum case solution

Original Source Link

Consider two sets of numbers.

$E_1={1,1,-1,…}$

$E_2={1,-1,-1,…}$

Let the number of elements in $E_1$ be $n_1$ and the number of elements in $E_2$ be $n_2$. The number of 1’s and -1’s in each set may vary for different cases. The maximum of total number of elements for both sets, i.e. $n_1 + n_2$ that could be present is $N$.

$max(n_1+n_2)=N$

Let $E_1(i)$ denote the $i^{th}$ element of $E_1$, $i=1, …, n_1$, $E_2(j)$ denote the $j^{th}$ element of $E_2$, $j=1, …, n_1$, $sum_{i=1}^{n_1} E_1(i) = a$ and $sum_{j=1}^{n_2} E_2(j) = b$.

$a$ and $b$ should satisfy the relationships,

$a equiv 0 (mod p)$

$b equiv 0 (mod q)$, where $p,q$ are two distinct primes. These two relationships are satisfied when $n_1+n_2 <N$ as well as when $n_1+n_2 =N$.

Suppose I do not know,

  1. the elements of the two sets $E_1$ and $E_2$
  2. $n_1$ and $n_2$

But I know $p, q$ and $N$ (Actually $N=pq$). Then, is there a method to determine the values of $a$ and $b$ using the above two equations for the case $n_1+n_2=N$ (i.e. the maximum case)?

It is not clear to me, this is not like considering two normal simultaneous equations but here congruence relations are present.

Thanks a lot in advance.

Tagged : / / /

Math Genius: A question about the probability of being a prime?

Original Source Link

If we chose a random number $a leq N$, then, the probability for $a$ to be a prime is $frac{1}{log N}$.

Now, if there are some primes that do not divide $a$, then what is the probability for $a$ to be a prime?

EX: if $a leq 100000$, and both of {2,3,5,7} don’t divide $a$, then what is the probability for $a$ to be a prime?

First off, the result that the density of the primes is $frac{1}{ln N}$ is asymptotic, as in it holds as a limit (so asking specifically $aleq10^5$ means you get an approximation to the true answer).

Next, simply notice that for sufficiently large $N$, we have that $frac{1}{2}$ of numbers are not divisible by $2$, $frac{2}{3}$ are not divisible by $3$, etc. These are all independent for sufficiently large $N$.

So, the count of numbers below $N$ that are not divisible by $P={2,3,5,7}$ is just
$$Nprod_{pin P}left(1-frac{1}{p}right)text{.}$$

The numerator, the number of primes that are not in $P$, is even easier: there are $Omega(N/ln(N))$ total primes, minus all $left|Pright|=4$ forbidden ones.

The answer is
$$frac{frac{N}{ln(N)}-left|Pright|}{Nprod_{pin P}left(1-frac{1}{p}right)}$$

Tagged : / / /

Math Genius: What is this sum? (related to prime numbers)

Original Source Link

I was toying around with some prime number related series (trying to generalize some results from a puzzle) and came across this one:

$$sum_{p text{ prime}} frac{1}{p^2+p}$$

Is there any reasonable way to calculate this? If not, can you get some nice bounds on it? (above and below would be nice. I know it lies between $0.3$ and $0.4$, and running it through a program actually tells me it is about $0.33$)

I can’t give you an answer, but.

If we consider
$$
sum_{p leq x} frac{1}{p(p + 1)}
=
sum_{p leq x} left( frac{1}{p} – frac{1}{p + 1} right),
$$

the question amounts to determining the constant $A$
appearing in the asymptotic formula of the form
$sim log log x + A + o(1)$ for the sum
$$
sum_{p leq x}frac{1}{p + 1}.
$$

I don’t think A takes an easy form.

Tagged : / /

Math Genius: $4p+1$ is perfect cube, sum of all possible $p$ values?

Original Source Link

This is a problem from a math Olympiad.

$p$ is a positive prime number such that $4p+1$ is a perfect cube. What is the sum of all possible values of $p$?

I have done this by trial-error and brute-force method.

I simply went through every integer cube and tried to find out the p.

$4p+1=(positive integer)^3$

$p=frac{(positive integer)^3-1}{4}$

$p = frac{(5)^3-1}{4}$
starting from 1, I kept on plugging numbers to find p

I discovered that the only time $p$ is a prime number is when $4p+1=(5)^3$.
$p = 31$ then.

And $4p+1$ is a cube, is only true for $5$, $5+4$, $5+4+4$, and so on.

I hope I’ve made my attempts clear.

First, note $p = 2$ doesn’t work so $p$ is an odd prime. Also, let the positive integer being cubed be $j$. You then have

$$begin{equation}begin{aligned}
4p + 1 & = j^3 \
4p & = j^3 – 1 \
4p & = (j – 1)(j^2 + j + 1) \
4p & = (j – 1)((j + 1)(j) + 1)
end{aligned}end{equation}tag{1}label{eq1A}$$

Note that $(j + 1)(j) + 1$ is always odd. Thus, since $(j + 1)(j) + 1 gt 1$, plus $p$ is an odd prime and is the only odd factor on the LHS, this means $(j + 1)(j) + 1 = p$, which then gives $j – 1 = 4 implies j = 5$. This shows the only solution where $p$ is a prime is $p = (6)(5) + 1 = 31$, as you’ve already determined.

Notice that $a$ is odd number.

Then rewrite your equation:

begin{equation}
p=frac{a^3-1}{4}=frac{(a-1)(a^2+a+1)}{4}.
end{equation}

$(a^2+a+1)$ is odd, thus 4 should divide $(a-1)$. Let $a=4k+1$, then

begin{equation}
p=k(16k^2+12k+3)
end{equation}

Now you need to take into account that $p$ is prime and and find only possible value $k=1$.

Tagged : / /

Math Genius: Number Theory- Find all incongruent integers of order $3^{18}$ modulo $2 cdot 3^{20}$.

Original Source Link

Find all incongruent integers of order $ 3^{18}$ modulo $2 cdot 3^{20}$

I guess we use this formula
$$
operatorname{ord}_n(a^k) = frac{operatorname{ord}_na}{gcd(operatorname{ord}_na,k)} $$

But in this formula, we need to calculate Euler totient function of $2 cdot 3^{20}$ and this number is so big. I don’t know am I in the right direction or maybe even not close.

Hint: The group of units mod $2p^k$ is cyclic when $p$ is an odd prime.

Since the $n = 2 cdot 3^{20}$ is twice the power of an odd prime there exists a generator mod $n$ i.e. the number of order $phi(n)$. Thus the numbers $g$, $dots$, $g^{phi(n)}$ are all different mod $n$ (remember that $phi(n) = phi(2) cdot phi(3^{20}) = phi(2) cdot phi(3^{20}) = 1 cdot 2 cdot 3^{19} = 2 cdot 3^{19}$). Moreover the order of $g^{k}$ mod $n$ will be the smallest $l$ such that $1=(g^{k})^{l} = g^{kl} pmod{n}$ which is equivalent to $phi(n) mid kl$ because $g$ is the generator. Thus the order is just $frac{phi(n)}{GCD(k, phi(n))}$. So we are looking for $k$ such that:
$$3^{18} = frac{phi(n)}{GCD(k, phi(n))} = frac{2 cdot 3^{19}}{GCD(k, 2 cdot 3^{19})}$$
Which is equivalent to $GCD(k, 2 cdot 3^{19}) = 6$ and this is true if and only if $6 mid k$ and $18 nmid k$. Every eighteen numbers there are three multiples of $6$ and one multiple of $18$ and thus two numbers satisfying these requirements. Therefore exactly $frac{1}{9}$ of all numbers have this property so the answer is:
$$2 cdot 3^{18}$$

Tagged : /

Math Genius: Number Theory- Find all incongruent integers of order $3^{18}$ modulo $2 cdot 3^{20}$.

Original Source Link

Find all incongruent integers of order $ 3^{18}$ modulo $2 cdot 3^{20}$

I guess we use this formula
$$
operatorname{ord}_n(a^k) = frac{operatorname{ord}_na}{gcd(operatorname{ord}_na,k)} $$

But in this formula, we need to calculate Euler totient function of $2 cdot 3^{20}$ and this number is so big. I don’t know am I in the right direction or maybe even not close.

Hint: The group of units mod $2p^k$ is cyclic when $p$ is an odd prime.

Since the $n = 2 cdot 3^{20}$ is twice the power of an odd prime there exists a generator mod $n$ i.e. the number of order $phi(n)$. Thus the numbers $g$, $dots$, $g^{phi(n)}$ are all different mod $n$ (remember that $phi(n) = phi(2) cdot phi(3^{20}) = phi(2) cdot phi(3^{20}) = 1 cdot 2 cdot 3^{19} = 2 cdot 3^{19}$). Moreover the order of $g^{k}$ mod $n$ will be the smallest $l$ such that $1=(g^{k})^{l} = g^{kl} pmod{n}$ which is equivalent to $phi(n) mid kl$ because $g$ is the generator. Thus the order is just $frac{phi(n)}{GCD(k, phi(n))}$. So we are looking for $k$ such that:
$$3^{18} = frac{phi(n)}{GCD(k, phi(n))} = frac{2 cdot 3^{19}}{GCD(k, 2 cdot 3^{19})}$$
Which is equivalent to $GCD(k, 2 cdot 3^{19}) = 6$ and this is true if and only if $6 mid k$ and $18 nmid k$. Every eighteen numbers there are three multiples of $6$ and one multiple of $18$ and thus two numbers satisfying these requirements. Therefore exactly $frac{1}{9}$ of all numbers have this property so the answer is:
$$2 cdot 3^{18}$$

Tagged : /

Math Genius: Number Theory- Find all incongruent integers of order $3^{18}$ modulo $2 cdot 3^{20}$.

Original Source Link

Find all incongruent integers of order $ 3^{18}$ modulo $2 cdot 3^{20}$

I guess we use this formula
$$
operatorname{ord}_n(a^k) = frac{operatorname{ord}_na}{gcd(operatorname{ord}_na,k)} $$

But in this formula, we need to calculate Euler totient function of $2 cdot 3^{20}$ and this number is so big. I don’t know am I in the right direction or maybe even not close.

Hint: The group of units mod $2p^k$ is cyclic when $p$ is an odd prime.

Since the $n = 2 cdot 3^{20}$ is twice the power of an odd prime there exists a generator mod $n$ i.e. the number of order $phi(n)$. Thus the numbers $g$, $dots$, $g^{phi(n)}$ are all different mod $n$ (remember that $phi(n) = phi(2) cdot phi(3^{20}) = phi(2) cdot phi(3^{20}) = 1 cdot 2 cdot 3^{19} = 2 cdot 3^{19}$). Moreover the order of $g^{k}$ mod $n$ will be the smallest $l$ such that $1=(g^{k})^{l} = g^{kl} pmod{n}$ which is equivalent to $phi(n) mid kl$ because $g$ is the generator. Thus the order is just $frac{phi(n)}{GCD(k, phi(n))}$. So we are looking for $k$ such that:
$$3^{18} = frac{phi(n)}{GCD(k, phi(n))} = frac{2 cdot 3^{19}}{GCD(k, 2 cdot 3^{19})}$$
Which is equivalent to $GCD(k, 2 cdot 3^{19}) = 6$ and this is true if and only if $6 mid k$ and $18 nmid k$. Every eighteen numbers there are three multiples of $6$ and one multiple of $18$ and thus two numbers satisfying these requirements. Therefore exactly $frac{1}{9}$ of all numbers have this property so the answer is:
$$2 cdot 3^{18}$$

Tagged : /