Math Challenge - March 2019

Click For Summary
SUMMARY

The forum discussion centers around various mathematical challenges, including the proof of the Beta function identity $$B(m,n) = \frac{\Gamma (m) \Gamma (n)}{\Gamma (m + n)}$$ using double integrals, and the properties of even functions in Fourier series. Participants solved problems involving integrals, algebraic structures, and sequences, with notable contributions from users like @Demystifier, @Math_QED, and @fbs7. Key topics include the exploration of associative algebras, amicable numbers, and the convergence of sequences.

PREREQUISITES
  • Understanding of Beta and Gamma functions
  • Familiarity with Fourier series and properties of even functions
  • Knowledge of algebraic structures, specifically algebras and ideals
  • Basic concepts of limits and convergence in sequences
NEXT STEPS
  • Study the proof of the Beta function identity in detail
  • Learn about the properties of Fourier series, focusing on even functions
  • Explore the concept of associative algebras and their applications
  • Investigate amicable numbers and their properties in number theory
USEFUL FOR

Mathematicians, students of advanced mathematics, and anyone interested in algebraic structures and number theory will benefit from this discussion.

fresh_42
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
2025 Award
Messages
20,815
Reaction score
28,447
Questions

1.)
(disclosed by @Demystifier ) Using the notion of double integrals prove that $$B(m,n) = \frac{\Gamma (m) \Gamma (n)}{\Gamma (m + n)}\; \;(m \gt 0\,,\, n\gt 0)$$ where ##B## and ##\Gamma## are the Beta and Gamma functions respectively.

2.) (solved by @Math_QED ) Show that the Fourier series of an even function cannot contain sine.

3.) (solved by @Bosko ) Show that $$\int_{0}^{1} dx \int_{x}^{\sqrt{x}} f(x,y)\,dy = \int_{0}^{1} dy \int_{y^2}^{y} f(x,y)\,dx\,.$$
4.) The graphic of eye colors shows us the probability of baby's eye color in dependency of the parents'. This yields the following multiplication table:

Eyes.jpg


\begin{align*}
x \cdot x &= (3/4) x + (3/16) y + (1/16) z\\
x \cdot y &=(1/2) x+(3/8) y+(1/8) z\\
x \cdot z &=(1/2) x+(1/2) z\\
y \cdot y &=(3/4) y+(1/4) z\\
y \cdot z &=(1/2) y+(1/2) z\\
z \cdot z &= z
\end{align*}
which we extend to a real, commutative, distributive, three dimensional algebra ##A##.

a) (solved by @fbs7 ) Is ##A## an associative algebra?

still open:

b) Prove, that ##A## is a baric algebra, i.e. show that there is a non trivial algebra homomorphismus ##\omega\, : \,A\longrightarrow \mathbb{R}##, the weight function.
c) Determine a basis for ##\operatorname{ker}\omega## and rewrite the multiplication table according to this new basis.
d) Prove that there is an ideal ##N## of codimension one in ##A##, such that ##A^2 \nsubseteq N##.
e) A algebra is called genetic, if there is a basis ##\{\,u_i\,\}## such that the structure constants ##\lambda_{ijk}## defined by
$$
u_i \cdot u_j = \sum_{k=1}^n \lambda_{ijk}u_k
$$
fulfill the following conditions:
  • ##\lambda_{111}=1##
  • ##\lambda_{1jk}=0## for all ##j>k##
  • ##\lambda_{ijk}=0## for all ##i,j > 1## and ##k \leq \operatorname{max}\{i,j\}##
Prove that all genetic algebras are baric algebras.
f) Show that ##A## is not a genetic algebra.
g) Determine all idempotent elements of ##A##. Is there a basis of ##A## with idempotent elements?

5.) (solved by @Bosko ) Prove that starting with ##\frac{1}{1}## the following binary tree
$$
\begin{array}{ccccc}
&&\frac{a}{b}&&\\
&\swarrow &&\searrow \\
\frac{a}{a+b}&&&&\frac{a+b}{b}
\end{array}
$$
defines a counting of all positive rational numbers without repetition and all quotients canceled out.

6.) (solved by @Cthugha ) Who said what here? (What is the task, who a bonus.)
Zitat.jpg


