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.

A316398 Number of distinct subset-averages of the integer partition with Heinz number n.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 5, 2, 4, 4, 2, 2, 5, 2, 5, 4, 4, 2, 6, 2, 4, 2, 5, 2, 6, 2, 2, 4, 4, 4, 6, 2, 4, 4, 6, 2, 8, 2, 5, 5, 4, 2, 7, 2, 5, 4, 5, 2, 6, 4, 6, 4, 4, 2, 9, 2, 4, 5, 2, 4, 8, 2, 5, 4, 8, 2, 8, 2, 4, 5, 5, 4, 8, 2, 7, 2, 4, 2, 9, 4, 4, 4, 6, 2, 8, 4, 5, 4, 4, 4, 8, 2, 5, 5, 6, 2, 8, 2, 6, 6
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2018

Keywords

Comments

Although the average of an empty set is technically indeterminate, we consider it to be distinct from the other subset-averages.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(60) = 9 distinct subset-averages of (3,2,1,1) are 0/0, 1, 4/3, 3/2, 5/3, 7/4, 2, 5/2, 3.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Union[Mean/@Subsets[primeMS[n]]]],{n,100}]
  • PARI
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); }
    A316398(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s = A056239(d)/bigomega(d)), mapput(m,s,s); k++)); (1+k); }; \\ Antti Karttunen, Sep 23 2018

Formula

a(n) = A316314(n) + 1.

Extensions

More terms from Antti Karttunen, Sep 23 2018