[go: up one dir, main page]

login
A115423
Integers n > 0 such that n XOR 30*n = 31*n.
5
1, 2, 4, 8, 16, 32, 33, 64, 65, 66, 128, 129, 130, 132, 256, 257, 258, 260, 264, 512, 513, 514, 516, 520, 528, 1024, 1025, 1026, 1028, 1032, 1040, 1056, 1057, 2048, 2049, 2050, 2052, 2056, 2064, 2080, 2081, 2112, 2113, 2114, 4096, 4097, 4098, 4100, 4104, 4112
OFFSET
1,2
LINKS
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
Cf. A003714 (Fibbinary numbers), A048715, A048718, A115422, A115424.
Sequence in context: A070339 A070338 A331380 * A221467 A337696 A045603
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 22 2006
STATUS
approved