login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A334915
Numbers whose XOR-triangles have central zeros.
1
0, 8, 9, 14, 15, 16, 17, 30, 31, 32, 33, 62, 63, 64, 65, 66, 67, 72, 73, 74, 75, 84, 85, 86, 87, 92, 93, 94, 95, 96, 97, 98, 99, 104, 105, 106, 107, 116, 117, 118, 119, 124, 125, 126, 127, 128, 129, 130, 131, 148, 149, 150, 151, 168, 169, 170, 171, 188, 189
OFFSET
1,2
COMMENTS
Depending on the binary length of n, the center of the XOR-triangle for n consists of a single cell or a 2 X 2 X 2 triangle pointing upwards or downwards.
EXAMPLE
The XOR-triangles for a(8) = 30 and a(18) = 72 are as follows:
. 1 1 1 1 0 1 0 0 1 0 0 0
. ---------
. 0 \ 0 0 / 1 1 0 1 1 0 0
. \ / / \
. 0 \ 0 / 1 1 1 / 0 \ 1 0
. \ / -----
. 0 1 0 1 1 1
.
. 1 1 0 0
.
. 1 0
.
. 1
PROG
(PARI) is(n) = {
my (h=#binary(n)-1, l=0, m);
while (abs(h-l)>1, n=bitxor(m=n, n\2); h-=2; l++);
if (h>l, bittest(n, h)==0 && bittest(n, l)==0,
h<l, bittest(n, h)==0 && bittest(n, l)==0 && bittest(m, l)==0,
bittest(n, h)==0
)
}
CROSSREFS
Cf. A334769.
Sequence in context: A076769 A105741 A286475 * A308893 A083134 A299143
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 16 2020
STATUS
approved