Dear Justin,
It's good to see that you're writing some webwork questions. The short answer to your question is to remove the string NONE from the context. Also, I would recommend making the following modifications, which I made in the PG code below:
1. In the text of the problem, specify the type of answer you're expecting from students (a closed formula instead of just a formula).
2. In the text of the problem, specify where the indexing starts so that students are clear that it starts with a_1 and not a_0.
3. Make the question a bit more randomized by allowing the "radius" to be randomized rather than always fixed at 2.
4. Modify the context using variables->are(n=>"Real") so that the only variable in the context is n. Using variables->add(n=>"Real") retains the variable x in the context so that both n and x are in the context. Accordingly, using variables->are(n=>"Real"), you can now shorten your test points from pairs of numbers to singletons. In this particular question, having two variables in the context is probably not going to confuse students. Other times, though, it can. For example, if you add the variable t to the context, students may instinctively use x and will not figure out why their answer is incorrect. However, if you declare that the only variable is t using variables->are(t=>"Real"), students who enter an answer in terms of x will get an error message, realize their mistake, and correct it without needing to ask for help.
5. Don't forget to change back to normalStrings after END_TEXT.
Good luck!
Paul Pearson
#########################################
# Initialization
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGcourse.pl",
);
TEXT(beginproblem());
#########################################
# Setup
Context("Numeric");
Context()->variables->are(n=>'Real');
Context()->operators->undefine(",");
Context()->strings->remove("NONE");
$a = random(1,12,1);
$b = random(2,5,1);
$apb = $a + $b;
$c = $a+2*$b;
$ans = Formula("$apb + $b * (-1)^n");
$ans->{test_points} = [[2],[3],[4],[5],[6],[7],[8],[9],[10]];
########################################
# Main text
Context()->texStrings;
BEGIN_TEXT
Find a closed formula for the general term
\(a_n\) of the sequence \( \lbrace$a,$c,$a,$c, \ldots\rbrace \),
assuming that the first term is \( a_1 \).
$BR
$BR
\(a_n =\) \{ans_rule(20)\}
END_TEXT
Context()->normalStrings;
########################################
# Answer evaluation
$showPartialCorrectAnswers = 1;
ANS( $ans->cmp() );
ENDDOCUMENT();