New problem with A049602 (totally different)
Thomas Baruchel
thomas.baruchel at laposte.net
Mon Aug 30 15:47:52 CEST 2004
Here is a valid GP file:
===========from next line ==============
T(i,j)=
{
/*
%o A049600 (PARI)
A(i,j)=polcoeff(x/(1-2*x)*((1-x)/(1-2*x))^j+x*O(x^i),i)
(from Michael Somos)
*/
polcoeff(x/(1-2*x)*((1-x)/(1-2*x))^j+x*O(x^i),i);
}
seq(n)=
{
/*
%N A049602
a(n)=SUM{T(2i+1,n-2i-1): i=0,1,...,[ (n+1)/2 ]}, array T as in A049600.
%A A049602 Clark Kimberling (ck6(AT)evansville.edu)
*/
sum(i=0,n\2,T(2*i+1,n-2*i-1))-!(n%2);
}
============== until last line ==================
As you can see seq(n) is the function building A049602, but it is slightly
different
than the one in the definition given by Clark Kimberling.
The sum goes from i=0 to i=floor(n/2)
(remember that in pari/gp a\b means floor(a/b) when b>0 )
while the sum in the definition goes from i=0 to i=floor((n+1)/2)
I had to put a little correction when n is even:
!(n%2) means '1' when n is even and '0' when n is odd.
Am I wrong ? Did I misunderstand something ?
Is the T(i,j) function I use not the right one ?
--
Thomas Baruchel
More information about the SeqFan
mailing list