%I #14 Jan 02 2023 12:30:47
%S 1,1,2,4,8,16,28,49,84,144,252,441,777,1369,2405,4225,7410,12996,
%T 22800,40000,70200,123201,216216,379456,665896,1168561,2050657,
%U 3598609,6315113,11082241,19448018,34128964,59892184,105103504,184443732,323676081,568011852
%N Number of subsets S of {1,2,3,...,n} with the property that if x is a member of S then at least one of x-2 and x+2 is also a member of S.
%C It is interesting that, for k > 0, it appears that a(2k) is the square of A005251(k+2). (This has since been proved by _Andrew Weimholt_; see link.)
%C If we denote by d2 the second difference of {a(n)}, it appears that d2(2k) is the square of A005314(k).
%H Colin Barker, <a href="/A172020/b172020.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="http://list.seqfan.eu/oldermail/seqfan/2010-January/003475.html">Proof by Andrew Weimholt</a>, SeqFan Jan 2010
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-1,-1,3,-1,0,1,-1).
%F _Andrew Weimholt_ has shown that a(2*n) = A005251(n+2) ^ 2, and a(2*n+1) = A005251(n+2) * A005251(n+3). (See the link.)
%F G.f.: x*(1 - x + x^3 + 2*x^4 - x^8) / ((1 - 2*x + x^2 - x^3)*(1 + x - x^3)*(1 - x + x^3)). - _Colin Barker_, Feb 15 2016
%t LinearRecurrence[{2, 0, -1, -1, 3, -1, 0, 1, -1}, {1, 1, 2, 4, 8, 16, 28, 49, 84}, 32] (* _Jean-François Alcover_, Feb 15 2016 *)
%o (PARI) Vec(x*(1-x+x^3+2*x^4-x^8)/((1-2*x+x^2-x^3)*(1+x-x^3)*(1-x+x^3)) + O(x^50)) \\ _Colin Barker_, Feb 15 2016
%Y Cf. A005251, A005314.
%K nonn,easy
%O 1,3
%A _John W. Layman_, Jan 22 2010