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 A015739 #25 May 16 2020 20:59:44 %S A015739 0,0,0,1,1,1,2,1,2,3,3,5,6,7,9,10,12,15,18,22,26,31,36,42,50,58,68,80, %T A015739 92,107,124,142,164,189,216,248,284,323,369,420,476,541,613,693,784, %U A015739 885,997,1123,1264,1419,1593,1787,2000,2239,2504,2795,3120,3479 %N A015739 Number of 4's in all the partitions of n into distinct parts. %H A015739 Alois P. Heinz, <a href="/A015739/b015739.txt">Table of n, a(n) for n = 1..1000</a> %F A015739 G.f.: x^4*prod(j>=1, 1+x^j)/(1+x^4). - _Emeric Deutsch_, Apr 17 2006 %F A015739 Corresponding g.f. for "number of k's" is x^k/(1+x^k)*prod(n>=1, 1+x^n ). [_Joerg Arndt_, Feb 20 2014] %e A015739 a(9) = 2 because in the 8 (=A000009(9)) partitions of 9 into distinct parts, namely [9], [8,1], [7,2], [6,3], [6,2,1], [5,4], [5,3,1] and [4,3,2] we have altogether two parts equal to 4. %p A015739 g:=x^4*product(1+x^j,j=1..60)/(1+x^4): gser:=series(g,x=0,57): seq(coeff(gser,x,n),n=1..54); %p A015739 # _Emeric Deutsch_, Apr 17 2006 %p A015739 b:= proc(n, i) option remember; local g; %p A015739 if n=0 then [1, 0] %p A015739 elif i<1 then [0, 0] %p A015739 else g:= `if`(i>n, [0$2], b(n-i, i-1)); %p A015739 b(n, i-1) +g +[0, `if`(i=4, g[1], 0)] %p A015739 fi %p A015739 end: %p A015739 a:= n-> b(n, n)[2]: %p A015739 seq (a(n), n=1..100); %p A015739 # _Alois P. Heinz_, Oct 27 2012 %t A015739 $RecursionLimit = 1000; b[n_, i_] := b[n, i] = Module[{g}, If[n==0, {1, 0}, If[i<1 , {0, 0}, g = If[i>n, {0, 0}, b[n-i, i-1]]; b[n, i-1] + g + {0, If[i == 4, g[[1]], 0]}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Apr 01 2015, after _Alois P. Heinz_ *) %t A015739 Table[Count[Flatten@Select[IntegerPartitions[n], DeleteDuplicates[#] == # &], 4], {n, 58}] (* _Robert Price_, May 16 2020 *) %K A015739 nonn %O A015739 1,7 %A A015739 _Clark Kimberling_