recursion formula uses results from http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
for Butterworth, 5th order, corner=1000, sampling=10000
note: y[[ ]] refers to an entry number in a Table (or array) ...the entry number is a whole number 1 to max
      yy[ ] is a function of a real (or even complex) number


y=Table[0,{i, 50}]
x[n_]=UnitStep[n-6]

Do[
y[[n]] = 1 x[n- 5] + 5 x[n- 4] + 10 x[n- 3] + 10 x[n- 2] + 5 x[n- 1] + 1 x[n- 0] +
 0.1254306222 y[[n- 5]] + -0.8811300754 y[[n- 4]] + 2.5452528683 y[[n- 3]] + -3.8060181193 y[[n- 2]] + 2.9754221097 y[[n- 1]],
{n,6,50}]
ListPlot[y, Joined->True, PlotRange->All]

w=.5
x[n_]:=Exp[I w n]
y=Table[0,{i, 100}]
Do[
y[[n]] = 1 x[n- 5] + 5 x[n- 4] + 10 x[n- 3] + 10 x[n- 2] + 5 x[n- 1] + 1 x[n- 0] +
 0.1254306222 y[[n- 5]] + -0.8811300754 y[[n- 4]] + 2.5452528683 y[[n- 3]] + -3.8060181193 y[[n- 2]] + 2.9754221097 y[[n- 1]],
{n,6,100}]
ListPlot[Re[y], Joined->True, PlotRange->All]

w=1.5
y=Table[0,{i, 60}]
Do[
y[[n]] = 1 x[n- 5] + 5 x[n- 4] + 10 x[n- 3] + 10 x[n- 2] + 5 x[n- 1] + 1 x[n- 0] +
 0.1254306222 y[[n- 5]] + -0.8811300754 y[[n- 4]] + 2.5452528683 y[[n- 3]] + -3.8060181193 y[[n- 2]] + 2.9754221097 y[[n- 1]],
{n,6,60}]
ListPlot[Re[y], Joined->True, PlotRange->All]

ClearAll[w]
xx[n_]=Exp[I w n]
yy[n_]=Exp[I w n]

A[w_]= (1 xx[- 5] + 5 xx[- 4] + 10 xx[- 3] + 10 xx[- 2] + 5 xx[- 1] + 1 xx[- 0] )/
(1-(0.1254306222 yy[- 5] + -0.8811300754 yy[- 4] + 2.5452528683 yy[- 3] + -3.8060181193 yy[- 2] + 2.9754221097 yy[- 1]))

Plot[Abs[A[w]],{w,.01,Pi}]

Show[GraphicsArray[{{%9,%13},{%4,%18}}]]
PSPrint[%]
