login
A322015
If A003188(n+1) < A003188(n), then a(n) = n+1, otherwise a(n) = 0.
3
0, 0, 3, 0, 0, 6, 7, 0, 0, 0, 11, 12, 0, 14, 15, 0, 0, 0, 19, 0, 0, 22, 23, 24, 0, 0, 27, 28, 0, 30, 31, 0, 0, 0, 35, 0, 0, 38, 39, 0, 0, 0, 43, 44, 0, 46, 47, 48, 0, 0, 51, 0, 0, 54, 55, 56, 0, 0, 59, 60, 0, 62, 63, 0, 0, 0, 67, 0, 0, 70, 71, 0, 0, 0, 75, 76, 0, 78, 79, 0, 0, 0, 83, 0, 0, 86, 87, 88, 0, 0, 91, 92, 0, 94, 95, 96
OFFSET
0,3
MATHEMATICA
With[{nn = 96}, ReplacePart[ConstantArray[0, nn], Map[# -> # &, 1 + Position[Partition[Array[BitXor[#, Floor[#/2]] &, nn], 2, 1], _?(First@ # > Last@ # &), {1}, Heads -> False][[All, 1]] ]]] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI)
A003188(n) = bitxor(n, n>>1);
A322015(n) = if(A003188(1+n)<A003188(n), 1+n, 0);
CROSSREFS
Cf. also A091067, A255068.
Sequence in context: A325014 A343992 A275689 * A285311 A285131 A110620
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 24 2018
STATUS
approved