I added functions specialized for p=1, 2. see f5c6848.