local mm = require('Module:Math')local p =
function p.factorial(num) out = 1 while num > 1 do out = out * num num = num - 1 end return outend
function p.getN(n) if n
function p.getNe(n) if n
function p.getSeriesRight(m) n = 1 s = p.getNe(0) while n <= m do s = s .. " + " .. p.getNe(n) n = n + 1 end return send
function p.getSeriesLeft(m) return "\\sum\\limits_^ ="end
function p.getSeries(m) return p.getSeriesLeft(m) .. p.getSeriesRight(m)end
function p.term(frame) return p.getN(mm._cleanNumber(frame.args[1]))end
function p.termE(frame) return p.getNe(mm._cleanNumber(frame.args[1]))end
function p.series(frame) return p.getSeries(mm._cleanNumber(frame.args[1]))end
function p.renderMath(frame) return frame:extensionTag("math",frame.args[1],)end
return p