5-Amino-3-anilino-1H-pyrazole-4-carbonitrile 1 was alkylated with various halo reagents under phase
transfer conditions to give the corresponding imidazopyrazole derivatives 2a–c-6. Pyrazolo[1,5-a] pyrimidine
derivatives 11–14 were prepared by treating compound 1 with different dicarbonyl reagents, namely, diethymalonate,
ethyl 3-oxo-3-phenylpropanoate, pentane-2,4-dione or ethyl 3-oxobutanoate.