login
A240850
Number of partitions p of n into distinct parts including mean(p).
22
0, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 5, 1, 1, 6, 5, 1, 6, 1, 14, 7, 1, 1, 24, 16, 1, 9, 23, 1, 58, 1, 31, 11, 1, 75, 103, 1, 1, 13, 163, 1, 202, 1, 66, 182, 1, 1, 413, 203, 246, 17, 97, 1, 550, 347, 889, 19, 1, 1, 1500, 1, 1, 1442, 982, 625, 1424, 1, 177, 23
OFFSET
0,7
FORMULA
a(n) + A240851(n) = A000009(n) for n >= 0.
EXAMPLE
a(12) counts these 5 partitions: {12}, {7,4,1}, {6,4,2}, {6,3,2,1}, {5,4,3}.
MATHEMATICA
z = 70; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
Table[Count[f[n], p_ /; MemberQ[p, Mean[p]]], {n, 0, z}] (* A240850 *)
Table[Count[f[n], p_ /; ! MemberQ[p, Mean[p]]], {n, 0, z}] (* A240851 *)
PROG
(Python)
from sympy.utilities.iterables import partitions
def A240850(n): return sum(1 for s, p in partitions(n, size=True) if max(p.values(), default=0)==1 and not n%s and n//s in p) # Chai Wah Wu, Sep 21 2023
CROSSREFS
Sequence in context: A307828 A280698 A217667 * A357943 A194086 A342723
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 14 2014
STATUS
approved