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 A239833 #14 Oct 12 2015 04:06:39 %S A239833 0,1,1,1,2,2,3,4,6,7,10,13,17,22,28,36,46,58,72,92,113,141,174,216, %T A239833 263,324,394,481,583,707,852,1029,1235,1481,1774,2118,2524,3003,3567, %U A239833 4225,5003,5906,6968,8202,9646,11317,13275,15531,18160,21195,24718,28772 %N A239833 Number of partitions of n having an ordering of parts in which no parts of equal parity are adjacent and the first and last terms have the same parity. %H A239833 Alois P. Heinz, <a href="/A239833/b239833.txt">Table of n, a(n) for n = 0..1000</a> %F A239833 a(n) = A239832(n) + A239832(n+1) for n >= 0. %F A239833 a(n) = A240009(n,-1) + A240009(n,1). - _Alois P. Heinz_, Apr 02 2014 %e A239833 a(10) counts these 10 partitions: [10], [1,8,1], [7,2,1], [3,6,1], [5,4,1], [5,3,2], [3,4,3], [4,1,2,1,2], [2,3,2,1,2], [1,2,1,2,1,2,1]. %p A239833 b:= proc(n, i, t) option remember; `if`(abs(t)>n, 0, %p A239833 `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t)+ %p A239833 `if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1)))))) %p A239833 end: %p A239833 a:= n-> b(n$2, -1) +b(n$2, 1): %p A239833 seq(a(n), n=0..80); # _Alois P. Heinz_, Apr 02 2014 %t A239833 p[n_] := p[n] = Select[IntegerPartitions[n], Abs[Count[#, _?OddQ] - Count[#, _?EvenQ]] == 1 &]; t = Table[p[n], {n, 0, 10}] %t A239833 TableForm[t] (* shows the partitions*) %t A239833 t = Table[Length[p[n]], {n, 0, 60}] (* A239833 *) %t A239833 (* _Peter J. C. Moses_, Mar 10 2014 *) %t A239833 b[n_, i_, t_] := b[n, i, t] = If[Abs[t]>n, 0, If[n==0, 1, If[i<1, 0, b[n, i-1, t] + If[i>n, 0, b[n-i, i, t+(2*Mod[i, 2]-1)]]]]]; a[n_] := b[n, n, -1] + b[n, n, 1]; Table[a[n], {n, 0, 80}] (* _Jean-François Alcover_, Oct 12 2015, after _Alois P. Heinz_ *) %Y A239833 Cf. A239832, A239835, A045931, A239871. %K A239833 nonn,easy %O A239833 0,5 %A A239833 _Clark Kimberling_, Mar 29 2014