OFFSET
1,1
FORMULA
For n>=1: a(2*n-1) = 2*n, a(4*n-2) = n, a(4*n) = 2*a(2*n).
EXAMPLE
2*x=2.8169885584578139714969485581613959832279979115641025629325276350497259...
The continued fraction expansion of x = A109168:
[1; 2, 2, 4, 3, 4, 4, 8, 5, 6, 6, 8, 7, 8, 8, 16, ...];
The continued fraction expansion of 2*x = A109170:
[2;1, 4,2, 6,2, 8,4, 10,3, 12,4, 14,4, 16,8, 18,5, ...]
which equals the continued fraction of x interleaved with even numbers.
PROG
(PARI) a(n)=if(n%2==1, (n+1), if(n%4==2, (n+2)/4, 2*a(n/2)))
CROSSREFS
KEYWORD
cofr,nonn
AUTHOR
Paul D. Hanna, Jun 21 2005
STATUS
approved