
MAPLE

# First define t1, the sequence A051838.
t1:=[1, 3, 8, 13, 23, 38, 39, 41, 43, 48, 50, 53, 56, 57, 58, 66, 68,
70, 73, 77, 84, 90, 94, 98, 126, 128, 134, 140, 143, 145, 149,
151, 153, 157, 160, 164, 167, 168, 172, 174, 176, 182, 191,
194, 196, 200, 210, 212, 215, 217, 218, 219, 222, 225, 228,
229];
p:=ithprime;
num:=n>mul(p(i), i=1..t1[n]);
s:=[num(i), i=1..11)];


MATHEMATICA

seq = {}; sum = 0; prod = 1; p = 1; Do[p = NextPrime[p]; prod *= p; sum += p; If[Divisible[prod, sum], AppendTo[seq, prod]], {50}]; seq (* Amiram Eldar, Nov 02 2020 *)
Module[{nn=50, s, p}, s=Accumulate[Prime[Range[nn]]]; p=FoldList[Times, Prime[Range[ nn]]]; Select[Thread[{p, s}], Divisible[#[[1]], #[[2]]]&]][[All, 1]] (* Harvey P. Dale, Jun 07 2022 *)
