Padovan sequence¶
The Padovan sequence is the following infinite sequence of natural numbers: 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 ...
The sequence begins with the subsquence \([1, 1, 1]\) and then each term is the sum of two terms before the last one, that is:
\(P(0) = 1\)
\(P(1) = 1\)
\(P(2) = 1\)
\(P(n) = P(n-2) + P(n-3)\)
The Padovan sequence is a cousin of the Fibonacci sequence and has many applications in applied mathematics. As a curiosity, the Padovan sequence can be represented as a set of joined equilateral triangles forming an spiral:

Recall that in Python, the last elements of the array can be accessed directly using negative indices, for example, array[-1] would be the last element of the array, array [-2] the second to last, and so on. Also, remember that the append() function, adds an element to the end of the array.
With everything explained so far, develop the following program:
A program that asks the user for a length and generates a Padovan sequence of that length, stores it in an array and prints the array.