cp's OEIS Frontend

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.

A379532 Ulam numbers that are products of exactly four distinct primes (or tetraprimes).

This page as a plain text file.
%I A379532 #13 Jan 03 2025 14:55:08
%S A379532 390,546,690,798,1155,1230,1770,2010,2090,2418,2618,2814,3090,3290,
%T A379532 3390,3930,4326,4370,4470,4578,4602,4641,6110,6870,7170,7490,7735,
%U A379532 7930,8294,9834,10110,10545,10738,11102,11346,11390,11454,11622,11715,11886,12270,12441,12470,12570
%N A379532 Ulam numbers that are products of exactly four distinct primes (or tetraprimes).
%C A379532 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 A379532 Robert Israel, <a href="/A379532/b379532.txt">Table of n, a(n) for n = 1..6826</a>
%e A379532 390 is a term because 390=2*3*5*13 is the product of 4 distinct primes and 390 is an Ulam number.
%e A379532 546 is a term because 546=2*3*7*13 is the product of 4 distinct primes and 546 is an Ulam number.
%e A379532 1155 is a term because 1155=3*5*7*11 is the product of 4 distinct primes and 1155 is an Ulam number.
%p A379532 N:= 20000: # for terms <= N
%p A379532 U:= [1,2]: V:= Vector(N): V[3]:= 1: R:= NULL: count:= 0:
%p A379532 for i from 3 do
%p A379532    for k from U[-1]+1 to N do
%p A379532      if V[k] = 1 then
%p A379532        J:= select(`<=`,U +~ k, N);
%p A379532        V[J]:= V[J] +~ 1;
%p A379532        U:= [op(U),k];
%p A379532        F:= ifactors(k)[2]:
%p A379532        if F[..,2] = [1,1,1,1] then R:= R,k; count:= count+1;  fi;
%p A379532        break
%p A379532      fi
%p A379532    od;
%p A379532    if k > N then break fi;
%p A379532 od:
%p A379532 R; # _Robert Israel_, Dec 25 2024
%t A379532 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, 1} &]]; seq[1200] (* _Amiram Eldar_, Dec 24 2024, after _Jean-François Alcover_ at A002858 *)
%Y A379532 Intersection of A002858 and A046386.
%Y A379532 Cf. A068820, A378795, A379162.
%K A379532 nonn
%O A379532 1,1
%A A379532 _Massimo Kofler_, Dec 24 2024