7.) (solved by @lpetrich ) Calculate ##I:=\int_0^\infty \dfrac{\sqrt{x^{e-2}}}{x^e+1}\,dx##

8.) An algebra ##A## is a vector space with a binary distributive multiplication. An example are group algebras, i.e. the distributive extension of the formal basis vectors ##g\in G## such as $$A :=\mathbb{R}[S_3]=\mathbb{R}\cdot(1)+\mathbb{R}\cdot(12)+\mathbb{R}\cdot(13)+\mathbb{R}\cdot(23)+\mathbb{R}\cdot(123)+\mathbb{R}\cdot(132)$$
a.) Find the center ##Z(A)=\{\,z \in A\,|\,zv=vz\text{ for all }v\in A\,\}## of ##A##, and
b.) determine the structure of ##A##, i.e. its decomposition into direct factors and the corresponding isomorphisms.

9.) Let ##B\subseteq \mathbb{R}^n## be measurable and ##P=(a_1,\ldots,a_n,b)\in \mathbb{R}^{n+1}## a point with ##b>0## and ##C_B=\{\,P+t(Q-P)\,|\,Q\in B\times \{0\}_{n+1}\, , \,t\in [0,1]\,\}## the cone above the basis ##B## with the peak ##P\,.##
Prove the measure formula
$$
\lambda^{n+1}(C_B)=\dfrac{b}{n+1}\cdot \lambda^n(B)
$$
10.) Show that $$
x \cdot y = \frac{2xy-x-y}{xy-1}$$
defines a one dimensional, real, local Lie group ##G## around ##0 \in \mathbb{R}## and compute the vector field of left multiplication by an element ##g \in \mathbb{R}##.

hs-jpg.jpg
1.) (solved by @fbs7 ) Find the limit of the sequence ##a_n = 2\cdot \sqrt[3]{4}\cdot \sqrt[9]{16}\cdot \sqrt[27]{256} \,\cdots \, \sqrt[3^{n-1}]{2^{2^{n-1}}}##.

2.) Let ##(b_n)## be a sequence with ##b_n = \dfrac{nn^n}{(n!)^2}##.
a.) Show that ##(b_n)## converges and find its limit.
b.) Using the above find the limit of the sequence ##(a_n)## with ##a_n = \dfrac{1^n + 2^n + 3^n + \dots + n^n}{(n!)^2}##.

3.) (solved by @fbs7 ) Two numbers ##a,b## are called amicable, if the sum of all proper divisors of one is the other number (##1## is included). The smallest example is
$$
(a,b) = (220,284)=(1+2+4+71+142,1+2+4+5+10+11+20+22+44+55+110)
$$
Let ##n\in \mathbb{N}## and ##(x,y,z)=\left(3\cdot 2^n-1\, , \,3\cdot 2^{n-1}-1\, , \,9\cdot 2^{2n-1}-1\right)\,.##

Prove that if ##x,y,z## are all odd primes, then ##(a,b)=\left( 2^n\cdot x\cdot y\,,\, 2^n\cdot z \right)## are amicable numbers.

Hint: First find a formula for the sum of all divisors ##\sigma(n)## given the prime decomposition of ##n##.

4.) (solved by @fbs7 ) A number is called perfect, if it equals the number of all its divisors except itself, e.g. ##6=1+2+3## and ##28=1+2+4+7+14## are perfect.
Prove: If ##2^k-1## is a prime number, then ##2^{k-1}(2^k-1)## is a perfect number and every even perfect number has this form.

5.) a.) (solved by @fbs7 ) What is the smallest five-digit number ##n## such that ##n## and ##2n## together contain all ##10## digits from ##0## to ##9##?
b.) (solved by @fbs7 ) On how many zeros does the number ##1000\,!## end?
c.) (solved by @fbs7 ) For which six-digit number ##ABCDEF## do we have:
##ABCDEF \cdot 1 = ABCDEF##
##ABCDEF \cdot 3 = BCDEFA##
##ABCDEF \cdot 2 = CDEFAB##
##ABCDEF \cdot 6 = DEFABC##
##ABCDEF \cdot 4 = EFABCD##
##ABCDEF \cdot 5 = FABCDE##
 
Last edited:
  • Like
