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 A331981 #12 Nov 09 2020 02:57:08 %S A331981 1,0,0,1,0,1,0,1,2,0,2,1,2,1,2,6,4,1,4,7,4,12,4,13,6,12,28,18,28,19,6, %T A331981 25,52,24,54,30,56,31,98,156,102,37,104,157,150,276,150,175,154,288, %U A331981 200,528,246,307,226,666,990,780,1038,679,348,799,1828,1272,1162,1164 %N A331981 Number of compositions (ordered partitions) of n into distinct odd primes. %H A331981 Alois P. Heinz, <a href="/A331981/b331981.txt">Table of n, a(n) for n = 0..10000</a> %H A331981 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %e A331981 a(16) = 4 because we have [13, 3], [11, 5], [5, 11] and [3, 13]. %p A331981 s:= proc(n) option remember; `if`(n<1, 0, ithprime(n+1)+s(n-1)) end: %p A331981 b:= proc(n, i, t) option remember; `if`(s(i)<n, 0, `if`(n=0, t!, (p %p A331981 ->`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i+1))+b(n, i-1, t))) %p A331981 end: %p A331981 a:= n-> b(n, numtheory[pi](n), 0): %p A331981 seq(a(n), n=0..72); # _Alois P. Heinz_, Feb 03 2020 %t A331981 s[n_] := s[n] = If[n < 1, 0, Prime[n + 1] + s[n - 1]]; %t A331981 b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, If[# > n, 0, b[n - #, i - 1, t + 1]]&[Prime[i + 1]] + b[n, i - 1, t]]]; %t A331981 a[n_] := b[n, PrimePi[n], 0]; %t A331981 a /@ Range[0, 72] (* _Jean-François Alcover_, Nov 09 2020, after _Alois P. Heinz_ *) %Y A331981 Cf. A002124, A023360, A024939, A065091, A099773, A219107, A331926, A331982. %K A331981 nonn %O A331981 0,9 %A A331981 _Ilya Gutkovskiy_, Feb 03 2020