OFFSET
1,8
COMMENTS
Zero together with the first differences of A024788.
Also number of 4's in all partitions of n that do not contain 1 as a part.
a(n) is the number of partitions of n such that m(1) < m(3), where m = multiplicity; e.g., a(7) counts these 3 partitions: [4, 3], [3, 3, 1], [3, 2, 2]. - Clark Kimberling, Apr 01 2014
The last section of the set of partitions of n is also the n-th section of the set of partitions of any integer >= n. - Omar E. Pol, Apr 07 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
It appears that A000041(n) = a(n+1) + a(n+2) + a(n+3) + a(n+4), n >= 0. - Omar E. Pol, Feb 04 2012
EXAMPLE
a(8) = 3 counts the 4's in 8 = 4+4 = 4+2+2. The 4's in 8 = 4+3+1 = 4+2+1+1 = 4+1+1+1+1 do not count.
From Omar E. Pol, Oct 25 2012: (Start)
--------------------------------------
Last section Number
of the set of of
partitions of 8 4's
--------------------------------------
8 .............................. 0
4 + 4 .......................... 2
5 + 3 .......................... 0
6 + 2 .......................... 0
3 + 3 + 2 ...................... 0
4 + 2 + 2 ...................... 1
2 + 2 + 2 + 2 .................. 0
. 1 .......................... 0
. 1 ...................... 0
. 1 ...................... 0
. 1 .................. 0
. 1 ...................... 0
. 1 .................. 0
. 1 .................. 0
. 1 .............. 0
. 1 .................. 0
. 1 .............. 0
. 1 .............. 0
. 1 .......... 0
. 1 .......... 0
. 1 ...... 0
. 1 .. 0
------------------------------------
. 6 - 3 = 3
.
In the last section of the set of partitions of 8 the difference between the sum of the fourth column and the sum of the fifth column is 6 - 3 = 3 equaling the number of 4's, so a(8) = 3 (see also A024788).
(End)
MAPLE
b:= proc(n, i) option remember; local g, h;
if n=0 then [1, 0]
elif i<2 then [0, 0]
else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i));
[g[1]+h[1], g[2]+h[2]+`if`(i=4, h[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq (a(n), n=1..70); # Alois P. Heinz, Mar 19 2012
MATHEMATICA
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 3]], {n, 0, z}] (* Clark Kimberling, Apr 01 2014 *)
b[n_, i_] := b[n, i] = Module[{g, h}, If[n==0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i==4, h[[1]], 0]}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Sep 21 2015, after Alois P. Heinz *)
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 4], {n, 52}] (* Robert Price, May 15 2020 *)
PROG
(Sage) A182714 = lambda n: sum(list(p).count(4) for p in Partitions(n) if 1 not in p)
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Nov 13 2011
STATUS
approved