(1) If the minor is under age 15, five years in prison; (2) if the offender is at least age 18 or is tried as an adult and the minor was age 12 or younger, life in prison and the offender is ineligible for release until serving 35 years; (3) if the offender is at least 18 or tried as an adult and the victim is age 12, 13, or 14, the presumptive sentence is 20 years; or (4) if the minor is at least age 15, it is punishable by one year in prison Sexual assault to knowingly inflicts sexual intrusion or sexual penetration on a victim (1) under age 15 if the actor is at least four years older or (2) at least 15 years old but less than 17 years old and the actor is at least 10 years older.
10 to 25 years in prison with a mandatory minimum of five years if the victim is between age 10 and 16 and 10 years if the victim is under age 10.
People aged 16 and older can legally consent to sexual activity with anyone they choose, as long as the other person does not have authority over them as defined in Pennsylvania’s institutional sexual assault statute.

In Pennsylvania, children less than 13 years of age cannot grant consent to sexual activity.
Teens between the ages of 13 and 15 can consent to sexual activity with peers within a four-year age range.
Regardless of the designation, these crimes are based on the premise that until a person reaches a certain age, he is legally incapable of consenting to sexual intercourse.
Thus, instead of including force as a criminal element, theses crimes make it illegal for anyone to engage in sexual intercourse with anyone below a certain age, other than his spouse.
This creates an interesting dynamic, as the laws allow teens aged 17 and 16 to consent to each other, but not to anyone 18 or older.
Teens between 13 and 15 may or may not be able to consent to a partner less than 4 years older, because while they might not be affected by the statutory rape laws, they could be prosecuted under other offenses. A close in age exemption, also known as "Romeo and Juliet law", is designed to prevent the prosecution of underage couples who engage in consensual sex when both participants are significantly close in age to each other, and one or both are below the age of consent. Except as provided in section 3121 (relating to rape), a person commits a felony of the second degree when that person engages in sexual intercourse with a complainant under the age of 16 years and that person is four or more years older than the complainant and the complainant and the person are not married to each other.
Some states base the penalty for violations on the age of the offender, with older offenders receiving harsher penalties.
For example, California, Maryland, Missouri, Nevada, and New York reserve their harshest statutory rape penalty for offenders who are age 21 or older.
Utah currently has no valid statute that governs the age of consent for homosexual acts.
So, it is not clear exactly what the age of consent for sodomy is.
However, it is safe to assume that the age of consent laws do apply to homosexual acts.