OFFSET
1,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
This sequence also seems to satisfy:
3*a(n) XOR 21*a(n) = 22*a(n);
5*a(n) XOR 19*a(n) = 22*a(n);
6*a(n) XOR 19*a(n) = 21*a(n); etc.
a(A003520(n+4)) = 2^n. - Gheorghe Coserea, Nov 11 2016
MATHEMATICA
Select[Range[4200], BitXor[#, 30#]==31#&] (* Harvey P. Dale, May 23 2017 *)
PROG
(Perl)
$cnt=0;
foreach(1..4_000){
print ++$cnt, " $_\n" if ((30*$_)^$_)==31*$_;
}
# Ivan Neretin, Nov 11 2016
(PARI) isok(n) = bitxor(n, 30*n) == 31*n; \\ Michel Marcus, Nov 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 22 2006
STATUS
approved