Paraffins: Difference between revisions
Content added Content deleted
Line 976: | Line 976: | ||
for (b = 1, 4-B, |
for (b = 1, 4-B, |
||
if ((s = S + b * n) < P, |
if ((s = S + b * n) < P, |
||
c = R[n+1] * C * prod(i = 1, b-1, (R[n+1]+i) |
c = R[n+1] * C * prod(i = 1, b-1, (R[n+1]+i)/(i+1)); |
||
if (l+l < s, U[s+1] += c); |
if (l+l < s, U[s+1] += c); |
||
if (B+b < 4, R[s+1] += c; i = n; while (i--, self()(B+b, i, c, s, l))))) |
if (B+b < 4, R[s+1] += c; i = n; while (i--, self()(B+b, i, c, s, l))))) |
||
Line 988: | Line 988: | ||
<lang parigp>iso(B,n,C,S,l=n) = |
<lang parigp>iso(B,n,C,S,l=n) = |
||
{ |
{ |
||
my(b,c,i,s); |
my (b,c,i,s); |
||
for (b = 1, 4-B, |
for (b = 1, 4-B, |
||
if ((s = S + b * n) < P, |
if ((s = S + b * n) < P, |
||
c = R[n+1] * C * prod(i = 1, b-1, (R[n+1]+i) |
c = R[n+1] * C * prod(i = 1, b-1, (R[n+1]+i)/(i+1)); |
||
if (l+l < s, U[s+1] += c); |
if (l+l < s, U[s+1] += c); |
||
if (B+b < 4, R[s+1] += c; i = n; while (i--, iso(B+b, i, c, s, l))))) |
if (B+b < 4, R[s+1] += c; i = n; while (i--, iso(B+b, i, c, s, l))))) |