login
A317385
Smallest positive integer that has exactly n representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.
4
2, 1, 25, 43, 211, 638, 664, 1613, 2991, 7021, 11306, 9439, 17361, 23230, 40886, 38341, 49063, 36583, 99111, 111229, 110631, 171718, 233451, 255531, 309141, 327643, 369519, 521266, 489406, 738544, 682690, 812826, 1048594, 1015096, 2003002, 2118439, 1602360, 2204907, 2850772, 2702743, 2794198
OFFSET
0,1
FORMULA
a(n) = min { j > 0 : A317241(j) = n }.
EXAMPLE
a(1) = 1: 1.
a(2) = 25: 1 + 2 * (1 + 11) = 1 + 3 * (1 + 7) = 25.
a(3) = 43: 1 + 2 * (1 + 5 * (1 + 3)) = 1 + 3 * (1 + 13) = 1 + 7 * (1 + 5) = 43.
MAPLE
b:= proc(n, s) option remember; `if`(n=1, 1, add(b((n-1)/p
, s union {p}), p=numtheory[factorset](n-1) minus s))
end:
a:= proc(n) option remember; local k;
for k while n<>b(k, {}) do od; k
end:
seq(a(n), n=0..15);
MATHEMATICA
b[n_, s_] := b[n, s] = If[n == 1, 1, Sum[If[p == 1, 0, b[(n - 1)/p, s~Union~{p}]], {p, FactorInteger[n - 1][[All, 1]]~Complement~s}]];
A[n_, k_] := Module[{h, p, q = 0}, p[_] = {}; While[Length[p[k]] < n, q++; h = b[q, {}]; p[h] = Append[p[h], q]]; p[k][[n]]];
a[k_] := If[k == 0, 2, A[1, k]];
Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz in A317390 *)
CROSSREFS
Row n=1 of A317390.
Sequence in context: A013317 A010256 A087452 * A366048 A098878 A235031
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 26 2018
STATUS
approved