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 A339409 #5 Dec 03 2020 12:49:59 %S A339409 0,0,1,1,0,1,1,4,3,4,7,12,19,22,32,53,80,120,160,245,368,553,800,1164, %T A339409 1736,2588,3813,5598,8226,12228,18060,26657,39221,57945,85656,126506, %U A339409 186584,275307,406514,600488,886255,1308088,1930648,2850861,4208743,6212824,9170440,13538025 %N A339409 Number of compositions (ordered partitions) of n into an odd number of primes. %H A339409 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A339409 G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^prime(k)) - 1 / (1 + Sum_{k>=1} x^prime(k))). %e A339409 a(8) = 3 because we have [3, 3, 2], [3, 2, 3] and [2, 3, 3]. %p A339409 b:= proc(n, t) option remember; `if`(n=0, t, add( %p A339409 b(n-ithprime(j), 1-t), j=1..numtheory[pi](n))) %p A339409 end: %p A339409 a:= n-> b(n, 0): %p A339409 seq(a(n), n=0..55); # _Alois P. Heinz_, Dec 03 2020 %t A339409 nmax = 47; CoefficientList[Series[(1/2) (1/(1 - Sum[x^Prime[k], {k, 1, nmax}]) - 1/(1 + Sum[x^Prime[k], {k, 1, nmax}])), {x, 0, nmax}], x] %Y A339409 Cf. A000040, A023360, A166444, A184199, A339381, A339408. %K A339409 nonn %O A339409 0,8 %A A339409 _Ilya Gutkovskiy_, Dec 03 2020