Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Sep 08 2022 08:46:02
%S 9,11,13,15,25,27,29,31,41,43,45,47,57,59,61,63,73,75,77,79,89,91,93,
%T 95,105,107,109,111,121,123,125,127,137,139,141,143,153,155,157,159,
%U 169,171,173,175,185,187,189,191,201,203,205,207,217,219,221,223,233,235,237,239,249,251
%N n such that n XOR 9 = n - 9.
%H G. C. Greubel, <a href="/A214865/b214865.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F a(n) = 4*n + 6 + (-1)^n + 2*(-1)^((2*n+(-1)^n-1)/4) for n>=0.
%F a(n) = A016825(n+1) + A132429(n) for n>=0.
%F G.f. x*(9+2*x+2*x^2+2*x^3+x^4) / ( (1+x)*(x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Mar 10 2013
%F a(n+4) = a(n) + 16. - _Alexander R. Povolotsky_, Mar 15 2013
%t CoefficientList[Series[x*(9 + 2*x + 2*x^2 + 2*x^3 + x^4)/((1 + x)*(x^2 + 1)*(x - 1)^2), {x,0,50}], x] (* _G. C. Greubel_, Feb 22 2017 *)
%o (Magma)
%o XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2)
%o where adigs := Intseq(a, 2, n)
%o where bdigs := Intseq(b, 2, n)
%o where n := 1 + Ilog2(Max([a, b, 1]))>;
%o m:=9;
%o for n in [1 .. 500] do
%o if (XOR(n, m) eq n-m) then n; end if;
%o end for;
%o (PARI) x='x+O('x^50); Vec(x*(9+2*x+2*x^2+2*x^3+x^4) / ( (1+x)*(x^2+1)*(x-1)^2 )) \\ _G. C. Greubel_, Feb 22 2017
%Y Cf. A214863, A016825, A132429.
%K nonn,easy
%O 1,1
%A _Brad Clardy_, Mar 09 2013