This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A317384 #25 Dec 07 2023 10:55:38 %S A317384 2,1,13,31,43,91,111,231,175,274,351,471,703,526,463,931,823,1723, %T A317384 1579,1279,1903,2083,1791,2143,2227,2443,2671,2781,2335,3807,3163, %U A317384 3631,3199,4243,5314,5482,5107,4671,6231,6681,8863,7483,6111,6331,7879,8031,8023,9351 %N 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. %H A317384 Alois P. Heinz, <a href="/A317384/b317384.txt">Table of n, a(n) for n = 0..1000</a> %F A317384 a(n) = min { j > 0 : A317240(j) = n }. %e A317384 a(1) = 1: 1. %e A317384 a(2) = 13: 1 + 2 * (1 + 5) = 1 + 3 * (1 + 3) = 13. %e A317384 a(3) = 31: 1 + 2 * (1 + 2 * (1 + 2 * (1 + 2))) = 1 + 3 * (1 + 3 * (1 + 2)) = 1 + 5 * (1 + 5) = 31. %p A317384 b:= proc(n) option remember; `if`(n=1, 1, %p A317384 add(b((n-1)/p), p=numtheory[factorset](n-1))) %p A317384 end: %p A317384 a:= proc(n) option remember; local k; %p A317384 for k while n<>b(k) do od; k %p A317384 end: %p A317384 seq(a(n), n=0..50); %t A317384 pp[n_] := pp[n] = FactorInteger[n][[All, 1]]; %t A317384 q[n_] := q[n] = Switch[n, 1, True, 2, False, _, AnyTrue[pp[n-1], q[(n-1)/#]&]]; %t A317384 b[n_] := b[n] = Which[n == 1, 1, ! q[n], 0, True, Sum[b[(n-1)/p], {p, pp[n-1]}]]; %t A317384 a[n_] := Module[{k}, For[k = 1, True, k++, If[n == b[k], Return[k]]]]; %t A317384 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Dec 07 2023, after _Alois P. Heinz_ *) %Y A317384 Cf. A317240, A317385. %K A317384 nonn %O A317384 0,1 %A A317384 _Alois P. Heinz_, Jul 26 2018