OFFSET
1,1
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, C4
LINKS
Ruud H.G. van Tol, Table of n, a(n) for n = 1..11944 (upto 2^16)
Shyam Sunder Gupta, Ulam Numbers. In: Exploring the Beauty of Fascinating Numbers. Springer Praxis Books(). Springer, Singapore, (2025).
Ivano Salvo and Agnese Pacifico, Computing Integer Sequences: Filtering vs Generation (Functional Pearl), arXiv:1807.11792 [cs.PL], 2018.
MATHEMATICA
terms = 1000; ulams = {1, 2};
Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[ DeleteCases[ Intersection[ ulams, n - ulams], n/2, 1, 1]] != 2]; n], {terms}];
uu = Total /@ Subsets[ulams, {2}] // Union;
Complement[Range[Last[uu]], uu] // Take[#, {3, terms+2}]& (* Jean-François Alcover, Dec 02 2018 *)
PROG
(PARI) aupto(N)= my(S=Vec([1, 1], N), U=[]); for(i=1, N, if(1==S[i], for(j=1, #U, my(t=i+U[j]); if(t>N, break); S[t]++); U=concat(U, i))); Vec(select(x->!x, S, 1)) \\ Ruud H.G. van Tol, Jul 05 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
