proposed
approved
proposed
approved
editing
proposed
Form a triangle with the numbers [0..n] on the base, where each number is the sum of the two below; a(n) = is the number of different possible values for the apex.
a(n) = is the number of different possible sums of c_k * (n choose k) where the c_k are a permutation of 0 through n. - Joshua Zucker, May 08 2006
nonn,nice,more,nonn,changed
proposed
editing
editing
proposed
editing
proposed
editing
proposed
def partitionpairs(xlist): # generator of all partitions of xlist into pairs and at most 1 singleton, returning the sums of the pairs
yield [sum(xlist)]
y = [xlist[i]+xlist[j]]
yield [xlist[i], xlist[j]]+d
yield y+d
return len(set((sum(sum(d[2*i:2*i+2])*b[i] for i in range(n//2+1)) for d in partitionpairs(list(range(n+1)))))) # Chai Wah Wu, Oct 19 2021
proposed
editing