Padovan L-system
If we define the following simple grammar:
- variables : A B C
- constants : none
- start : A
- rules : (A → B), (B → C), (C → AB)
then this Lindenmayer system or L-system produces the following sequence of strings:
- n = 0 : A
- n = 1 : B
- n = 2 : C
- n = 3 : AB
- n = 4 : BC
- n = 5 : CAB
- n = 6 : ABBC
- n = 7 : BCCAB
- n = 8 : CABABBC
and if we count the length of each string, we obtain the Padovan sequence of numbers:
- 1 1 1 2 2 3 4 5 ...
Also, if you count the number of As, Bs and Cs in each string, then for the nth string, you have P(n − 5) As, P(n − 3) Bs and P(n − 4) Cs. The count of BB pairs, AA pairs and CC pairs are also Padovan numbers.
Read more about this topic: Padovan Sequence