- Ulam numbers
A Ulam number is a member of an
integer sequence which was devised byStanislaw Ulam and published in SIAM Review in 1964. The standard Ulam sequence (the (1, 2)-Ulam sequence) starts with "U""1"=1 and "U""2"=2 being the first two Ulam numbers. Then for "n" > 2, "U""n" is defined to be the smallestinteger that is the sum of two distinct earlier terms in exactly one way Harvcol|Guy|2004|pp=166-67. Ulam conjectured that the numbers have zero density, but they seem to have a density of approximately 0.07396.Examples
By the definition, 3=1+2 is an Ulam number; and 4=1+3 is an Ulam number (The sum 4=2+2 doesn't count 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 OEIS|id=A002858.The first Ulam numbers that are also
prime number s are:2, 3, 11, 13, 47, 53, 97, 131, 197, 241, 409, 431, 607, 673, 739, 751, 983, 991, 1103, 1433, 1489 (OEIS2C|id=A068820).Generalization
The idea can be generalized as (u, v)-Ulam Numbers by selecting different starting values (u, v) and by requiring that the terms be a sum of "s" previous terms in a given number "t" of ways, referred as an (s, t)-Additive Sequence or as an s-Additive Sequence for the standard case t = 2.
ample code
Here is some sample (non-optimized) Python code that generates all Ulam numbers less than 1000.
References
*Citation
surname1=Guy|given1=Richard|authorlink1=Richard Guy
year=2004
title=Unsolved Problems in Number Theory
edition=third
publisher=Springer-Verlag
ID=ISBN 0-387-20860-7External links
* [http://mathworld.wolfram.com/UlamSequence.html Ulam Sequence from MathWorld]
Wikimedia Foundation. 2010.