Likes   Reactions: fbs7 and Greg Bernhardt
Physics news on Phys.org
(2)
The Fourier coefficient of sine is given by (assumping period ##2\pi)##

$$a_n = 1/\pi \int_{-\pi}^{\pi} f(x) \sin(nx) dx$$

The integrand is odd, and we integrate over a symmetric interval, hence ##a_n = 0## and the result follows.
 
  • Like
Likes   Reactions: pbuk
I like (Q5), it is a nice question.
Edit: The algorithm I thought of is quite different from construction in question. Sorry for confusion.
 
Last edited:
Math_QED said:
(2)

Your solution is basically correct - I think that you mean ##b_n## not ##a_n##, but I would prefer to write it for a general case e.g. for an interval ##(-L,L)## and take into account that ##f(x)## is an even function.
 
QuantumQuest said:
Your solution is basically correct - I think that you mean ##b_n## not ##a_n##, but I would prefer to write it for a general case e.g. for an interval ##(-L,L)## and take into account that ##f(x)## is an even function.

This will just change the period of the sine, the integration boundaries (which remain symmetric) and another scaling constant in front. Reasoning remains exactly the same.
 
Math_QED said:
This will just change the period of the sine, the integration boundaries (which remain symmetric) and another scaling constant in front. Reasoning remains exactly the same.

Yes, I know all these. My remark is about how the solution can be presented in a more complete way. In any case, as I said in #4 your solution is basically correct.
 
  • Like
Likes   Reactions: member 587159
QuantumQuest said:
Yes, I know all these. My remark is about how the solution can be presented in a more complete way. In any case, as I said in #4 your solution is basically correct.

I will write it out with more details tomorrow, so it becomes clearer.
 
  • Like
Likes   Reactions: QuantumQuest
I will take on Problem 7.
We must find
$$ I = \int_0^\infty \frac{\sqrt{x^{e-2}}}{x^e + 1} dx $$
The first step is to evaluate the square root:
$$ I = \int_0^\infty \frac{x^{e/2}}{x^e + 1} \frac{dx}{x} $$
The term ## x^{e/2} ## suggests a change of variables: ## x = y^{2/e} ##, a change that makes it ## y ##. That change of variables has the same domain of integration, and we find
$$ I = \frac{2}{e} \int_0^\infty \frac{y}{y^2+1} \frac{dy}{y} = \frac{2}{e} \int_0^\infty \frac{dy}{y^2+1} = \left. \frac{2}{e} \arctan y \right|_{y=0}^\infty = \frac{\pi}{e} $$
Thus, ## I = \frac{\pi}{e} ##.
 
fresh_42 said:
\begin{align*}
x \cdot x &= 3/4 x + 3/16 y + 1/16 z\\
x \cdot y &=1/2 x+3/8 y+1/8 z\\
x \cdot z &=1/2 x+1/2 z\\
y \cdot y &=3/4 y+1/4 z\\
y \cdot z &=1/2 y+1/2 z\\
z \cdot z &= z
\end{align*}
Coefficients or are the variables in the denominator?
 
  • #10
archaic said:
Coefficients or are the variables in the denominator?
Coefficients, sorry. I'll correct it.
 
  • Like
Likes   Reactions: archaic
  • #11
My take on problem 6:

"Strange as it may sound the power of mathematics is based on avoiding any unnecessary assumption and its great saving of thought"

Basic assumption: This is a cipher, where each letter corresponds to one letter in the English alphabet (which is actually an incorrect assumption, but gets you started). Word 3, word 10 and word 18 are short words that contain almost exactly the same letters. The only sensible three words in English that achieve this are "is", "its" and "it". From there on, it gets slightly more difficult. The text is a bit short for frequency analysis, but the most common letters (etaoinshr) are still common in this text, so one may start e.g. by putting vowels in. The "as" and "the" are for example easy next guesses. From there, it is possible to guess "mathematics" and then the remaining stuff is not too hard. The difficult part is that some letters correspond to two letters inthe English alphabet. The fifth letter in the picture above represents "h" and "n". and the sixth letter represents "m" and "g". Or I am too blind to tell the symbols apart accurately, which is also quite likely. ;) I also do not have the slightest idea who might have said that.
 
Last edited:
  • #12
Cthugha said:
My take on problem 6:

"Strange as it may sound the power of mathematics is based on avoiding any unnecessary assumption and its great saving of thought"

