User blog comment:QuasarBooster/Laver tables in Python/@comment-35470197-20181211055052/@comment-24923514-20181211145510

Thank you! The first few things that it's doing creates the first column of a size-n Laver table. After that, it fills out each row from the bottom row to the top row by referencing previous entries from the table. (I didn't know you could create Laver tables like that, but I read from [] that it's a valid way to make them.) The last couple lines in p(n) just find the period of the first row. There's one difference in the tables that my code creates and the real Laver tables. This difference is just to make the total code shorter. For example, Actual size-2 table: 1 2 3 4 --- 1|2 4 2 4 2|3 4 3 4 3|4 4 4 4 4|1 2 3 4

Table made by my code: 0 1 2 3 --- 0|1 3 1 3 1|2 3 2 3 2|3 3 3 3 3|0 1 2 3