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!)
A035534 Number of partitions of n with equal number of parts congruent to each of 0 and 1 (mod 3). 1

%I #16 Dec 07 2016 10:34:15

%S 1,0,1,0,2,1,2,3,4,4,8,7,12,13,19,22,30,35,47,54,74,85,109,131,165,

%T 194,247,289,359,427,523,617,757,889,1078,1272,1529,1799,2154,2529,

%U 3013,3528,4187,4894,5779,6748,7937,9241,10844,12599,14724,17089,19912,23048,26801

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

%H Alois P. Heinz, <a href="/A035534/b035534.txt">Table of n, a(n) for n = 0..1000</a>

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

%p `if`(c=0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+

%p `if`(i>n, 0, b(n-i, i, c+irem(i+2, 3)-1))))

%p end:

%p a:= n-> b(n$2, 0):

%p seq(a(n), n=0..70); # _Alois P. Heinz_, Dec 07 2016

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

%K nonn

%O 0,5

%A _Olivier Gérard_

%E More terms from _David W. Wilson_

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 April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)