# Which is more basic: 1,2‐dihydropyridine or 1,4‐dihydropyridine?

Which compound is more basic of the two?

My thinking: In compound A, the lone pair of nitrogen are in resonance with two other double bonds. The resonance chain here seems to be longer as compared to in compound B. However, in compound B, the lone pairs of nitrogen seem to be more 'busy' because of the two double bonds on its either side,when compared to compound A (@YUSUFHASAN provided this second logic).

So, which of the two compounds should be more basic? (The main idea is that, the lesser 'busy' lone pair electrons of nitrogen means more 'free' electrons to pick up $$\ce{H^+},$$ which is what bases do.)

Do note that this question is supposed to be answered qualitatively. (By this I mean, not looking at tabular data from research papers or books!)

In compound $$\ce{A}$$ , lone pair on $$\ce{N}$$ is in conjugation with two $$\ce pi$$ bonds (as shown below). Therefore this lone pair is delocalized (resonance structures in the figure below) to a greater extent.
In compound $$\ce{B}$$ , lone pair on $$\ce{N}$$ is in conjugation with a single $$\ce pi$$ bond , while the other pi bond is not in conjugation or is cross conjugated.
Since lone pair on $$\ce{N}$$ in compound $$\ce{B}$$ is less delocalized then in compound $$\ce{A}$$ , compound $$\ce{B}$$ is more basic then compound $$\ce{A}$$.