n-th derivative of sec x


From the computation in Derive the following interesting pattern is seen:

d
dx
sec  x sin  x
cos2x
d2
dx2
sec  x 1
cos  x
+2 sin2x
cos3x
d3
dx3
sec  x = 5 sin  x
cos2x
+6 sin3x
cos4x
d4
dx4
sec  x 5
cos  x
+28 sin2x
cos3x
+24 sin4x
cos5x
d5
dx5
sec  x = 61 sin  x
cos2x
+180 sin3x
cos4x
+120 sin5x
cos6x
d6
dx6
sec  x 61
cos  x
+662 sin2x
cos3x
+1320 sin4x
cos5x
+720 sin6x
cos7x

The accompany table below show how the coefficients can be generated in a spreadsheet program:
0
1
2
3
4
5
6
7
8
1
               
0
1
0
0
0
0
0
0
0
1
0
2
0
0
0
0
0
0
0
5
0
6
0
0
0
0
0
5
0
28
0
24
0
0
0
0
0
61
0
180
0
120
0
0
0
61
0
662
0
1320
0
720
0
0
0
1385
0
7266
0
10920
0
5040
0
1385
0
24568
0
83664
0
100800
0
40320

How is this created?