Advertisement
mate2code

OR and XOR of binary exponents

May 22nd, 2024
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.71 KB | None | 0 0
  1. # https://commons.wikimedia.org/wiki/File:OR_and_XOR_of_binary_exponents.svg
  2. # https://oeis.org/A327041   OR
  3. # https://oeis.org/A261283  XOR
  4.  
  5. #                0     2     4     6     8    10    12    14    16    18    20    22    24    26    28    30    32    34    36    38    40    42    44    46    48    50    52    54    56    58    60    62    64    66    68    70    72    74    76    78    80    82    84    86    88    90    92    94    96    98   100   102   104   106   108   110   112   114   116   118   120   122   124   126
  6. sequence_or   = [0, 1, 2, 3, 3, 3, 3, 3, 4, 5, 6, 7, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 6, 7, 6, 7, 7, 7, 7, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]
  7. sequence_xor  = [0, 1, 2, 3, 3, 2, 1, 0, 4, 5, 6, 7, 7, 6, 5, 4, 5, 4, 7, 6, 6, 7, 4, 5, 1, 0, 3, 2, 2, 3, 0, 1, 6, 7, 4, 5, 5, 4, 7, 6, 2, 3, 0, 1, 1, 0, 3, 2, 3, 2, 1, 0, 0, 1, 2, 3, 7, 6, 5, 4, 4, 5, 6, 7, 7, 6, 5, 4, 4, 5, 6, 7, 3, 2, 1, 0, 0, 1, 2, 3, 2, 3, 0, 1, 1, 0, 3, 2, 6, 7, 4, 5, 5, 4, 7, 6, 1, 0, 3, 2, 2, 3, 0,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