Basic assumption: This is a cipher, where each letter corresponds to one letter in the English alphabet (which is actually an incorrect assumption, but gets you started). Word 3, word 10 and word 18 are short words that contain almost exactly the same letters. The only sensible three words in English that achieve this are "is", "its" and "is". From there on, it gets slightly more difficult. The text is a bit short for frequency analysis, but the most common letters (etaoinshr) are still common in this text, so one may start e.g. by putting vowels in. The "as" and "the" are for example easy next guesses. From there, it is possible to guess "mathematics" and then the remaining stuff is not too hard. The difficult part is that some letters correspond to two letters inthe English alphabet. The fifth letter in the picture above represents "h" and "n". and the sixth letter represents "m" and "g". Or I am too blind to tell the symbols apart accurately, which is also quite likely. ;) I also do not have the slightest idea who might have said that.
It was Ernst Mach.
 
  • #13
fresh_42 said:
It was Ernst Mach.
Indeed. You have not experienced Mach until you have read him in the original Klingon.
 
  • Like
Likes   Reactions: fresh_42
  • #16
fresh_42 said:
5.) Prove that starting with ##\frac{1}{1}## the following binary tree
$$
\begin{array}{ccccc}
&&\frac{a}{b}&&\\
&\swarrow &&\searrow \\
\frac{a}{a+b}&&&&\frac{a+b}{b}
\end{array}
$$
defines a counting of all positive rational numbers without repetition and all quotients canceled out.
Let choose arbitrary rational number a/b so that Greatest Common Divisor GCD(a,b)=1
Let prove that a/b is in the tree and it appears just once.

If a>b we go up-left in the tree to (a-b)/b
If a<b we go up-right in the tree to a/(b-a)
If a=b >1 then GCD(a,b) >1 -> not possible

By repeating this procedure we will reach 1/1.
The path is unique both ways either down->up or up-> down.
Every pair (a,b) have the unique path to (1,1) .
SSequence said:
I like (Q5), it is a nice question...
I agree . It is a nice question.
By thinking about the question i noticed similarity with an algorithm ( finding Greatest Common Divisor , of a an b, algorithm )

Code:
repeat
     if a>b then a=a-b
     if a<b then b=b-a
until a=b
print a
 
Last edited:
  • #17
Bosko said:
Let choose arbitrary rational number a/b so that Greatest Common Divisor GCD(a,b)=1
Let prove that a/b is in the tree and it appears just once.

If a>b we go up-left in the tree to (a-b)/b
If a<b we go up-right in the tree to a/(b-a)
If a=b >1 then GCD(a,b) >1 -> not possible

By repeating this procedure we will reach 1/1.
The path is unique both ways either down->up or up-> down.
Every pair (a,b) have the unique path to (1,1) .

I agree . It is a nice question.
By thinking about the question i noticed similarity with an algorithm ( finding GDC (a,b) algorithm )
repeat
if a>b then a=a-b
if a<b then b=b-a​
until a=b
You started with a quotient which is already in canceled form. How can you rule out there are no others? And why do we get all of them?

You shouldn't start with an assumption that is part of the claim. The clue is to find a kind of measurement which allows an ordering.
 
  • #18
fresh_42 said:
3.) Show that $$\int_{0}^{1} dx \int_{x}^{\sqrt{x}} f(x,y)\,dy = \int_{0}^{1} dy \int_{y^2}^{y} f(x,y)\,dx\,.$$
How can I upload image from my computer :-)
 
  • #19
Bosko said:
How can I upload image from my computer :-)
You could do it with the upload button at bottom right of the edit field, but I would appreciate if you wouldn't. Here's a guideline to write formulas on PF:
https://www.physicsforums.com/help/latexhelp/
 
  • #20
fresh_42 said:
You started with a quotient which is already in canceled form.
Yes I started from arbitrary (any) a/b ...
fresh_42 said:
How can you rule out there are no others?
If is not in canceled form repeating "the algorithm" in one moment I will get a=b > 1
fresh_42 said:
And why do we get all of them?
a/b can be any ... I didn't explained all steps in details
fresh_42 said:
You shouldn't start with an assumption that is part of the claim. The clue is to find a kind of measurement which allows an ordering.
Yes , you are right . I explained just an idea . I should do properly , step by step with precise assumptions.
 
  • #21
