Braid Description
In this braid, when a strand crosses over the top of another strand it adds the other strand's value to itself and all other strand values pass through. The braid has three strands and each strand begins at 1. The first crossover is the leftmost strand crossing over the middle strand. The next crossover is the rightmost strand crossing over the new middle strand (previously the leftmost strand). These two steps of crossovers repeat. In other words, the first crossover is [a, b, c] -> [b, a+b, c]
and the second is [a, b, c] -> [a, b+c, b]
. Using these rules here are the first six levels of the braid:
1,1,1
1,2,1
1,3,2
3,4,2
3,6,4
6,9,4
Your task
Write a golfed program or function that accepts an integer as the braid level and outputs the three values for that level of the braid. You must indicate if your levels are zero- or one-based. Input and output may come in any reasonable format and trailing white space is allowed.
Test Cases (1-based)
1 -> 1,1,1
2 -> 1,2,1
5 -> 3,6,4
10 -> 28,41,19