A322015 If A003188(n+1) < A003188(n), then a(n) = n+1, otherwise a(n) = 0.
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
Keywords
Links
Programs
-
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 *)
-
PARI
A003188(n) = bitxor(n, n>>1); A322015(n) = if(A003188(1+n)<A003188(n),1+n,0);