Implement a function called are_encryptions_same which determines if the encryptions of two given strings are the same based on a specified encryption algorithm. The encryption consists of the following steps:
Identify the first and last letters of each string.
Replace the characters between the first and last letter with the count of those characters.
Reduce this count to a single-digit number by summing the digits repeatedly until a single digit is obtained.
Compare the first and last letters along with the resulting single-digit number for both input strings.
Input/Output Requirements
Input: The function takes two parameters:
s1 (str): The first string to be encrypted, with a minimum length of 2 characters.
s2 (str): The second string to be encrypted, with a minimum length of 2 characters.
Output: The function returns a boolean value:
True if the encryptions of the two strings are the same.
False otherwise.
Implementation
The solution must be written in a file called /app/solution.py. The content of the file should include the function signature and implementation as specified above, ensuring to include necessary helper functions and comments for clarity.