login
A115831
Numbers k such that 9*k XOR 16*k = 25*k, or equally, that 9*k AND 16*k = 0, where AND is bitwise-and.
4
0, 1, 2, 4, 5, 8, 10, 16, 20, 32, 33, 40, 64, 65, 66, 80, 128, 129, 130, 132, 133, 143, 160, 161, 256, 257, 258, 260, 261, 264, 266, 285, 286, 320, 321, 322, 512, 513, 514, 516, 517, 520, 522, 528, 532, 569, 570, 572, 573, 640, 641, 642, 644, 645, 655, 1024
OFFSET
1,3
COMMENTS
If n is a term, then 2*n is also a term, and vice versa.
EXAMPLE
143 = "10001111" (in binary, A007088(143)), when multiplied by 9, gives:
.
11111 (carry bits)
10001111 = 8*143
10001111 = 143
--------------
10100000111 = 1287 = 8*143 + 143 = 9*143
10001111 = (16*143)
--------------
110111110111 = 1287 XOR 16*143 = 1287 + 16*143 = 3575 = 16*k + 8*k + k (= 25*k) as (1287 AND 16*143) = 0, and therefore 143 is included in this sequence.
MATHEMATICA
Select[Range[0, 1100], BitXor[9#, 16#]==25#&] (* Harvey P. Dale, Mar 22 2012 *)
PROG
(PARI) is(n)=bitxor(9*n, 16*n)==25*n \\ Charles R Greathouse IV, Sep 25 2024
(PARI) is_A115831(n) = !bitand(9*n, 16*n); \\ Antti Karttunen, Dec 22 2025
CROSSREFS
Cf. A003987, A004198, A115832 (terms shown in binary).
Cf. A391737 (subsequence).
Cf. also A115422.
Sequence in context: A133075 A018433 A228939 * A391737 A094958 A018565
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 01 2006
EXTENSIONS
An alternative definition added to the name, starting offset corrected, and also an example was written by Antti Karttunen, Dec 22 2025
STATUS
approved