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.

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

This page as a plain text file.
%I A240010 #17 Dec 10 2020 17:32:03
%S A240010 1,0,1,1,1,2,2,4,3,7,6,11,11,17,19,27,31,41,51,62,79,95,121,142,182,
%T A240010 212,269,314,393,459,570,665,816,958,1160,1364,1639,1928,2297,2706,
%U A240010 3200,3768,4434,5212,6105,7170,8361,9799,11396,13322,15450,18022,20850
%N A240010 Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 1.
%C A240010 With offset 2 number of partitions of n, where the difference between the number of odd parts and the number of even parts is -1.
%H A240010 Alois P. Heinz, <a href="/A240010/b240010.txt">Table of n, a(n) for n = 1..1000</a>
%e A240010 a(9) = 3: [9], [4,2,1,1,1], [3,2,2,1,1].
%e A240010 a(10) = 7: [8,1,1], [7,2,1], [6,3,1], [5,4,1], [5,3,2], [4,3,3], [2,2,2,1,1,1,1].
%p A240010 b:= proc(n, i, t) option remember; `if`(abs(t)>n, 0,
%p A240010       `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t)+
%p A240010       `if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1))))))
%p A240010     end:
%p A240010 a:= n-> b(n$2, -1):
%p A240010 seq(a(n), n=1..80);
%t A240010 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 A240010 a[n_] := b[n, n, -1];
%t A240010 Array[a, 80] (* _Jean-François Alcover_, Dec 10 2020, after _Alois P. Heinz_ *)
%Y A240010 Column k=1 of A240009.
%K A240010 nonn
%O A240010 1,6
%A A240010 _Alois P. Heinz_, Mar 30 2014