[N:1]1[CH:6]=[CH:5][CH:4]=[C:3]([C:7]2[N:12]3[N:13]=[CH:14][C:15]([CH2:16]O)=[C:11]3[N:10]=[CH:9][CH:8]=2)[CH:2]=1.[C-:18]#[N:19].[K+]>CN(C)C=O>[N:1]1[CH:6]=[CH:5][CH:4]=[C:3]([C:7]2[N:12]3[N:13]=[CH:14][C:15]([CH2:16][C:18]#[N:19])=[C:11]3[N:10]=[CH:9][CH:8]=2)[CH:2]=1A mixture of 0.01 mole of 7-(3-pyridyl)pyrazolo-[1,5-a]pyrimidine-3-methanol and 0.025 mole of potassium cyanide in N,N-dimethylformamide is heated at 100° C. for 16 hours. The solvent is removed and water is added to the residue to give 7-(3-pyridyl)pyrazolo[1,5-a]pyrimidine-3-acetonitrile. A mixture of 0.001 mole of the preceding compound in a 1:1 mixture of acetic acid and concentrated hydrochloric acid is heated at reflux temperature for 16 hours. The solvent is removed to give 7-(3-pyridyl)pyrazolo[1,5-a]pyrimidine-3-acetic acid. The preceding compound is heated at 180° C. to give the product of the example.