OFFSET
1,3
COMMENTS
If n is a term, then 2*n is also a term, and vice versa.
LINKS
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
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
