Pairing in spinless fermions and spin chains with next-nearest neighbor interactions