OFFSET
1,1
LINKS
Matthew L. LaSelle, Table of n, a(n) for n = 1..61 (first 42 terms from Massimo Kofler)
EXAMPLE
2 is a term because 2 = 1*2 and 2 is an Ulam number.
6 is a term because 6 = 2*3 and 6 is an Ulam number.
72 is a term because 72 = 8*9 and 72 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, IntegerQ[Sqrt[4*# + 1]] &]]; seq[10000] (* Amiram Eldar, Jan 03 2025, after Jean-François Alcover at A002858 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Massimo Kofler, Jan 03 2025
STATUS
approved