OFFSET
1,1
COMMENTS
Ulam numbers: a(1) = 1; a(2) = 2; for n>2, a(n) = least number > a(n-1) which is a unique sum of two distinct earlier terms.
Number such as 4, 2809, 3481, 6889, etc., are in A378795 but not in this or in a longer sequence.
EXAMPLE
4 is not a term of this sequence because 4=2^2 is the product of 2 not distinct primes even if 4 is an Ulam number.
6 is a term because 6=2*3 is the product of 2 distinct primes and 6 is an Ulam number.
57 is a term because 57=3*19 is the product of 2 distinct primes and 57 is an Ulam number.
2809 is not a term of a longer sequence because 2809=53^2 is the product of 2 not distinct primes even if 2809 is an Ulam number.
MATHEMATICA
seq[numUlams_] := Module[{ulams = {1, 2}}, Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[DeleteCases[Intersection[ulams, n - ulams], n/2, 1, 1]] != 2]; n], {numUlams}]; Select[ulams, FactorInteger[#][[;; , 2]] == {1, 1} &]]; seq[160] (* Amiram Eldar, Feb 16 2025, after Jean-François Alcover at A002858 *)
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Massimo Kofler, Feb 16 2025
STATUS
approved