Talk:Factor-perfect numbers

A034776?

Can anyone here explain to me what A034776 is?

n a(n)  factors         g(n)
1 1     {1}             1
2 2     {1,2}           1
3 3     {1,3}           1
4 4     {1,2,4}         2
5 8     {1,5}           1
6 13    {1,2,3,6}       3
7 16    {1,7}           1
8 20    {1,2,4,8}       4
9 26    {1,3,9}         2
10 32   {1,2,5,10}      3
11 44   {1,11}          1
12 48   {1,2,3,4,6,12}  8

a(n) is aka A034776, g(n) is aka A074206 - I cannot think of any formula or logic to get those a(n). --Petelomax (talk) 05:28, 7 October 2022 (UTC)

g(n) seems to be more or less what the task here has to run to get the answers (note the 48 in about the 48th place in A074206). But a(n) feels like a troll of those who search for puzzle hints. --Wherrera (talk) 06:41, 7 October 2022 (UTC)

a(n) is Project Euler 548. g(n) = 1/(2-zeta(n)).--Nigel Galloway (talk) 13:40, 7 October 2022 (UTC)

As stated on PE548, g(12)=8, g(48)=48 and g(120)=132 - but A034776 has 48, 3408, and 222528 for those g(n) erm, a(n) - note that I don't have a problem with A074206, but I do with A034776. Also, my pathetic attempts to implement g(n)=1/(2-zeta(n)) gave me

   {1,0}
   {2,2.81637833}
   {3,1.253222196}
   {4,1.089708312}
   {5,1.038343702}

--Petelomax (talk) 16:44, 7 October 2022 (UTC)

zeta?

Is there some shortcut to calculating the sequence order using the zeta function? Supposedly solving zeta(n) = 2 should help, but I was not able to find anything to work using floating point real n and zeta(n).

suggested rewording

I found the third paragraph a bit hard to digest, and suggest replacing

For example, for the factorization of 6, if the first type of sequence is [1, 6], this is generated by [6] since 1 * 6 = 6.  Similarly, the first type of sequence [1, 2, 6] is generated by the second type of sequence [2, 3] because 1 * 2 = 2 and 2 * 3 = 6. Similarly, [1, 3, 6] is generated by [3, 2] because 1 * 3 = 3 and 3 * 2 = 6.

with

For example, for the factorization of 6, if some element of the first type is [1, 2], it is matched by [2, 3] in the second type, with the leading 1 removed and a final element added if needed to reach the target, and likewise [1, 3] is matched [3, 2]. A first type [1,2,4,24] matches [2,2,6,2] which perhaps more clearly shows the multiplication steps and the fact that the product of the second type is always exactly equal to the target. Note that [1,6] in the first type is matched by [6] in the second, with no need to add a final element because it has already reached the target [aka an otherwise logical final 1 is not wanted]. Lastly the lengths of elements of the second type should always exactly match those of the first, except in the [1, n] case.

Let me know if you think that's better, worse, or needs any further improvement.

There is also apparently some confusion over whether the first type should end with the target, Julia does not (and Phix slavishly copies that) whereas Python and Wren do, and obviously I've based that rewording on a "not". --Petelomax (talk) 18:10, 7 October 2022 (UTC)

Yes, it could be optional as is the leading [1, ..], but for consistency with the task description I changed it in the Julia task. I also added a less memory-hogging way of getting the number of factorizations to the Julia example, though the Julia program still had to run overnight for 2342912. You can edit the task third paragraph if it is clearer that way-- go ahead. --Wherrera (talk) 18:24, 7 October 2022 (UTC)

Nah, thanks, I can spot a poisoned chalice, not like I know what I'm talking about anyway. 😜 --Petelomax (talk) 19:12, 7 October 2022 (UTC)

Sorry if it was not clear enough. I find the descriptions in the OEIS vague too. --Wherrera (talk) 20:43, 7 October 2022 (UTC)

Erdos' algorithm is the faster method

I updated the examples to reflect Erdos' algorithm on the first page of the referenced paper. --Wherrera (talk) 00:57, 8 October 2022 (UTC)

Atempting to run the latest Julia entry, I get "ArgumentError: reducing over an empty collection is not allowed", same on https://julialang.org/learning/tryjulia/ - I am running 1.7.2, would installing 1.8.2 fix it? --Petelomax (talk) 14:33, 9 October 2022 (UTC)

Ok, but what is F?

Currently, the task page says:

    According to the paper listed below by P. Erdos, the number of these sequences is
     
    where a is a list of the factors of n, including n, but excluding 1.

However, there's no accompanying definition for F. Reviewing the first page of the linked paper where this expression occurs yields an incomplete definition for F (what is cn? What is o?) --Rdm (talk) 12:31, 9 October 2022 (UTC)

Indeed, don't anyone take this too heavily, but some people should perhaps bear in mind that the purpose of rosettacode is to compare programming languages, rather than test the math proficiency of individual contributors. The two other linked references are almost completely incomprehensible to me: the Klazar/Luca paper seems to be about the theoretical bounds of some unspecified function, albeit at least a relevant one, whereas I cannot identify a single reason why wp:Enumerative combinatorics is any more pertinent than say Counting --Petelomax (talk) 13:54, 9 October 2022 (UTC)

F(n) is the number of different factorizations according to the second definition. I will add that, sorry for the lack of explanation. I don't usually try to fully understand the math papers either, I just look for the formulas they prove for useful hints. --Wherrera (talk) 17:51, 9 October 2022 (UTC)

I think this needs an additional constraint that F(1)=0. But it works with that constraint. Thanks. --Rdm (talk) 18:59, 9 October 2022 (UTC)

wp link deleted

I have deleted the "see also" link to Wikipedia: Enumerative Combinatorics because that page contains nothing pertinent to this task. --Petelomax (talk)

Return to "Factor-perfect numbers" page.