login
Numbers n whose prime factors can be partitioned into two disjoint sets whose sums are both (sum of primes dividing n (with repetition))/2.
3

%I #30 Oct 21 2024 13:12:32

%S 4,9,16,25,30,36,49,64,70,72,81,84,100,120,121,144,169,196,225,240,

%T 256,270,280,286,288,289,308,324,336,361,378,400,440,441,480,484,495,

%U 525,528,529,540,576,594,625,630,646,648,672,676,728,729,750,756,784,800

%N Numbers n whose prime factors can be partitioned into two disjoint sets whose sums are both (sum of primes dividing n (with repetition))/2.

%C From _Christian N. K. Anderson_, Apr 16 2013: (Start)

%C Alternatively, the two sets of prime factors have an equal sum.

%C Superset of even powers, p^(2*i) where p is a prime number (A056798), and composites thereof. (End)

%H Christian N. K. Anderson, <a href="/A175592/b175592.txt">Table of n, a(n) for n = 1..10000</a>

%H Christian N. K. Anderson, <a href="/A175592/a175592_1.txt">Equal sum partitions</a> of prime factors of a(n).

%e a(1)=4 because 4=2*2 and 2=2, a(2)=9 because 9=3*3 and 3=3, a(3)=16 because 16=2*2*2*2 and 2+2=2+2, a(4)=25 because 25=5*5 and 5=5, a(5)=30 because 30=2*3*5 and 2+3=5.

%p Primefactors := proc(n) local F, f, i; F := [];

%p for f in ifactors(n)[2] do

%p for i from 1 to f[2] do

%p F := [op(F), f[1]]

%p od od; F end:

%p isPrimeZumkeller := proc(n) option remember; local s, p, i, P;

%p s := add(Primefactors(n)); # A001414

%p if s::odd or s = 0 then return false fi;

%p P := mul(1 + x^i, i in Primefactors(n));

%p is(0 < coeff(P, x, s/2)) end:

%p select(isPrimeZumkeller, [seq(1..800)]); # _Peter Luschny_, Oct 21 2024

%o (Haskell)

%o a175592 n = a175592_list !! (n-1)

%o a175592_list = filter (z 0 0 . a027746_row) $ [1..] where

%o z u v [] = u == v

%o z u v (p:ps) = z (u + p) v ps || z u (v + p) ps

%o -- _Reinhard Zumkeller_, Apr 18 2013

%Y Prime divisor variant of A083207.

%Y Cf. A001414, A056798, A027746, A221054, A001414.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Jul 20 2010

%E Corrected by _Christian N. K. Anderson_, Apr 16 2013