The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035537 Number of partitions of n with equal nonzero number of parts congruent to each of 0 and 1 (mod 3). 0

%I #12 Sep 13 2020 14:45:36

%S 0,0,0,0,1,0,1,2,2,3,5,5,9,10,15,18,24,30,40,47,65,76,97,120,150,179,

%T 229,270,336,404,494,588,722,852,1035,1227,1476,1744,2090,2461,2935,

%U 3446,4092,4795,5665,6627,7801,9096,10680,12426,14528,16881,19680,22800,26525

%N Number of partitions of n with equal nonzero number of parts congruent to each of 0 and 1 (mod 3).

%p b := proc(n, i, t, s) option remember; `if`(n=0,

%p `if`(t = s and t >= 1, 1, 0), `if`(i<1, 0, b(n, i-1, t, s)+

%p b(n-i, min(n-i, i), t + [1, 0, 0][1+irem(i, 3)], s + [0, 1, 0][1+irem(i, 3)])))

%p end:

%p seq(b(n,n, 0,0), n=0..50); # _Georg Fischer_, Sep 13 2020

%t equalQ[partit_] := With[{t = Total[Switch[Mod[#, 3], 0, {1, 0, 0}, 1, {0, 1, 0}, 2, {0, 0, 1}]& /@ partit]}, t[[1]] > 0 && t[[1]] == t[[2]]]; a[n_] := Select[IntegerPartitions[n], equalQ] // Length; a[0] = 0; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 54}] (* _Jean-François Alcover_, Dec 07 2016 *)

%K nonn

%O 0,8

%A _Olivier Gérard_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 05:33 EDT 2024. Contains 372921 sequences. (Running on oeis4.)