OFFSET
1,2
COMMENTS
The mapping f(a/b) = (a + b)/(a - b). Taking a = 2 and b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the periodic sequence 2/1,3/1,2/1,3/1,...
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..26
FORMULA
MATHEMATICA
Last /@ NestList[{(#1 - #2), #1 #2} & @@ # &, {2, 1}, 16] (* Michael De Vlieger, Sep 04 2016 *)
PROG
(Sage)
# Variant with first four terms slightly different. Absolute values.
def A081478_abs():
x, y = 1, 2
yield x
while True:
yield x
x, y = x * y, x//y + 1
a = A081478_abs(); print([next(a) for i in range(17)]) # Peter Luschny, Dec 17 2015
CROSSREFS
KEYWORD
sign,frac
AUTHOR
Amarnath Murthy, Mar 24 2003
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
STATUS
approved