cp's OEIS Frontend

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.

A240011 Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 2.

This page as a plain text file.
%I A240011 #15 Dec 10 2020 17:37:00
%S A240011 1,0,1,1,2,2,3,4,5,8,8,13,14,21,23,34,37,52,60,79,93,120,143,178,216,
%T A240011 263,321,386,470,560,684,806,980,1154,1395,1636,1969,2304,2758,3225,
%U A240011 3835,4480,5305,6186,7288,8495,9961,11594,13545,15742,18325,21269,24675
%N A240011 Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 2.
%C A240011 With offset 4 number of partitions of n, where the difference between the number of odd parts and the number of even parts is -2.
%H A240011 Alois P. Heinz, <a href="/A240011/b240011.txt">Table of n, a(n) for n = 2..1000</a>
%e A240011 a(10) = 5: [9,1], [7,3], [5,5], [4,2,1,1,1,1], [3,2,2,1,1,1].
%e A240011 a(11) = 8: [8,1,1,1], [7,2,1,1], [6,3,1,1], [5,4,1,1], [5,3,2,1], [4,3,3,1], [3,3,3,2], [2,2,2,1,1,1,1,1].
%p A240011 b:= proc(n, i, t) option remember; `if`(abs(t)>n, 0,
%p A240011       `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t)+
%p A240011       `if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1))))))
%p A240011     end:
%p A240011 a:= n-> b(n$2, -2):
%p A240011 seq(a(n), n=2..80);
%t A240011 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]]]]];
%t A240011 a[n_] := b[n, n, -2];
%t A240011 a /@ Range[2, 80] (* _Jean-François Alcover_, Dec 10 2020, after _Alois P. Heinz_ *)
%Y A240011 Column k=2 of A240009.
%K A240011 nonn
%O A240011 2,5
%A A240011 _Alois P. Heinz_, Mar 30 2014