Where is the source for not eating nuts in the aseres yemai teshuvah, and is peanut butter included in this prohibition?
The Maharil, as cited by the Rema (583:2) writes that one should not eat nuts on Rosh Hashanah. The reason is because nuts have a tendency to disturb a person’s throat, and may therefore affect his prayers, and also because egoz (nut) has the same numerical value as cheit (sin), and is therefore a bad omen (see Mateh Efraim 583:3).
On account of the second reason, some extend the custom into the Ten Days of Repentance, though there does not appear to be an early source for this practice.
There is no concern over peanut butter, both because it does not come from nuts (but peanuts), and because its form is changed from a nut.