Brihat Parashara Hora Shastra
आगमं भोजनं चैव नृत्यं लिप्सां च कौतुकम् । निद्रां ग्रहाणां चेष्टां च कथयामि तवाग्रितः ॥ ३१॥
Note the number of the star, occupied by the Grah, for which an Avastha is to be calculated. Multiply that number by the number, denoted by the Grah (Sūrya 1 to Śani 7).
english translation
AgamaM bhojanaM caiva nRtyaM lipsAM ca kautukam । nidrAM grahANAM ceSTAM ca kathayAmi tavAgritaH ॥ 31॥
hk transliteration by Sanscript