t = 15
len p[] t
# 
proc padovan n . .
   if n < 2 or t < 3
      for i = 1 to t
         p[i] = 1
      .
      return
   .
   padovan n - 1
   for i = n + 2 to t
      p[i] = 0
      for j = i - 2 downto i - n - 1
         p[i] += p[j]
      .
   .
.
for n = 2 to 8
   padovan n
   write n & ": "
   for i = 1 to t
      write p[i] & " "
   .
   print ""
.
