# Ulam number

__: Mathematical sequence__

**Short description**In mathematics, the **Ulam numbers** comprise an integer sequence devised by and named after Stanislaw Ulam, who introduced it in 1964.^{[1]} The standard Ulam sequence (the (1, 2)-Ulam sequence) starts with *U*_{1} = 1 and *U*_{2} = 2. Then for *n* > 2, *U*_{n} is defined to be the smallest integer that is the sum of two distinct earlier terms in exactly one way and larger than all earlier terms.

## Examples

As a consequence of the definition, 3 is an Ulam number (1 + 2); and 4 is an Ulam number (1 + 3). (Here 2 + 2 is not a second representation of 4, because the previous terms must be distinct.) The integer 5 is not an Ulam number, because 5 = 1 + 4 = 2 + 3. The first few terms are

- 1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 26, 28, 36, 38, 47, 48, 53, 57, 62, 69, 72, 77, 82, 87, 97, 99, 102, 106, 114, 126, 131, 138, 145, 148, 155, 175, 177, 180, 182, 189, 197, 206, 209, 219, 221, 236, 238, 241, 243, 253, 258, 260, 273, 282, ... (sequence A002858 in the OEIS).

There are infinitely many Ulam numbers. For, after the first *n* numbers in the sequence have already been determined, it is always possible to extend the sequence by one more element: *U*_{n−1} + *U*_{n} is uniquely represented as a sum of two of the first *n* numbers, and there may be other smaller numbers that are also uniquely represented in this way, so the next element can be chosen as the smallest of these uniquely representable numbers.^{[2]}

Ulam is said to have conjectured that the numbers have zero density,^{[3]} but they seem to have a density of approximately 0.07398.^{[4]}

## Properties

Apart from 1 + 2 = 3 any subsequent Ulam number cannot be the sum of its two prior consecutive Ulam numbers.

- Proof: Assume that for
*n*> 2,*U*_{n−1}+*U*_{n}=*U*_{n+1}is the required sum in only one way; then so does*U*_{n−2}+*U*_{n}produce a sum in only one way, and it falls between*U*_{n}and*U*_{n+1}. This contradicts the condition that*U*_{n+1}is the next smallest Ulam number.^{[5]}

For *n* > 2, any three consecutive Ulam numbers (*U*_{n−1}, *U*_{n}, *U*_{n+1}) as integer sides will form a triangle.^{[6]}

- Proof: The previous property states that for
*n*> 2,*U*_{n−2}+*U*_{n}≥*U*_{n + 1}. Consequently*U*_{n−1}+*U*_{n}>*U*_{n+1}and because*U*_{n−1}<*U*_{n}<*U*_{n+1}the triangle inequality is satisfied.

The sequence of Ulam numbers forms a complete sequence.

- Proof: By definition
*U*_{n}=*U*_{j}+*U*_{k}where*j*<*k*<*n*and is the smallest integer that is the sum of two distinct smaller Ulam numbers in exactly one way. This means that for all*U*_{n}with*n*> 3, the greatest value that*U*_{j}can have is*U*_{n−3}and the greatest value that*U*_{k}can have is*U*_{n−1}.^{[5]}^{[7]} - Hence
*U*_{n}≤*U*_{n−1}+*U*_{n−3}< 2*U*_{n−1}and*U*_{1}= 1,*U*_{2}= 2,*U*_{3}= 3. This is a sufficient condition for Ulam numbers to be a complete sequence.

For every integer *n* > 1 there is always at least one Ulam number *U*_{j} such that *n* ≤ *U*_{j} < 2*n*.

- Proof: It has been proved that there are infinitely many Ulam numbers and they start at 1. Therefore for every integer
*n*> 1 it is possible to find*j*such that*U*_{j−1}≤*n*≤*U*_{j}. From the proof above for*n*> 3,*U*_{j}≤*U*_{j−1}+*U*_{j−3}< 2*U*_{j−1}. Therefore*n*≤*U*_{j}<*2U*_{j−1}≤ 2*n*. Also for*n*= 2 and 3 the property is true by calculation.

In any sequence of 5 consecutive positive integers {*i*, *i* + 1,..., *i* + 4}, *i* > 4 there can be a maximum of 2 Ulam numbers.^{[7]}

- Proof: Assume that the sequence {
*i*,*i*+ 1,...,*i*+ 4} has its first value*i*=*U*_{j}an Ulam number then it is possible that*i*+ 1 is the next Ulam number*U*_{j+1}. Now consider*i*+ 2, this cannot be the next Ulam number*U*_{j+2}because it is not a unique sum of two previous terms.*i*+ 2 =*U*_{j+1}+*U*_{1}=*U*_{j}+*U*_{2}. A similar argument exists for*i*+ 3 and*i*+ 4.

## Inequalities

Ulam numbers are pseudo-random and too irregular to have tight bounds. Nevertheless from the properties above, namely, at worst the next Ulam number *U*_{n+1} ≤ *U*_{n} + *U*_{n−2} and in any five consecutive positive integers at most two can be Ulam numbers, it can be stated that

- 5/2
*n*−7 ≤*U*_{n}≤*N*_{n+1}for*n*> 0,^{[7]}

where *N*_{n} are the numbers in Narayana’s cows sequence: 1,1,1,2,3,4,6,9,13,19,... with the recurrence relation *N*_{n} = *N*_{n−1} +*N*_{n−3} that starts at *N*_{0}.

