login
Number of partitions satisfying 0 < cn(1,5) + cn(4,5).
1

%I #13 Nov 12 2015 06:10:24

%S 0,1,1,2,4,5,9,12,18,26,35,50,67,90,122,158,212,272,355,457,582,745,

%T 941,1185,1494,1858,2325,2875,3561,4388,5386,6604,8061,9815,11936,

%U 14440,17482,21058,25352,30438,36460,43610,52040,61980,73727,87464,103695,122619

%N Number of partitions satisfying 0 < cn(1,5) + cn(4,5).

%C For a given partition cn(i,n) means the number of its parts equal to i modulo n.

%C Short: o < 1 + 4 (OMAAp).

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

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

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

%p b(n-i, i, `if`(irem(i, 5) in {1, 4}, 1, t)))))

%p end:

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

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Apr 04 2014

%t b[n_, i_, t_] := b[n, i, t] = If[n == 0, t, If[i<1, 0, b[n, i-1, t] + If[i>n, 0, b[n-i, i, If[MemberQ[{1, 4}, Mod[i, 5]], 1, t]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Nov 12 2015, after _Alois P. Heinz_ *)

%K nonn

%O 0,4

%A _Olivier Gérard_