Casimirs are not completely trivial to compute, and somewhat ill defined (if $C\_4$ is a quartic casimir and $C\_2$ a quadratic, $C\_4'=C\_4+p\*C\_2^2+q\*C\_2$ is another quartic casimir). With generalized Dynkin indices (here $I\_2, I\_4$) you remove the latter problem (they are fixed) but you must compute even harder.  

Since for my special problem probably *any* Casimir will do, I went the opposite way and defined a quasimir. Instead of a formal definition, an example should make things clear.  

Lie algebra is: $B\_2$  

Heighest weights are: $x,y$  

Positive roots are: $x,y,x+y,x+2y$  

Set $x\rightarrow{x+1},y\rightarrow{y+1}$ to get: $x+1,y+1,x+y+2,x+2y+3$  

Dimension is: $D=(x+1)/1\*(y+1)/1\*(x+y+2)/2\*(x+2y+3)/3$  

Quadratic Quasimir is: $Q\_2=(x+1)^2-1^2+(y+1)^2-1^2+(x+y+2)^2-2^2+(x+2y+3)^2-3^2$  

Quartic Quasimir is: $Q\_4=(x+1)^4-1^4+(y+1)^4-1^4+(x+y+2)^4-2^4+(x+2y+3)^4-3^4$  

(Depending on definition you have to multiply them by the dimension. Oh, and odd Quasimirs evidently crash, so hands off $A\_2,E\_6,...$!) 


Clearly the computation is child's play now, but of course first someone (and surely not amateur me :-) should a) prove that Quasimirs are Casimirs, b) relate them to those computed from a fairly standard definition (e.g. Wybourne's SCHUR program) and c) relate them to indices. E.g. here is $I\_2=Q\_2\*D/60,I\_4=(-12\*Q\_4+150\*Q\_2+5\*Q\_2^2)\*D/9$. (Props to Prof. Schellekens for providing me with the raw data.) 


So, first things first: Who can prove that a Quasimir is indeed a Casimir? 



The Quasimirs and Casimirs of a Lie algebra
The Harish-Chandra isomorphism tells you all what you want: The radial parts of the "Casimirs" (=elements of the center of the universal enveloping algebra) are of the form $p(\chi+\rho)$ where $p$ is a Weyl group invariant polynomial on a Cartan and $\rho$ is the half-sum of the positive roots. Up to a constant, you seem to take for $p$ the polynomials
$$
p\_m(\chi)=\sum\_{\alpha>0}\langle\chi\mid\alpha^\vee\rangle^m.
$$
This is only invariant if $m$ is even. For the $p\_{2m}$ to generate the ring of invariants it is necessary for the degrees of the generators to be even and distinct. This excludes $A\_n, n\ge2$, $D\_n, n\ge4$ and $E\_6$. Note, that many other choices for $p$ are possible.


In your example, you seem to have mixed up roots and coroots. Since
$$
x(\chi)=\langle\chi\mid\alpha\_1^\vee\rangle,\ y(\chi)=\langle\chi\mid\alpha\_2^\vee\rangle
$$
the other coroots are $x+y$ and $2x+y$. So, after replacing $x+2y$ by $2x+y$ your Quasimirs are Casimirs.


