login
Heinz numbers of integer partitions whose length divides their sum.
197

%I #20 Nov 10 2024 16:09:30

%S 2,3,4,5,7,8,9,10,11,13,16,17,19,21,22,23,25,27,28,29,30,31,32,34,37,

%T 39,41,43,46,47,49,53,55,57,59,61,62,64,67,68,71,73,78,79,81,82,83,84,

%U 85,87,88,89,90,91,94,97,98,99,100,101,103,105,107,109,110

%N Heinz numbers of integer partitions whose length divides their sum.

%C In other words, partitions whose average is an integer.

%C The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

%H Alois P. Heinz, <a href="/A316413/b316413.txt">Table of n, a(n) for n = 1..20000</a> (first 1327 terms from R. J. Mathar)

%e Sequence of partitions whose length divides their sum begins (1), (2), (11), (3), (4), (111), (22), (31), (5), (6), (1111), (7), (8), (42), (51), (9), (33), (222), (411).

%p isA326413 := proc(n)

%p psigsu := A056239(n) ;

%p psigle := numtheory[bigomega](n) ;

%p if modp(psigsu,psigle) = 0 then

%p true;

%p else

%p false;

%p end if;

%p end proc:

%p n := 1:

%p for i from 2 to 3000 do

%p if isA326413(i) then

%p printf("%d %d\n",n,i);

%p n := n+1 ;

%p end if;

%p end do: # _R. J. Mathar_, Aug 09 2019

%p # second Maple program:

%p q:= n-> (l-> nops(l)>0 and irem(add(i, i=l), nops(l))=0)(map

%p (i-> numtheory[pi](i[1])$i[2], ifactors(n)[2])):

%p select(q, [$1..110])[]; # _Alois P. Heinz_, Nov 19 2021

%t Select[Range[2,100],Divisible[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]],PrimeOmega[#]]&]

%Y Cf. A056239, A067538, A074761, A143773, A237984, A289508, A289509, A290103, A296150, A298423, A316428, A316431.

%K nonn

%O 1,1

%A _Gus Wiseman_, Jul 02 2018