login
A317384
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 (not necessarily distinct) primes.
3
2, 1, 13, 31, 43, 91, 111, 231, 175, 274, 351, 471, 703, 526, 463, 931, 823, 1723, 1579, 1279, 1903, 2083, 1791, 2143, 2227, 2443, 2671, 2781, 2335, 3807, 3163, 3631, 3199, 4243, 5314, 5482, 5107, 4671, 6231, 6681, 8863, 7483, 6111, 6331, 7879, 8031, 8023, 9351
OFFSET
0,1
LINKS
FORMULA
a(n) = min { j > 0 : A317240(j) = n }.
EXAMPLE
a(1) = 1: 1.
a(2) = 13: 1 + 2 * (1 + 5) = 1 + 3 * (1 + 3) = 13.
a(3) = 31: 1 + 2 * (1 + 2 * (1 + 2 * (1 + 2))) = 1 + 3 * (1 + 3 * (1 + 2)) = 1 + 5 * (1 + 5) = 31.
MAPLE
b:= proc(n) option remember; `if`(n=1, 1,
add(b((n-1)/p), p=numtheory[factorset](n-1)))
end:
a:= proc(n) option remember; local k;
for k while n<>b(k) do od; k
end:
seq(a(n), n=0..50);
MATHEMATICA
pp[n_] := pp[n] = FactorInteger[n][[All, 1]];
q[n_] := q[n] = Switch[n, 1, True, 2, False, _, AnyTrue[pp[n-1], q[(n-1)/#]&]];
b[n_] := b[n] = Which[n == 1, 1, ! q[n], 0, True, Sum[b[(n-1)/p], {p, pp[n-1]}]];
a[n_] := Module[{k}, For[k = 1, True, k++, If[n == b[k], Return[k]]]];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 07 2023, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A174170 A264373 A217490 * A247601 A013020 A012906
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 26 2018
STATUS
approved