"Representatives and direct Taxes shall be apportioned among the several States which may be included within this Union, according to their respective Numbers, which shall be determined by adding to the whole Number of free Persons, including those bound to Service for a Term of Years, and excluding Indians not taxed, three fifths of all other Persons. The actual Enumeration shall be made within three Years after the first Meeting of the Congress of the United States, and within every subsequent Term of ten Years, in such Manner as they shall by Law direct. The Number of Representatives shall not exceed one for every thirty Thousand, but each State shall have at Least one Representative; and until such enumeration shall be made, the State of New Hampshire shall be entitled to chuse three, Massachusetts eight, Rhode-Island and Providence Plantations one, Connecticut five, New-York six, New Jersey four, Pennsylvania eight, Delaware one, Maryland six, Virginia ten, North Carolina five, South Carolina five, and Georgia three."
or to put it in terms that this forum would appreciate
representatives = {NH:3, MA:8, RI:1 CN:5, NY:6, NJ:4, PA:8, DL:1, ML:6, VA:10, NC:5, SC:5, GA:3}
def census(state): #call this in 3 years, and again in every 10 years
result = 0
for i in state.persons:
if i.free or i.bound_to_service:
result += 1
elif not(i.indian and not i.taxed):
result += 0 #included for clarity
else:
result += 3/5
return max(int(result / 30000),1)
Note the 3/5th compromise is reached by way of "no other category applies" rather than an explicit "slavery" condition. Make of that what you will. Unrelated note: imagine if all law were written as programming.