A214864 Numbers k such that k XOR 10 = k - 10.
10, 11, 14, 15, 26, 27, 30, 31, 42, 43, 46, 47, 58, 59, 62, 63, 74, 75, 78, 79, 90, 91, 94, 95, 106, 107, 110, 111, 122, 123, 126, 127, 138, 139, 142, 143, 154, 155, 158, 159, 170, 171, 174, 175, 186, 187, 190, 191, 202
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
Programs
-
Magma
XOR := func; m:=10; for n in [1 .. 250] do if (XOR(n, m) eq n-m) then n; end if; end for;
-
Mathematica
Select[Range[200], BitXor[#, 10] == # - 10 &] (* Alonso del Arte, Oct 26 2013 *)
-
Python
def A214864(n): return (10,11,14,15)[n-1&3]+((n-1&-4)<<2) # Chai Wah Wu, Jan 30 2023
Formula
a(n) = 4*n + 6 + (3*(-1)^n+1)/2 + 2*(-1)^((2*n-1+(-1)^n)/4) for n >= 0.
G.f. x*(10+x+3*x^2+x^3+x^4) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Mar 10 2013
Numbers k such that k mod 16 is one of {10, 11, 14, 15}. - Joerg Arndt, Mar 15 2013
a(n) = 16*floor((n-1)/4) + ((n-1) mod 2) + 4*floor(((n-1) mod 4)/2) + 10. - Gary Detlefs, Oct 26 2013 [corrected by Jason Yuen, Oct 27 2024]