A363225 Number of integer partitions of n containing three parts (a,b,c) (repeats allowed) such that a + b = c. A variation of sum-full partitions.
0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 21, 29, 43, 58, 81, 109, 148, 195, 263, 339, 445, 574, 744, 942, 1209, 1515, 1923, 2399, 3005, 3721, 4629, 5693, 7024, 8589, 10530, 12804, 15596, 18876, 22870, 27538, 33204, 39816, 47766, 57061, 68161, 81099, 96510, 114434, 135634
Offset: 0
Keywords
Examples
The a(3) = 1 through a(9) = 14 partitions: (21) (211) (221) (42) (421) (422) (63) (2111) (321) (2221) (431) (432) (2211) (3211) (521) (621) (21111) (22111) (3221) (3321) (211111) (4211) (4221) (22211) (4311) (32111) (5211) (221111) (22221) (2111111) (32211) (42111) (222111) (321111) (2211111) (21111111)
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],Select[Tuples[#,3],#[[1]]+#[[2]]==#[[3]]&]!={}&]],{n,0,15}]
-
Python
from collections import Counter from itertools import combinations_with_replacement from sympy.utilities.iterables import partitions def A363225(n): return sum(1 for p in partitions(n) if any(q[0]+q[1]==q[2] for q in combinations_with_replacement(sorted(Counter(p).elements()),3))) # Chai Wah Wu, Sep 21 2023
Extensions
a(31)-a(48) from Chai Wah Wu, Sep 21 2023
Comments