P(Cl)(Cl)(Cl)=O.[N:6]1[N:10]2[CH2:11][CH2:12][CH2:13][N:14](C=O)[C:9]2=[CH:8][CH:7]=1.O.[C:18](=O)([O-])[O-:19].[Na+].[Na+]>CN(C)C=O>[N:6]1[N:10]2[CH2:11][CH2:12][CH2:13][NH:14][C:9]2=[C:8]([CH:18]=[O:19])[CH:7]=1To N,N-dimethylformamide (307 ml) was added dropwise phosphorus oxychloride (123 ml) under ice-cooling. To the mixture was added a solution of 4,5,6,7-tetrahydropyrazolo[1,5-a]pyrimidine-4-carbaldehyde (100 g) in N,N-dimethylformamide (200 ml) under ice-cooling. The reaction mixture was stirred at 80° C. for 2 hours. After cooling, water was added to the reaction mixture, and the mixture was neutralized with sodium carbonate. The mixture was extracted with chloroform. The organic layer was dried over anhydrous magnesium sulfate, filtered, and concentrated in vacuo. The residue was triturated with hexane and dried in vacuo to give 4,5,6,7-tetrahydropyrazolo[1,5-a]pyrimidine-3-carbaldehyde (65 g) as a solid.