Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #4 Jul 27 2018 10:47:46
%S 638,848,921,969,1002,1026,1106,1156,1191,1248,1276,1310,1326,1341,
%T 1431,1444,1480,1499,1548,1592,1641,1730,1764,1772,1786,1856,1888,
%U 1911,1996,2005,2025,2038,2050,2053,2061,2121,2129,2131,2133,2146,2171,2224,2256,2258
%N Positive integers that have exactly five representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.
%H Alois P. Heinz, <a href="/A317395/b317395.txt">Table of n, a(n) for n = 1..20000</a>
%F A317241(a(n)) = 5.
%p b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
%p for p in numtheory[factorset](n-1) minus s while r<6
%p do r:= r+b((n-1)/p, s union {p}) od; `if`(r<6, r, 6)
%p fi
%p end:
%p a:= proc(n) option remember; local k; for k from
%p `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>5 do od; k
%p end:
%p seq(a(n), n=1..100);
%Y Column k=5 of A317390.
%Y Cf. A317241.
%K nonn
%O 1,1
%A _Alois P. Heinz_, Jul 27 2018