OFFSET
2,1
COMMENTS
Sequence A213892 lists fixed points of this sequence.
PROG
(PARI) cf(v)={t=v[#v]; forstep(i=#v-1, 1, -1, t=v[i]+1/t); t}
A262213(n, d=3)=for(k=1, 9e9, (c=contfrac(cf(vector(k+2, i, if(i>1&&i<k+2, d, n)))*n))[1]==c[#c]&&return(k))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Sep 15 2015
STATUS
approved