cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240850 Number of partitions p of n into distinct parts including mean(p).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Apr 14 2014

Keywords

Examples

			a(12) counts these 5 partitions:  {12}, {7,4,1}, {6,4,2}, {6,3,2,1}, {5,4,3}.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) + A240851(n) = A000009(n) for n >= 0.