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]];
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 26 2018
STATUS
approved