This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378795 #17 Jan 25 2025 03:23:10 %S A378795 4,6,26,38,57,62,69,77,82,87,106,145,155,177,206,209,219,221,253,309, %T A378795 319,339,341,358,382,451,485,497,502,566,685,695,734,781,849,866,893, %U A378795 905,949,1018,1037,1079,1081,1101,1157,1167,1169,1186,1191,1257,1313,1355 %N A378795 Ulam numbers that are semiprimes. %C A378795 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. %H A378795 Robert Israel, <a href="/A378795/b378795.txt">Table of n, a(n) for n = 1..10000</a> %e A378795 4 is a term because 4=2*2 is the product of 2 (not distinct) primes and 4 is an Ulam number. %e A378795 6 is a term because 6=2*3 is the product of 2 distinct primes and 6 is an Ulam number. %e A378795 57 is a term because 57=3*19 is the product of 2 distinct primes and 57 is an Ulam number. %p A378795 N:= 5000: # for terms <= N %p A378795 U:= [1, 2]: V:= Vector(N): V[3]:= 1: R:= NULL: count:= 0: %p A378795 for i from 3 do %p A378795 for k from U[-1]+1 to N do %p A378795 if V[k] = 1 then %p A378795 J:= select(`<=`, U +~ k, N); %p A378795 V[J]:= V[J] +~ 1; %p A378795 U:= [op(U), k]; %p A378795 if numtheory:-bigomega(k) = 2 then R:= R, k; count:= count+1; fi; %p A378795 break %p A378795 fi %p A378795 od; %p A378795 if k > N then break fi; %p A378795 od: %p A378795 R; # _Robert Israel_, Jan 24 2025 %t A378795 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, PrimeOmega[#] == 2 &]]; seq[200] (* _Amiram Eldar_, Dec 07 2024, after _Jean-François Alcover_ at A002858 *) %Y A378795 Intersection of A001358 and A002858. %Y A378795 Cf. A068820. %K A378795 nonn %O A378795 1,1 %A A378795 _Massimo Kofler_, Dec 07 2024