Frank Thorne on Tue, 16 Jul 2013 21:54:08 +0200


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

Expected length of dirmul



Hello all --

Using Pari/GP 2.5.1 under Mac OSX. If I use dirmul to multiply two Dirichlet series, what will the length of the output be?

It seems to perhaps be ill-defined. For example, the following code

{
M_one(D, N) =
  v = vector(N);
  v[1] = 1;
  if (gcd(D, 3) == 3, v[3] = 2);
  if (Mod(D, 9) == Mod(6, 9), v[9] = 6);
  if (gcd(D, 3) == 1, v[9] = 2);
  v;
}

\\ Compute the main term of Theorem 2.5, as a Dirichlet series.
\\ Works for quadratic resolvent D, and computes to a length of N.
{
compute_main_dirichlet(D, N) =
  local(EP1, p1, temp);
  EP1 = vector(N);
  temp = vector(N);
  if (D > 0, EP1[1] = 1/2);
  if (D < 0, EP1[1] = 1/6);
  EP1 = dirmul(EP1, M_one(D, N));
  for (p1 = 2, N,
    if (isprime(p1),
     if (kronecker(-3*D, p1) == 1, \
	temp[p1] = 2,
	temp[p1] = 0;
      );
     EP1 = dirmul(EP1, temp);
     print(length(EP1));
     temp[p1] = 0;
  ));
  EP1;
}

produces the output

100
201
1009
7069
77769
1011009
  ***   at top-level: cmd(-3,100)
  ***                 ^-----------
  ***   in function cmd: ...p[p1]=2,temp[p1]=0;);EP1=dirmul(EP1,temp);pri
  ***                                                ^--------------------
  *** dirmul: overflow in lg().
  ***   Break loop: type 'break' to go back to GP

However, if I set temp[1] = 1, then the Dirichlet series does not grow after multiplication.

Thanks,
Frank