Call a subset S of {1,2,…,n} mediocre if it has the following property: Whenever a and b are elements of S whose average is an integer, that average is also an element of S. Let A(n) be the number of mediocre subsets of {1,2,…,n}. [For instance, every subset of {1,2,3} except {1,3} is mediocre, so A(3)\equal{}7.] Find all positive integers n such that A(n\plus{}2)\minus{}2A(n\plus{}1)\plus{}A(n)\equal{}1. Putnamfloor functionarithmetic sequencecollege contests