The reaction of electron rich aromatics with cyanoacetic acid and acetic anhydride afforded 3-oxoalkanenitriles. Indium trichloride was used as a Lewis acid catalyst when the aromatic ring was not sufficiently reactive. The synthesized 3-oxoalkanenitriles were subsequently condensed with dimethylformamide dimethylacetal (DMFDMA) to yield enaminones that reacted readily with hydrazine hydrate to yield 4-aroylpyrazole-3-amines. The 4-aroylpyrazole-3-amines were condensed with enaminones to yield 3-aroylpyrazolo[1,5- a]pyrimidines.