## Hidden structure

It has been observed^{[8]} that the first 10 million Ulam numbers satisfy [math]\displaystyle{ \cos{(2.5714474995
\, U_n)} \lt 0 }[/math] except for the four elements [math]\displaystyle{ \left\{2,3,47,69\right\} }[/math] (this has now been verified for the first [math]\displaystyle{ 10^9 }[/math] Ulam numbers). Inequalities of this type are usually true for sequences exhibiting some form of periodicity but the Ulam sequence does not seem to be periodic and the phenomenon is not understood. It can be exploited to do a fast computation of the Ulam sequence (see External links).

## Generalizations

The idea can be generalized as (*u*, *v*)-Ulam numbers by selecting different starting values (*u*, *v*). A sequence of (*u*, *v*)-Ulam numbers is *regular* if the sequence of differences between consecutive numbers in the sequence is eventually periodic. When *v* is an odd number greater than three, the (2, *v*)-Ulam numbers are regular. When *v* is congruent to 1 (mod 4) and at least five, the (4, *v*)-Ulam numbers are again regular. However, the Ulam numbers themselves do not appear to be regular.^{[9]}

A sequence of numbers is said to be *s*-*additive* if each number in the sequence, after the initial 2*s* terms of the sequence, has exactly *s* representations as a sum of two previous numbers. Thus, the Ulam numbers and the (*u*, *v*)-Ulam numbers are 1-additive sequences.^{[10]}

If a sequence is formed by appending the largest number with a unique representation as a sum of two earlier numbers, instead of appending the smallest uniquely representable number, then the resulting sequence is the sequence of Fibonacci numbers.^{[11]}

## Notes

- ↑ Ulam (1964a, 1964b).
- ↑ (Recaman 1973) gives a similar argument, phrased as a proof by contradiction. He states that, if there were finitely many Ulam numbers, then the sum of the last two would also be an Ulam number – a contradiction. However, although the sum of the last two numbers would in this case have a unique representation as a sum of two Ulam numbers, it would not necessarily be the smallest number with a unique representation.
- ↑ The statement that Ulam made this conjecture is in OEIS OEIS: A002858, but Ulam does not address the density of this sequence in (Ulam 1964a), and in (Ulam 1964b) he poses the question of determining its density without conjecturing a value for it. (Recaman 1973) repeats the question from (Ulam 1964b) of the density of this sequence, again without conjecturing a value for it.
- ↑ OEIS OEIS: A002858
- ↑
^{5.0}^{5.1}(Recaman 1973) - ↑ OEIS OEIS: A330909
- ↑
^{7.0}^{7.1}^{7.2}Philip Gibbs and Judson McCranie (2017). "The Ulam Numbers up to One Trillion". p. 1(Introduction). https://www.researchgate.net/publication/320980165. - ↑ (Steinerberger 2015)
- ↑ (Queneau 1972) first observed the regularity of the sequences for
*u*= 2 and*v*= 7 and*v*= 9. (Finch 1992) conjectured the extension of this result to all odd*v*greater than three, and this conjecture was proven by (Schmerl Spiegel). The regularity of the (4,*v*)-Ulam numbers was proven by (Cassaigne Finch). - ↑ (Queneau 1972).
- ↑ (Finch 1992).

## References

- Cassaigne, Julien; Finch, Steven R. (1995), "A class of 1-additive sequences and quadratic recurrences",
*Experimental Mathematics***4**(1): 49–60, doi:10.1080/10586458.1995.10504307, http://www.emis.de/journals/EM/restricted/4/4.1/finch.ps - Finch, Steven R. (1992), "On the regularity of certain 1-additive sequences",
*Journal of Combinatorial Theory, Series A***60**(1): 123–130, doi:10.1016/0097-3165(92)90042-S -
*Unsolved Problems in Number Theory*(3rd ed.), Springer-Verlag, 2004, pp. 166–167, ISBN 0-387-20860-7 - Queneau, Raymond (1972), "Sur les suites
*s*-additives" (in fr),*Journal of Combinatorial Theory, Series A***12**(1): 31–71, doi:10.1016/0097-3165(72)90083-0 - Recaman, Bernardo (1973), "Questions on a sequence of Ulam",
*American Mathematical Monthly***80**(8): 919–920, doi:10.2307/2319404 - Schmerl, James; Spiegel, Eugene (1994), "The regularity of some 1-additive sequences",
*Journal of Combinatorial Theory, Series A***66**(1): 172–175, doi:10.1016/0097-3165(94)90058-2 - "Combinatorial analysis in infinite sets and some physical theories",
*SIAM Review***6**(4): 343–355, 1964a, doi:10.1137/1006090, Bibcode: 1964SIAMR...6..343U - Ulam, Stanislaw (1964b),
*Problems in Modern Mathematics*, New York: John Wiley & Sons, Inc, p. xi - Steinerberger, Stefan (2015),
*A Hidden Signal in the Ulam sequence*, Experimental Mathematics, Bibcode: 2015arXiv150700267S

## External links

- Ulam Sequence from MathWorld
- Fast computation of the Ulam sequence by Philip Gibbs
- Description of Algorithm by Donald Knuth
- The github page of Daniel Ross

Original source: https://en.wikipedia.org/wiki/Ulam number.
Read more |