Kevin Ryde on Sat, 16 Aug 2014 07:47:12 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Vec() and leading zeros of generating function
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Vec() and leading zeros of generating function
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Sat, 16 Aug 2014 15:43:46 +1000
- Delivery-date: Sat, 16 Aug 2014 07:47:13 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1408168024; bh=Z8iFuDr7hjac2d8TY5Q9lt/qxht//efGF8Ek9hCOVM4=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Subject:User-Agent:Date:Message-ID:MIME-Version:Content-Type; b=X10Uoq32uvQGg0E5imYiQ3yKnKf/6gHXWqqhEx7zZjVkNmCpsPuwWRq+sHhEBwu+gp4UWKc67N1Z0wkzvheQU+YVfx3FtZGt1PKSouiHnlVdPRkK+JlWK1OnEue44DdqiVn2otW7rEoezVLvCQ/SYHMUD+j1sumqYMZ8IQXgk7z94Qg/BU8fUYkcD57NH8B5j1e7BV/0BzapnPsg/eQrdHoZJKUMVQVewVXOrzPgZ9qC6q4XW0k9OWPZ3UCmEHOMHGiLG9U17+ey8GDUI9ct8PJP/d3Mqwf0R1w9NMPkV2CINfxbEL0zQ+Ad405I3wOTsmHDLJMGz67wOzRt4Jn+SA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1408168024; bh=Z8iFuDr7hjac2d8TY5Q9lt/qxht//efGF8Ek9hCOVM4=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Subject:User-Agent:Date:Message-ID:MIME-Version:Content-Type; b=NP4cJdi47OdKT4lDbe/3FKaqpTP30DBNk3uSGzC+U6HYHhr+BfqJwXVccC1THehqWLN4vYquBETlmn+CFJ95SbQD2M13Hc3QgdhpNL8Wq9m/lvHjT4aWWsJnb0M+nxBkrFE8gAKyphLA/4hrITYht5Q895fhxCBKq1IQfiaPlrY=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com.au; b=dLmFftM/q7SGd1J1R4Dt9xe8KLn+god+7Omq3OlQK2UehUPNTaHtf5SvHinBDwhZfpS4n31Dk1kHbl1vgegi152e+xUXO9Cp0D+cEJ3hyDw6be8YpHf7SPXCJvB/p4oQSYRzLArl7MnUnjp+HJalxoekFB2DvQjze0vEYuquNcgEhUx4jJuuYFNycSAwZmw2qLkfFqikbbY/wO1gwzV75r8oDwJLHRoUtA6JNqlnBHbabwv4SHr3URWMVmVwoUQwU6WekCHFQEMEgmM9AmZXWlMXDgrRpwVn5p3XwaBr5ddv9O9DbqVLWCUJU5nHUkokvzqricqFYjreqnL/nwqpBg==;
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Vec() can give terms from a polynomial generating function but it
doesn't include leading zeros. Eg.
Vec(x^2/(1-2*x) + O(x^5))
=>
[1, 2, 4]
Is there a good way to start from the zero'th term so I would get
[0, 0, 1, 2, 4]
I have to confess to only doing this by cut-and-paste programming, so
perhaps there's something completely different I don't know which is
better. :-) My main use has been to compare against expected or desired
values, so
want = [1, -1, 1, -1]
Vec(1/(1+x) + O(x^length(want))) == want || error("oops")
I see some Pol(Vecrev()) can turn the values into a poly for the
compare, but poly -> values helps for printing the values too.