[seqfan] Re: A051839 (Number of partitions closed under GCD and LCM )
israel at math.ubc.ca
israel at math.ubc.ca
Fri Sep 21 09:18:23 CEST 2012
On Sep 20 2012, Jean-François Alcover wrote:
>Dear SeqFans,
>
>Can someone check given data of A051839 ?
>(results from Maple and Mathematica are different)
>Thanks
>jfa
I can confirm that the Maple program produces the data given.
Here's a somewhat simpler Maple function, which also produces the
same results:
> closed:= proc(L)
local i,j,S;
S:= convert(L,set);
for i from 1 to nops(S) do
for j from 1 to i-1 do
if not member(igcd(S[i],S[j]),S) or not member(ilcm(S[i],S[j]),S)
then
return false
end if
end do
end do;
true
end proc;
A051839:= proc(n)
nops(select(closed,
combinat:-partition(n)))
end proc;
There's no Mathematica program listed. What Mathematica program
are you using?
Perhaps it should be made clearer that the condition is not just that the
gcd and lcm of the members of the partition are in the partition, but
that the gcd and lcm of each pair of members of the partition are in the
partition: this first makes a difference for n=18, where the partition
[12,3,2,1] is not allowed because lcm(3,2) = 6 is not a member of the
partition.
Robert Israel
University of British Columbia
More information about the SeqFan
mailing list