Page 1 of 1
Bonus problem 0 - 1/ (0 - 1 (0 .... (called #contfrac in browser tab)
Posted: Sat Apr 25, 2026 6:35 pm
by hughbert_cumberdale
I'm working on the bonus problem about negatively continued fractions, does the set of coefficients have to repeat immediately or can there be a non-repeating section first?
Re: Bonus problem 0 - 1/ (0 - 1 (0 .... (called #contfrac in browser tab)
Posted: Mon Apr 27, 2026 6:32 am
by neverforget
Periodic negatively continued fractions have no non-repeating section.
Re: Bonus problem 0 - 1/ (0 - 1 (0 .... (called #contfrac in browser tab)
Posted: Mon Apr 27, 2026 9:45 am
by hughbert_cumberdale
Great thanks. This is a hard question, there seems to be very little written about negatively continued fractions so it's hard to learn the number theory for it. My code gives the wrong answer and only takes 13 hours

Re: Bonus problem 0 - 1/ (0 - 1 (0 .... (called #contfrac in browser tab)
Posted: Mon Jun 01, 2026 11:50 pm
by hughbert_cumberdale
Another question, it's not clear to me if repeated sequences are valid, for example if 1,2 is a complex sequence, and 1,2,1,2 is also complex, then do we count both? Because by my calculations, 1,1 is a complex sequence but in the example it says that the only complex sequences that are 2 elements long are 1,2 2,1 1,3 and 3,1.
Re: Bonus problem 0 - 1/ (0 - 1 (0 .... (called #contfrac in browser tab)
Posted: Tue Jun 02, 2026 9:56 am
by pjt33
hughbert_cumberdale wrote: Mon Jun 01, 2026 11:50 pm
Another question, it's not clear to me if repeated sequences are valid, for example if 1,2 is a complex sequence, and 1,2,1,2 is also complex, then do we count both?
They are infinite periodic sequences, so $\overline{1, 2}$ and $\overline{1, 2, 1, 2}$ are the same sequence and should only be counted once.