Formula generation with several same variables occurrences.