function factory( n ) {
	var coefs;
	var an;
	var f;
	var s;

	an = abs( n );
	coefs = coefficients( an );

	f = evalpoly( coefs );
	s = pow( -1.0, an );
	if ( n >= 0 || s === 1.0 ) {
		return f;
	}
	return polyval;

	/**
	* Evaluates a Lucas polynomial.
	*
	* @private
	* @param {number} x - value at which to evaluate a Lucas polynomial
	* @returns {number} result
	*/
	function polyval( x ) {
		return -1.0 * f( x );
	}
}
Returns a function for evaluating a Lucas polynomial.

@param {integer} n - Lucas polynomial to evaluate
@returns {Function} function for evaluating a Lucas polynomial

@example
var polyval = factory( 5 );

var v = polyval( 1.0 );
// returns 11.0

v = polyval( 2.0 );
// returns 82.0