Integer function where every sum of contiguous values is unique? I'm aware of the Conway-Guy sequence that builds a set of integers where any subset sum is unique, but I'm wondering if there's a less strict construction that does what I want.  I'm trying to find a sequence $g[n]; 0 \le n \le 2^{30}$ s.t. any sum of contiguous elements is unique, that is $\sum_{n=a}^bg[n] = C$ where C is unique for all (a,b).
Note this isn't any subset of the values, just contiguous subsets.  Even better would be if it can be given in the integrated form $G[n] = \sum_{n=a}^bg[n]$ directly.
Is anyone aware of a function like this?  Bonus points if the values fit in a 64-bit integer =D.
 A: Here's a sequence of positive integers $g[n]$, with $0 \le n \le 2^{30}$, where the sum of any contiguous subset of elements is unique, but there are subset sums that are not unique (unlike the Conway-Guy sequence you mentioned, and my comment suggestion of $g[n]=k^n$ for any integer $k \ge 2$). First, have
$$g[0] = 1, \; g[1] = 2, \; g[2] = 4, \; g[3] = 5$$
The possible sums of consecutive elements where $a = 0$ are $1$, $3$, $7$ and $12$. With $a = 1$, we can get $2$, $6$ and $11$. Next, $a = 2$ allows $4$ and $9$. Finally, $a = 3$ results in just $5$. Note these are all unique (they form the set of $4+2+2+1=10$ integers of $\{1,2,3,4,5,6,7,9,11,12\}$). However, $g[0]+g[2]=1+4=5=g[3]$, and $g[0]+g[3]=1+5=2+4=g[1]+g[2]$, so some of the subset sums are not unique.
Since the sum of the first $4$ values is $12$, choose any larger value for $g[4]$, say just one more of $g[4] = 13$. If the contiguous subset doesn't include $g[4]$, then it's unique among the first $4$ elements, as explained above, and since the sum of all of them is $12 \lt 13 = g[4]$, they remain unique with $g[4]$ being present. If $g[4]$ is included in the contiguous subset, then the sum would be $13$ plus the unique sum of the smaller values, so they would still all be unique.
Next, $g[5]$ can be just $1$ more than the sum of all of the previous values, e.g., $g[5] = 12 + 13 + 1 = 26 = 13(2)$. This process can be continued to get (note this is similar to my comment suggestion of using $g[n]=k^n$, with $k=2$)
$$g[n] = 13(2^{n-4}) \; \forall \; 4 \le n \le 2^{30}$$
Thus, the largest value becomes $g[2^{30}] = 13(2^{2^{30}-4})$. Unfortunately, this is much larger than your requested upper limit of a $64$-bit integer (note I suspect your conditions will require the values to be spaced out far enough that it's not possible to keep within your limit, but I haven't tried to prove this rigorously).
Regarding an integrated form of $G[a,b] = \sum_{n=a}^{b}g[n]$, with $a \le b$, we have
$$G[a,b] =
\begin{cases}
\frac{(b+1)(b+2)-a(a+1)}{2}, & \text{if $b \le 1$} \\
7 - \frac{a(a+1)}{2}, & \text{if $b = 2$} \\
12 - \frac{a(a+1)}{2}, & \text{if $b = 3$ and $a \le 2$} \\
5, & \text{if $b = 3$ and $a = 3$} \\
(12 - \frac{a(a+1)}{2}) + 13(2^{b-3}-1), & \text{if $b \gt 3$ and $a \le 2$} \\
5 + 13(2^{b-3}-1), & \text{if $b \gt 3$ and $a = 3$} \\
13(2^{b-3}-2^{a-4}), & \text{if $b \gt 3$ and $a \gt 3$}
\end{cases}
$$
