An integer is happy if it divides the sum of the numbers in its collatz sequence. The pride of an integer is the total number of happy integers in its collatz sequence, excluding itself if it is happy. Define a function pride(n) that returns the pride of n. Assume you have the function collatz_sum(n), which returns the sum of integers in the Collatz sequence seeded by n, available for use.

Updated: