Anagram invariants