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 A189357 #27 Mar 06 2020 09:50:53 %S A189357 1,1,1,1,2,1,3,1,4,2,5,2,7,3,8,4,11,5,13,6,17,8,20,9,26,12,30,14,38, %T A189357 17,45,20,55,25,64,29,79,35,91,41,110,49,128,57,152,68,176,78,209,93, %U A189357 240,107,282,125,325,144,379,168,434,192,505,223,576,255,666,294,760,335,873,385,993,437,1139 %N A189357 Number of partitions of n into distinct parts where all differences between consecutive parts are even. %C A189357 Also number of partitions into distinct parts where either all parts are even or all parts are odd. %C A189357 Also number of symmetric unimodal compositions of n where the maximal part m appears at least m times, see example. [_Joerg Arndt_, Jun 11 2013] %H A189357 Paul D. Hanna, <a href="/A189357/b189357.txt">Table of n, a(n) for n = 0..1000</a> %F A189357 a(n) = A000009(2*n) + A000700(n) for n>=1, a(0)=1. %F A189357 G.f.: -1 + prod(n>=1, 1+x^(2*n) ) + prod(n>=1, 1+x^(2*n-1) ). %F A189357 G.f.: -1 + sum(n>=0, x^(n^2)*(1+x^n) / prod(k=1..n, 1-x^(2*k)) ). [_Joerg Arndt_, Jan 27 2011] %e A189357 a(14)=8 because there are 8 such partitions of 14: 1+13 =2+4+8 =2+12 =3+11 =4+10 =5+9 =6+8 =14 %e A189357 G.f.: A(x) = 1 + x + x^2 + x^3 + 2*x^4 + x^5 + 3*x^6 + x^7 + 4*x^8 + 2*x^9 +... %e A189357 From _Joerg Arndt_, Jun 11 2013: (Start) %e A189357 There are a(18)=13 symmetric unimodal compositions of 18 where the maximal part m appears at least m times: %e A189357 01: [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ] %e A189357 02: [ 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 ] %e A189357 03: [ 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 ] %e A189357 04: [ 1 1 1 1 1 2 2 2 2 1 1 1 1 1 ] %e A189357 05: [ 1 1 1 1 2 2 2 2 2 1 1 1 1 ] %e A189357 06: [ 1 1 1 2 2 2 2 2 2 1 1 1 ] %e A189357 07: [ 1 1 1 3 3 3 3 1 1 1 ] %e A189357 08: [ 1 1 2 2 2 2 2 2 2 1 1 ] %e A189357 09: [ 1 2 2 2 2 2 2 2 2 1 ] %e A189357 10: [ 1 2 3 3 3 3 2 1 ] %e A189357 11: [ 1 4 4 4 4 1 ] %e A189357 12: [ 2 2 2 2 2 2 2 2 2 ] %e A189357 13: [ 3 3 3 3 3 3 ] %e A189357 (End) %o A189357 (Sage) %o A189357 def A189357(n): %o A189357 works = lambda part: all(x % 2 == 0 for x in differences(part)) %o A189357 def count(pred, iter): return sum(1 for item in iter if pred(item)) %o A189357 return count(works, Partitions(n, max_slope=-1)) %o A189357 print([A189357(n) for n in range(0, 30)]) %o A189357 # _D. S. McNeil_, Apr 21 2011 (updated to Python3 by _Peter Luschny_, Mar 06 2020 ) %o A189357 (PARI) {a(n)=polcoeff(-1 + prod(m=1,n\1, 1+x^(2*m))+prod(m=1,n\2+1,1+x^(2*m-1))+x*O(x^n),n)} /* _Paul D. Hanna_ */ %o A189357 (PARI) {a(n)=polcoeff(-1 + sum(m=0,sqrtint(n+1), x^(m^2)*(1+x^m)/prod(k=1,m,1-x^(2*k)+x*O(x^n))),n)} /* _Paul D. Hanna_ */ %Y A189357 Cf. A000009 (partitions of 2*n with even differences and even minimal part), A179080 (odd differences), A179049 (odd differences and odd minimal part). %K A189357 nonn %O A189357 0,5 %A A189357 _Joerg Arndt_, Apr 20 2011