[seqfan] Re: Questions concerning A003418 and A002944.

peter.luschny at googlemail.com peter.luschny at googlemail.com
Tue Jun 23 22:51:21 CEST 2009


> A003418(n) = lcm({1,2,3,...,n})
> A002944(n) = lcm({1,2,3,...,n})/n
>
> (1) A003418: seq (denom(sum((-1)^i/i, i = 1..n)), n=0..30);"
> (Zerinvary Lajos) looks erroneous. First discrepancy at n=16.

>>indeed.

So I think it should be deleted.

>  Perhaps the author meant A058312(n).
>
>  And PARI?
>

>>the first PARI code also is bad, it gives a wrong result
>>e.g. for n=27 on the computer I'm right now, where the result
>>is off by one power of 3 (but this may depend on the kernel
>>used and on the machine dependent default precision)

>>If it is changed to:
>>A003418(n)={local(t=1); forprime(p=2, n, t*=p^(log(n+.5)\log(p))); t}
>>then the result is ok for (very) much larger n.

>>(I think the idea of the code is clear: the lcm of all numbers <= n
>>is the same than that of all prime powers <= n and thus that of
>>the largest prime powers <= n.)

>>Also, I don't understand the purpose for the second version,
>>1/content(...1/k) ; in any case the simplest would be

>>A003418(n)=lcm(vector(n,i,i))

>>which works in particular for n=0, and is much faster than
>>the above "prime power" version.

Therefore I think the other PARI versions should be deleted
as the aim of the code section is, in my opinion, to give
simple and/or efficient code. If some author would like to
present some particular formulas then the formula or comment
section is better suited.

My opinion with regard to
(2) A003418: "It appears that A020500(n) = A003418(n+1)/a(n)"
is: It is true and trivial and therefore as a comment confusing.
Hence it should be deleted.

With regard to (3): I suspect an insufficient understanding
of the difference between 'sum' and 'add' in connection
with some particularities of Maple, but I might be wrong.

In any case, in the course of time I found dozens of small
errors and whished to correct them -- recorded in the
history page but not in the article page as this would wrongly
give the impression of being a nitpicker. So hopefully
the promised Wiki arrives soon.

Cheers Peter




More information about the SeqFan mailing list