user
The Padovan sequence is similar to the Fibonacci sequence in several ways.
Some are given in the table below, and the referenced video shows some of the geometric
similarities.

:   :   | Comment | Padovan | Fibonacci |
        | --- | --- | --- |
        |  |  |  |
        | Named after. | Richard Padovan | Leonardo of Pisa: Fibonacci |
        |  |  |  |
        | Recurrence initial values. | P(0)=P(1)=P(2)=1 | F(0)=0, F(1)=1 |
        | Recurrence relation. | P(n)=P(n-2)+P(n-3) | F(n)=F(n-1)+F(n-2) |
        |  |  |  |
        | First 10 terms. | 1,1,1,2,2,3,4,5,7,9 | 0,1,1,2,3,5,8,13,21,34 |
        |  |  |  |
        | Ratio of successive terms... | Plastic ratio, p | Golden ratio, g |
        |  | 1.324717957244746025960908854… | 1.6180339887498948482... |
        | Exact formula of ratios p and q. | ((9+69\*\*.5)/18)\*\*(1/3) + ((9-69\*\*.5)/18)\*\*(1/3) | (1+5\*\*0.5)/2 |
        | Ratio is real root of polynomial. | p: x\*\*3-x-1 | g: x\*\*2-x-1 |
        |  |  |  |
        | Spirally tiling the plane using. | Equilateral triangles | Squares |
        |  |  |  |
        | Constants for ... | s= 1.0453567932525329623 | a=5\*\*0.5 |
        | ... Computing by truncation. | P(n)=floor(p\*\*(n-1) / s + .5) | F(n)=floor(g\*\*n / a + .5) |
        |  |  |  |
        | L-System Variables. | A,B,C | A,B |
        | L-System Start/Axiom. | A | A |
        | L-System Rules. | A->B,B->C,C->AB | A->B,B->AB |

Task

* Write a function/method/subroutine to compute successive members of the Padovan series using the recurrence relation.
* Write a function/method/subroutine to compute successive members of the Padovan series using the floor function.
* Show the first twenty terms of the sequence.
* Confirm that the recurrence and floor based functions give the same results for 64 terms,
* Write a function/method/... using the L-system to generate successive strings.
* Show the first 10 strings produced from the L-system
* Confirm that the length of the first 32 strings produced is the Padovan sequence.

Show output here, on this page.

Ref

* The Plastic Ratio - Numberphile video.
assistant
```
constant p = 1.32471795724474602596;
constant s = 1.0453567932525329623;
constant %rules = A => 'B', B => 'C', C => 'AB';

my @pad-recur = 1, 1, 1, -> $c, $b, $ { $b + $c }  … *;

my @pad-floor = { floor 1/2 + p ** ($++ - 1) / s } … *;

my @pad-L-sys = 'A', { %rules{$^axiom.comb}.join } … *;
my @pad-L-len = @pad-L-sys.map: *.chars;

say @pad-recur.head(20);
say @pad-L-sys.head(10);

say "Recurrence == Floor to N=64" if (@pad-recur Z== @pad-floor).head(64).all;
say "Recurrence == L-len to N=32" if (@pad-recur Z== @pad-L-len).head(32).all;

```

Output:

```
(1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151)
(A B C AB BC CAB ABBC BCCAB CABABBC ABBCBCCAB)
Recurrence == Floor to N=64
Recurrence == L-len to N=32

```