[f] = mfeigenbasis(mfinit([32,3,-4],0));
Psi(n) = if((1+I)*round(n/(1+I))==n,0,forvec(i=[[0,3],[0,1]],if((x->(1+I)^4*round(x/(1+I)^4)==x)(n-I^i[1]*(1+2*I)^i[2]),return((-I)^i[1]*(-1)^i[2]*n))));
[g] = mfeigensearch([32,2]);

primeList = [2+I,3,2+3*I];

print("Values of psi and traces of representation of G_K induced by f:");
apply(p->print([p,Psi(p),subst(lift(if(isprime(norm(p)),mfcoef(f,norm(p)),mfcoef(f,abs(p))^2-2*kronecker(-4,abs(p))*abs(p)^2)),y,I)]),primeList);

print("\nValues of psi+conj(psi) and traces of representation of G_K induced by g:");
apply(p->print([p,Psi(p)+conj(Psi(p)),if(isprime(norm(p)),mfcoef(g,norm(p)),mfcoef(g,abs(p))^2-2*abs(p))]),primeList);
