login
Positive integers that have exactly eight representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.
2

%I #4 Jul 27 2018 11:21:55

%S 2991,3004,3319,3554,3928,4846,5552,5886,6293,6784,7183,7286,7396,

%T 7668,7741,7743,7829,7996,8095,8121,8212,8477,8586,8614,8856,8861,

%U 9096,9307,9374,9591,9626,9636,9637,9721,9738,9845,9891,9912,9934,10011,10024,10048,10251

%N Positive integers that have exactly eight 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="/A317398/b317398.txt">Table of n, a(n) for n = 1..20000</a>

%F A317241(a(n)) = 8.

%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<9

%p do r:= r+b((n-1)/p, s union {p}) od; `if`(r<9, r, 9)

%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, {})<>8 do od; k

%p end:

%p seq(a(n), n=1..100);

%Y Column k=8 of A317390.

%Y Cf. A317241.

%K nonn

%O 1,1

%A _Alois P. Heinz_, Jul 27 2018