OFFSET
1,4
PROG
(PARI) padbin(n, len) = my(b = binary(n)); while(length(b) < len, b = concat(0, b); ); b;
a(n) = m = (n+1)\2; nb = 2^(m+1); lps = 0; v = vector(m, i, binomial(n-1, i-1)); for (i = 1, nb-1, vb = padbin(i, m+1); s = sum(k = 1, m, if (vb[k], v[k], -v[k])); if ((s>0), if (lps == 0, lps = s, if (s < lps, lps = s; ); )); ); lps; \\ Michel Marcus, Sep 30 2013
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
EXTENSIONS
a(22)-a(43) from Michel Marcus, Sep 30 2013
a(44)-a(46) from Michel Marcus, Dec 29 2024
STATUS
approved