Bosko said:
Yes I started from arbitrary (any) a/b ...
You did not:
Bosko said:
Let choose arbitrary rational number a/b so that Greatest Common Divisor GCD(a,b)=1
Bosko said:
If is not in canceled form repeating "the algorithm" in one moment I will get a=b > 1
I have no idea how this would happen.
 
  • #22
fresh_42 said:
I have no idea how this would happen.
It is all about Greatest Common Divisor algorithm
Example you want to find GDC(20,12)
20 , 12
20-12 -> 8 , 12
8, 12-8->4
8-4->4 , 4
4=4 -> STOP
Explanation is that if x divides a and b then it also divides a-b
"Just repeat subtracting the smaller from the bigger one until they are both equal."
P.S. I studied Math for Computer Sciences. This is the way how computers find GCD
 
Last edited:
  • #24
Trying high-school 5a

Running a simple search algorithm. 1st column are the available digits, 2nd column is n, 3rd column is 2n; algorithm always chooses the lowest digit alvailable for the left-most available digit in n (because we want the minimum numbers), and then backtracks if any digit repeated. Solution is 06729 13458.

I bet there's a more elegant solution to this, but I'm a programmer

Code:
0123456789 abcde fghik, try a in 0123456789
.123456789 0bcde 0ghik,   bcde <= 4999, rejected repeat 0
..23456789 0bcde 1ghik,   bcde >= 5000, try b in 56789, tried 5
..234.6789 05cde 10hik,     cde <= 499, rejected repeat 0
..234.6789 05cde 11hik,     cde >= 500, rejected repeat 1
...345.789 06cde 12hik,     cde <= 499, try c in 34, tried 34
...45.789 063de 126ik,       de <= 499, rejected repeat 6
...45..89 063de 127ik,       de >= 500, try d in 89, tried 89
...4...89 0635e 1270k,         e <= 4, rejected repeat 0
...4...89 0635e 1271k,         e >= 5, rejected repeat 1
...45...9 0638e 1276k,         e <= 4, rejected repeat 6
...45...9 0638e 1277k,         e >= 5, rejected repeat 7
...45... 0639e 1278k,         e <= 4, try e in 45, tried 45
...5... 06394 12788,           rejected repeat 8
...45..8. 0639e 1279k,         e >= 5, rejected repeat 9
...3.5.7.9 064de 128ik,       de <= 49, try d in 3, tried 3
...5.7.9 0643e 1286k,         e <= 4, rejected repeat 6
...5...9 0643e 1287k,         e >= 5, try e in 59, tried 59
... 06435 12870,           rejected repeat 0
... 06439 12878,           rejected repeat 8
...3.5.78. 064de 129ik,       de >= 50, try d in 578, tried 5
...3...78. 0645e 1290k,         e <= 4, rejected repeat 0
...3...78. 0645e 1291k,         e >= 5, rejected repeat 1
...3.5..8. 0647e 1294k,         e <= 4, rejected repeat 4
...3...8. 0647e 1295k,         e >= 5, tried e in 8, tried 8
...8. 06478 12956,         e >= 5, rejected repeat 6
...3.5.7.. 0648e 1296k,         e <= 4, rejected repeat 6
...3.5... 0648e 1297k,         e >= 5, tried e in 5, tried 5
...3... 06485 12970,           rejected repeat 0
..2.45.789 06cde 13hik,     cde >= 500, trying c in 5789
..2.4..789 065de 130ik,       de <= 49, rejected repeat 0
..2.4..789 065de 131ik,       de >= 50, rejected repeat 1
..2..5..89 067de 134ik,       de <= 49, trying d in 2
...5..89 0672e 1344k,         e <= 4, rejected repeat 4
...89 0672e 1345k,         e >= 5
... 06729 13458,           stop
 
  • #25
fbs7 said:
I bet there's a more elegant solution to this, but I'm a programmer
No, problem! Programmers can learn something, too, we serve all!

Your solution doesn't contain the cipher ##0##. A leading zero is commonly not considered to be a digit of a number.
And now to my promise:
  • Should I have mentioned this?
    Yes and no. Yes, if I wanted to write a detailed concept for your program. No, since this is all you get normally: a description in common English, usually far more vague than question #5.
  • Should you have asked?
    Yes. It is part of every programming process to close the gap between "We need a solution!" and final user and code. And there are several steps in between: problem description, doability study, rough concept, detailed concept, database architecture, e.g. ORD, tests and reviews, final approval, implementation and some minor ones in between.
  • Can I read code or output?
    Not really. It's lousy commentated.
  • A propos output! Shouldn't you deliver an executable?
    (just kidding)
