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 A331901 #10 Nov 26 2020 11:35:37 %S A331901 1,1,3,3,1,3,25,9,61,91,99,151,901,303,1759,3379,5239,4713,8227,12901, %T A331901 12537,23059,65239,159421,232369,489817,351237,726295,564363,1101883, %U A331901 2517865,6916027,11825821,4942227,27166753,21280053,39547957,52630273,113638975 %N A331901 Number of compositions (ordered partitions) of the n-th prime into distinct prime parts. %H A331901 Alois P. Heinz, <a href="/A331901/b331901.txt">Table of n, a(n) for n = 1..1000</a> %H A331901 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A331901 a(n) = A219107(A000040(n)). %e A331901 a(4) = 3 because we have [7], [5, 2] and [2, 5]. %p A331901 s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end: %p A331901 b:= proc(n, i, t) option remember; `if`(s(i)<n, 0, `if`(n=0, t!, (p %p A331901 ->`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t))) %p A331901 end: %p A331901 a:= n-> b(ithprime(n), n, 0): %p A331901 seq(a(n), n=1..42); # _Alois P. Heinz_, Jan 31 2020 %t A331901 s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]]; %t A331901 b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, Function[p, If[p > n, 0, b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]]; %t A331901 a[n_] := b[Prime[n], n, 0]; %t A331901 Array[a, 42] (* _Jean-François Alcover_, Nov 26 2020, after _Alois P. Heinz_ *) %Y A331901 Cf. A000040, A023360, A056768, A070215, A219107, A265112, A299168. %K A331901 nonn %O A331901 1,3 %A A331901 _Ilya Gutkovskiy_, Jan 31 2020