login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A214865
n such that n XOR 9 = n - 9.
2
9, 11, 13, 15, 25, 27, 29, 31, 41, 43, 45, 47, 57, 59, 61, 63, 73, 75, 77, 79, 89, 91, 93, 95, 105, 107, 109, 111, 121, 123, 125, 127, 137, 139, 141, 143, 153, 155, 157, 159, 169, 171, 173, 175, 185, 187, 189, 191, 201, 203, 205, 207, 217, 219, 221, 223, 233, 235, 237, 239, 249, 251
OFFSET
1,1
FORMULA
a(n) = 4*n + 6 + (-1)^n + 2*(-1)^((2*n+(-1)^n-1)/4) for n>=0.
a(n) = A016825(n+1) + A132429(n) for n>=0.
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
a(n+4) = a(n) + 16. - Alexander R. Povolotsky, Mar 15 2013
MATHEMATICA
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 *)
PROG
(Magma)
XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2)
where adigs := Intseq(a, 2, n)
where bdigs := Intseq(b, 2, n)
where n := 1 + Ilog2(Max([a, b, 1]))>;
m:=9;
for n in [1 .. 500] do
if (XOR(n, m) eq n-m) then n; end if;
end for;
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brad Clardy, Mar 09 2013
STATUS
approved