Of course, these objections are a bit over the top for such an easy example. I just made them to show you the many surroundings of code. Programming is far more than coding - or you have a big team with specialists for those tasks. If you are interested in a funny read about this subject, I recommend Tom DeMarco: The Deadline. It's worth every penny, but maybe one must have seen real projects before to laugh as hard as I did.
 
  • #26
haha, so 06729 is not the solution for the leading 0, correct? No problem, same algorithm should find another solution starting with a digit. Lemme try it.
 
  • #27
New attempt, same algorithm

Solution is n=15486, 2n=30972
Code:
0123456789 abcde fghik, 1 try a in 123456789, can't start with 0 per fresh_42
0..3456789 1bcde 2ghik, 2 bcde <= 4999, try b in 03
0..3456789 10cde 20hik, 3 rejected repeated 0
0..3456789 13cde 21hik, 3 rejected repeated 1
0.2.456789 1bcde 3ghik, 2 bcde >= 5000, try b in 56789
..2.4.6789 15cde 30hik, 3 cde <= 499 try c in 24
...6789 152de 304ik, 4 de <= 49 rejected no possible values for d
...4.6789 152de 305ik, 4 de >= 50 rejected repeated 5
..2...67.9 154de 308ik, 4 de <= 49 try d in 2
...67.9 1542e 3084k, 5 e <= 4 rejected repeated 4
...67.9 1542e 3085k, 5 e >= 5 rejected repeated 5
..2...678. 154de 309ik, 4 de >= 50 try d in 678
...78. 1546e 3092k, 5 e <= 4 rejected no possible values for e
..2...78. 1546e 3093k, 5 e >= 5 rejected repeated 3
..2...6.8. 1547e 3094k, 5 e <= 4 rejected repeated 4
..2...6.8. 1547e 3095k, 5 e >= 5 rejected repeated 5
..2...7.. 1548e 3096k, 5 e <= 4 will try e in 2
...7.. 15482 30964, 5 e <= 4 rejected repeated 4
... 15486 30972, stop
 
  • #28
fbs7 said:
New attempt, same algorithm

Solution is n=15486, 2n=30972
Code:
0123456789 abcde fghik, 1 try a in 123456789, can't start with 0 per fresh_42
0..3456789 1bcde 2ghik, 2 bcde <= 4999, try b in 03
0..3456789 10cde 20hik, 3 rejected repeated 0
0..3456789 13cde 21hik, 3 rejected repeated 1
0.2.456789 1bcde 3ghik, 2 bcde >= 5000, try b in 56789
..2.4.6789 15cde 30hik, 3 cde <= 499 try c in 24
...6789 152de 304ik, 4 de <= 49 rejected no possible values for d
...4.6789 152de 305ik, 4 de >= 50 rejected repeated 5
..2...67.9 154de 308ik, 4 de <= 49 try d in 2
...67.9 1542e 3084k, 5 e <= 4 rejected repeated 4
...67.9 1542e 3085k, 5 e >= 5 rejected repeated 5
..2...678. 154de 309ik, 4 de >= 50 try d in 678
...78. 1546e 3092k, 5 e <= 4 rejected no possible values for e
..2...78. 1546e 3093k, 5 e >= 5 rejected repeated 3
..2...6.8. 1547e 3094k, 5 e <= 4 rejected repeated 4
..2...6.8. 1547e 3095k, 5 e >= 5 rejected repeated 5
..2...7.. 1548e 3096k, 5 e <= 4 will try e in 2
...7.. 15482 30964, 5 e <= 4 rejected repeated 4
... 15486 30972, stop
Too big. I think your algorithms doesn't consider the carries and rejects possible solutions.
Your first solution was close!
 
  • #29
Ops... big fingers got in the keyboard's way (error in the 4th line of previous post)... now I flunked high-school; trying again.

Btw, I wonder if there's a way to solve this through logic instead of searching for a solution; I tried a few times, but the solution through logic evaded me.

