OFFSET
1,2
COMMENTS
n is in the sequence iff 2*n is in the sequence. - Robert Israel, Nov 11 2016
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10203
FORMULA
This sequence also seems to satisfy:
5*a(n) XOR 16*a(n) = 21*a(n);
5*a(n) XOR 17*a(n) = 20*a(n); etc.
a(A224809(n+4)) = 2^n. - Gheorghe Coserea, Nov 11 2016
MAPLE
select(n -> Bits:-Xor(n, 20*n)=21*n, [$1..1000]); # Robert Israel, Nov 11 2016
MATHEMATICA
Select[Range[600], BitXor[#, 20#]==21#&] (* Harvey P. Dale, Apr 21 2018 *)
PROG
(Perl)
$cnt=0;
foreach(1..1_000){
print ++$cnt, " $_\n" if ((20*$_)^$_)==21*$_;
}
# Ivan Neretin, Nov 10 2016
(PARI) isok(n) = bitxor(n, 20*n) == 21*n; \\ Michel Marcus, Nov 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 22 2006
STATUS
approved