OFFSET
1,1
PROG
(PARI) (15000 precision digits) v=contfrac(Pi/4); a(n)=if(n<0, 0, s=1; while(abs(n-component(v, s))>0, s++); s)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Benoit Cloitre, Oct 20 2002
STATUS
approved