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 A379162 #14 Jan 03 2025 21:23:24 %S A379162 102,114,138,182,238,258,273,282,370,402,429,434,483,602,627,646,861, %T A379162 986,1023,1030,1311,1335,1338,1406,1462,1790,1834,1902,1946,2054,2093, %U A379162 2134,2247,2330,2354,2445,2486,2613,2630,2635,2674,2919,2985,3070,3219,3395 %N A379162 Ulam numbers that are sphenics. %C A379162 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 A379162 Robert Israel, <a href="/A379162/b379162.txt">Table of n, a(n) for n = 1..10000</a> %e A379162 102 is a term because 102=2*3*17 is the product of 3 distinct primes and 102 is an Ulam number. %e A379162 114 is a term because 114=2*3*19 is the product of 3 distinct primes and 114 is an Ulam number. %e A379162 273 is a term because 273=3*7*13 is the product of 3 distinct primes and 273 is an Ulam number. %p A379162 N:= 10^4: # for terms <= N %p A379162 U:= [1, 2]: V:= Vector(N): V[3]:= 1: R:= NULL: %p A379162 for i from 3 do %p A379162 for k from U[-1]+1 to N do %p A379162 if V[k] = 1 then %p A379162 J:= select(`<=`, U +~ k, N); %p A379162 V[J]:= V[J] +~ 1; %p A379162 U:= [op(U), k]; %p A379162 F:= ifactors(k)[2]: %p A379162 if F[.., 2] = [1, 1, 1] then R:= R, k; break fi %p A379162 od; %p A379162 if k > N then break fi; %p A379162 od: %p A379162 R; # _Robert Israel_, Jan 03 2025 %t A379162 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, 1} &]]; seq[300] (* _Amiram Eldar_, Dec 17 2024, after _Jean-François Alcover_ at A002858 *) %Y A379162 Intersection of A002858 and A007304. %Y A379162 Cf. A068820, A378795. %K A379162 nonn %O A379162 1,1 %A A379162 _Massimo Kofler_, Dec 17 2024