This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A370852 #11 Jul 23 2025 16:05:18 %S A370852 0,0,1,1,2,1,2,0,1,2,3,4,1,2,4,5,1,2,5,6,1,2,5,1,2,4,5,7,8,0,1,2,3,4, %T A370852 5,6,7,8,9,1,2,4,5,6,7,9,10,1,2,5,10,0,1,2,3,4,5,6,7,8,9,10,11,12,1,2, %U A370852 5,6,8,9,12,13,1,2,4,5,7,8,10,11,13,14 %N A370852 Irregular triangle read by rows: row n is the list of residues mod n that occur among the Markov numbers. %C A370852 Length of row n is A370164(n). %D A370852 Martin Aigner, Markov's theorem and 100 years of the uniqueness conjecture. A mathematical journey from irrational numbers to perfect matchings. Springer, 2013. x+257 pp. ISBN: 978-3-319-00887-5; 978-3-319-00888-2 MR3098784. %H A370852 Martin Aigner, <a href="https://archive.org/details/markovstheorem100000aign">Markov's theorem and 100 years of the uniqueness conjecture. A mathematical journey from irrational numbers to perfect matchings</a>, [archive.org copy of the book]. %e A370852 The first rows are: %e A370852 n %e A370852 1: 0 %e A370852 2: 0 1 %e A370852 3: 1 2 %e A370852 4: 1 2 %e A370852 5: 0 1 2 3 4 %e A370852 6: 1 2 4 5 %e A370852 7: 1 2 5 6 %e A370852 8: 1 2 5 %e A370852 9: 1 2 4 5 7 8 %e A370852 10: 0 1 2 3 4 5 6 7 8 9 %e A370852 11: 1 2 4 5 6 7 9 10 %e A370852 12: 1 2 5 10 %e A370852 13: 0 1 2 3 4 5 6 7 8 9 10 11 12 %e A370852 14: 1 2 5 6 8 9 12 13 %e A370852 15: 1 2 4 5 7 8 10 11 13 14 %e A370852 16: 1 2 5 9 13 %e A370852 17: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 %e A370852 18: 1 2 4 5 7 8 10 11 13 14 16 17 %e A370852 19: 1 2 3 4 5 6 8 9 10 11 13 14 15 16 17 18 %e A370852 20: 1 2 5 6 9 10 13 14 17 18 %e A370852 For n = 14 residues congruent to 0, 3, or 4 mod 7 are forbidden. (See comments to A370164 for explanation.) All other residues occur. For example, the Markov numbers 1, 2, 5, 34, 610, 1325, 194, and 13 produce the residues shown in row 14 of the triangle (mod 14). %o A370852 (SageMath) %o A370852 def generateAllMarkovTreeResidues(n): %o A370852 row = [[1 % n,5 % n,2 % n]] %o A370852 residuesFound = [] %o A370852 triplesFound = [] %o A370852 while row != []: %o A370852 newRow = [] %o A370852 for trpl in row: %o A370852 if trpl[1] not in residuesFound: %o A370852 residuesFound.append(trpl[1]) %o A370852 if trpl[2] < trpl[0]: %o A370852 trpl.reverse() %o A370852 if trpl not in triplesFound: %o A370852 triplesFound.append(trpl) %o A370852 newRow.append([trpl[0],(3*trpl[0]*trpl[1]-trpl[2]) % n,trpl[1]]) %o A370852 newRow.append([trpl[1],(3*trpl[1]*trpl[2]-trpl[0]) % n,trpl[2]]) %o A370852 row = newRow %o A370852 residuesFound.sort() %o A370852 return(residuesFound) %o A370852 [r for n in range(1,16) for r in generateAllMarkovTreeResidues(n)] %Y A370852 Markov numbers: A002559. %Y A370852 Markov tree: A327345, A368546. %Y A370852 Cf. A370164. %K A370852 nonn,tabf %O A370852 1,5 %A A370852 _Wouter Meeussen_ and _William P. Orrick_, Mar 03 2024