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 A239961 #14 Jun 05 2021 06:17:06 %S A239961 1,0,1,0,0,1,1,2,2,2,4,4,6,9,10,12,19,21,24,36,44,49,66,81,100,123, %T A239961 144,180,229,265,317,391,473,566,675,798,968,1154,1354,1621,1926,2241, %U A239961 2675,3170,3691,4345,5113,5956,7002,8182,9503,11095,12919,14976,17446 %N A239961 Number of partitions of n such that (number of distinct parts) = number of 2's. %H A239961 Alois P. Heinz, <a href="/A239961/b239961.txt">Table of n, a(n) for n = 0..1000</a> %e A239961 a(10) counts these 4 partitions : 622, 3322, 32221, 22111111. %p A239961 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, %p A239961 b(n, i-1)+`if`(i=2, 0, add(b(n-2-i*j, i-1), j=1..(n-2)/i)))) %p A239961 end: %p A239961 a:= n-> `if`(n=0, 1, b(n-2$2)): %p A239961 seq(a(n), n=0..70); # _Alois P. Heinz_, Apr 03 2014 %t A239961 z = 54; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[IntegerPartitions[n], p_ /; d[p] == Count[p, 2]], {n, 0, z}] %t A239961 (* Second program: *) %t A239961 b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i-1] + %t A239961 If[i == 2, 0, Sum[b[n-2-i*j, i-1], {j, 1, (n-2)/i}]]]]; %t A239961 a[n_] := If[n == 0, 1, b[n-2, n-2]]; %t A239961 a /@ Range[0, 70] (* _Jean-François Alcover_, Jun 05 2021, after _Alois P. Heinz_ *) %Y A239961 Cf. A239960. %K A239961 nonn,easy %O A239961 0,8 %A A239961 _Clark Kimberling_, Mar 30 2014