1,1

For all coprime pairs (u,v) with 1/3 < u/v < 2/3 exists a unique k such that A153161(k)=u and a(k)=v;

a(1) = 2 and for n>1: a(n) = if A025480(n-1)<>0 and A025480(n)<>0 then a(A025480(n-1))+a(A025480(n)) else if A025480(n)=0 then a(A025480(n-1))+3 else a(n)=3+a(A025480(n-1)).

Table of n, a(n) for n=1..72.

Index entries for sequences related to Stern's sequences

N. J. A. Sloane, Stern-Brocot or Farey Tree

A047679, A007306.

Sequence in context: A027438 A334388 A204237 * A168199 A251736 A076520

Adjacent sequences: A153159 A153160 A153161 * A153163 A153164 A153165

frac,nonn,tabf

Reinhard Zumkeller, Dec 22 2008

approved