#include #include constexpr int max = 37; long long p[max]; // first differences of A364671 bool z[max+1]; // z[v] = is v present? void explore(int prev) { p[prev]++; for (int v = prev ? prev+1 : 1; v