On 3rd try, solution is n=13485 2n=26970; if this is still wrong I'm giving up high school and going back to primary school
Code:
0123456789 abcde fghik, 1 try a in 123456789, can't start with 0 per fresh_42
0..3456789 1bcde 2ghik, 2 bcde <= 4999, try b in 03
...3456789 10cde 20hik, 3 cde <= 499 rejected repeated 0
...3456789 10cde 21hik, 3 cde >= 500 rejected repeated 1
0...45.789 13cde 26hik, 3 cde <= 499 try c in 04 (this is the line that had a bug... 2*13 = 26, not 21, haha)
...45.789 130de 260ik, 3 de <= 499 rejected repeated 0
...45.789 130de 261ik, 3 de >= 500 rejected repeated 1
0...5.7.9 134de 268ik, 3 de <= 499 try d in 0
...5.7.9 1340e 2680k, 4 e <= 4 rejected repeated 0
...5.7.9 1340e 2681k, 4 e >= 5 rejected repeated 1
0...5.78. 134de 269ik, 3 de >= 500 try d in 578
...78. 1345e 2690k, 4 e <= 4 rejected no values for e
0...78. 1345e 2691k, 4 e >= 5 rejected repeated 1
0...5..8. 1347e 2694k, 4 e <= 4 rejected repeated 4
0...8. 1347e 2695k, 4 e >= 5 try e in 8
0... 13478 26956, rejected repeated 6
0...5.7.. 1348e 2696k, 4 e <= 4 rejected repeated 6
0...5... 1348e 2697k, 4 e >= 5 try e in 5
... 13485 26970, stop
 
  • #30
fbs7 said:
On 3rd try, solution is n=13485 2n=26970; if this is still wrong I'm giving up high school and going back to primary school
Code:
0123456789 abcde fghik, 1 try a in 123456789, can't start with 0 per fresh_42
0..3456789 1bcde 2ghik, 2 bcde <= 4999, try b in 03
...3456789 10cde 20hik, 3 cde <= 499 rejected repeated 0
...3456789 10cde 21hik, 3 cde >= 500 rejected repeated 1
0...45.789 13cde 26hik, 3 cde <= 499 try c in 04 (this is the line that had a bug... 2*13 = 26, not 21, haha)
...45.789 130de 260ik, 3 de <= 499 rejected repeated 0
...45.789 130de 261ik, 3 de >= 500 rejected repeated 1
0...5.7.9 134de 268ik, 3 de <= 499 try d in 0
...5.7.9 1340e 2680k, 4 e <= 4 rejected repeated 0
...5.7.9 1340e 2681k, 4 e >= 5 rejected repeated 1
0...5.78. 134de 269ik, 3 de >= 500 try d in 578
...78. 1345e 2690k, 4 e <= 4 rejected no values for e
0...78. 1345e 2691k, 4 e >= 5 rejected repeated 1
0...5..8. 1347e 2694k, 4 e <= 4 rejected repeated 4
0...8. 1347e 2695k, 4 e >= 5 try e in 8
0... 13478 26956, rejected repeated 6
0...5.7.. 1348e 2696k, 4 e <= 4 rejected repeated 6
0...5... 1348e 2697k, 4 e >= 5 try e in 5
... 13485 26970, stop

This is correct, keep on learning! :smile:

The manual solution isn't really better than your algorithm. It goes along the following lines:
  • If the 0 is in n, then 1 and 5 must be in 2n.
  • If the 0 is in 2n, then 5 and 1 must be in n.
  • If the 9 is in n, 8 and 4 in 2n must be in it.
  • If the 9 in 2n is in, 4 and 8 must be in n.
etc.
 
Last edited:

Similar threads

  • · Replies 61 ·
3
Replies
61
Views
10K
  • · Replies 56 ·
2
Replies
56
Views
11K
  • · Replies 42 ·
2
Replies
42
Views
11K
  • · Replies 114 ·
4
Replies
114
Views
11K
  • · Replies 86 ·
3
Replies
86
Views
14K
  • · Replies 93 ·
4
Replies
93
Views
15K
  • · Replies 100 ·
4
Replies
100
Views
12K
  • · Replies 67 ·
3
Replies
67
Views
11K
  • · Replies 61 ·
3
Replies
61
Views
12K
  • · Replies 80 ·
3
Replies
80
Views
10K