Have a piece of Pi
a[52514],b,c=52514,d,e,f=1e4,g,h;main(){for(;b=c-=14;h=printf("%04d", e+d/f))for(e=d%=f;g=--b*2;d/=g)d=d*b+f*(h?a[b]:f/5),a[b]=d%--g;}
Try reading this interesting paper to learn more.
Source code, since WordPress insists on doing something to the quotes in the code above.
I move my pretty useless blog to Hugo about 7 years ago, since I got frustrated at too many security…