I am developing an algorithm that uses a lookup table to process the data, I want to know how many unique tables can be created. If I have a table of 256 values I know that 256! would tell me how many tables are possible, but the math of the algorithm moves forward or backward along this table based on the calculation so the tables are essentially circular with the first and last value sitting next to each other. Because of this every table with the values in an order that would match exactly to another table except a different start/end would not be unique and not counted.
Without generating every possible table and testing it against others how do I figure out many tables are possible?