Generate a Python program that has the following intention:

The program defines a function p1(n) that takes an integer n as input and returns a list of integers. The intention of the program is to find all prime factors of the input number n and return a list of those factors in descending order.

The function works by first checking if the input number n is equal to 1, in which case it returns an empty list. Otherwise, it initializes a variable i to 2 and enters a while loop that continues as long as i is less than the square root of n plus 1.

Within the loop, the function checks if n is divisible by i. If it is, the function returns the list [i] followed by the result of calling p1(n//i), where n//i is the integer division of n by i. This means that the divisor is removed from n, and the function is called recursively with the remaining value of n.

If n is not divisible by i, the function increments i and continues the loop until either a divisor is found or the loop terminates. If no divisor is found, the function returns the list containing the input number n.