Max Alekseyev on Sat, 08 Jun 2024 18:55:25 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Game: find the series


PS. It seems the order of variables screws up after a certain point, and to be on the safe side, instead of "polcoef(c,0)" we should use explicit "polcoef(c,0,variable(polcoef(T,i)))".
Bill - could you please check if this is expected behavior? (replace "polcoef(c,0,variable(polcoef(T,i)))" with "polcoef(c,0)" in the code below to see the issue)

Here is a code parametrized by number N, the number of coefficients to determine:

===
? N=10
%13 = 10

? T = sum(i=0,N-1, eval(concat("a",Str(i)))*x^i) + O(x^N)
%14 = a0 + a1*x + a2*x^2 + a3*x^3 + a4*x^4 + a5*x^5 + a6*x^6 + a7*x^7 + a8*x^8 + a9*x^9 + O(x^10)

? EQ = x*L + sum(k=1,N, (-1)^(k-1) * x^k * T^k * (x-2^k) / k / 2^k);

? a=vector(N); for(i=0,N-1,  c = polcoef(EQ,i+1); for(j=0,i-1, c=subst(c,variable(polcoef(T,j)),a[j+1])); a[i+1] = polcoef(c,0,variable(polcoef(T,i)))); a
%15 = [L, 1/2*L^2 + 1/2*L, 1/6*L^3 + 5/8*L^2 + 1/4*L, 1/24*L^4 + 3/8*L^3 + 9/16*L^2 + 1/8*L, 1/120*L^5 + 9/64*L^4 + 17/32*L^3 + 7/16*L^2 + 1/16*L, 1/720*L^6 + 7/192*L^5 + 55/192*L^4 + 115/192*L^3 + 5/16*L^2 + 1/32*L, 1/5040*L^7 + 41/5760*L^6 + 25/256*L^5 + 685/1536*L^4 + 75/128*L^3 + 27/128*L^2 + 1/64*L, 1/40320*L^8 + 7/5760*L^7 + 511/23040*L^6 + 77/384*L^5 + 595/1024*L^4 + 133/256*L^3 + 35/256*L^2 + 1/128*L, 1/362880*L^9 + 131/645120*L^8 + 181/46080*L^7 + 511/9216*L^6 + 2093/6144*L^5 + 511/768*L^4 + 329/768*L^3 + 11/128*L^2 + 1/256*L, 1/3628800*L^10 + 7/276480*L^9 + 233/286720*L^8 + 301/30720*L^7 + 7301/61440*L^6 + 10227/20480*L^5 + 707/1024*L^4 + 171/512*L^3 + 27/512*L^2 + 1/512*L]
===

Regards,
Max


On Sat, Jun 8, 2024 at 12:41 PM Max Alekseyev <maxale@gmail.com> wrote:
Raising to the power x, we have S = (1+S)^x.
Letting x -> 0, we conclude that S = 1 + x*T for some power series x. Taking logarithm, we then have
log(1 + x*T) = x*log(2 + x*T) = x*log(2) + x*log(1+x*T/2)
That is, we have the power series identity
x*log(2) + Sum_{k>=1} (-1)^(k-1) * x^k * T^k * (x - 2^k) / k / 2^k = 0.

Let a_m denote the coefficient of x^m in T. 
Note that in the coefficient of x^(m+1) in the last identity, a_m comes in the first degree and with the coefficient -1. This allows to determine the coefficients a_m iteratively as illustrated by the following code (where L stands for log(2)):

===
? T = sum(i=0,5, eval(concat("a",Str(i)))*x^i) + O(x^6)
%1 = a0 + a1*x + a2*x^2 + a3*x^3 + a4*x^4 + a5*x^5 + O(x^6)

? EQ = x*L + sum(k=1,6, (-1)^(k-1) * x^k * T^k * (x-2^k) / k / 2^k)
%2 = (-a0 + L)*x + (1/2*a0^2 + 1/2*a0 - a1)*x^2 + (-1/3*a0^3 - 1/8*a0^2 + a1*a0 + (1/2*a1 - a2))*x^3 + (1/4*a0^4 + 1/24*a0^3 - a1*a0^2 + (-1/4*a1 + a2)*a0 + (1/2*a1^2 + (1/2*a2 - a3)))*x^4 + (-1/5*a0^5 - 1/64*a0^4 + a1*a0^3 + (1/8*a1 - a2)*a0^2 + (-a1^2 + (-1/4*a2 + a3))*a0 + (-1/8*a1^2 + a2*a1 + (1/2*a3 - a4)))*x^5 + (1/6*a0^6 + 1/160*a0^5 - a1*a0^4 + (-1/16*a1 + a2)*a0^3 + (3/2*a1^2 + (1/8*a2 - a3))*a0^2 + (1/8*a1^2 - 2*a2*a1 + (-1/4*a3 + a4))*a0 + (-1/3*a1^3 + (-1/4*a2 + a3)*a1 + (1/2*a2^2 + (1/2*a4 - a5))))*x^6 + O(x^7)

? a=vector(6); for(i=0,5,  c = polcoef(EQ,i+1); for(j=0,i-1, c=subst(c,variable(polcoef(T,j)),a[j+1])); a[i+1] = polcoef(c,0)); a
%3 = [L, 1/2*L^2 + 1/2*L, 1/6*L^3 + 5/8*L^2 + 1/4*L, 1/24*L^4 + 3/8*L^3 + 9/16*L^2 + 1/8*L, 1/120*L^5 + 9/64*L^4 + 17/32*L^3 + 7/16*L^2 + 1/16*L, 1/720*L^6 + 7/192*L^5 + 55/192*L^4 + 115/192*L^3 + 5/16*L^2 + 1/32*L]
===

Regards,
Max

On Fri, Jun 7, 2024 at 3:52 PM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
Dear PARI lovers,

Another little game:

Find a power series S in x so that
S^(1/x) = S + 1

Show that the coefficients are polynomials in log(2)
and compute the first few polynomials.

Enjoy!
Bill