login
A127614
a(n) = numerator of the continued fraction which has the positive integers which are <= n and are coprime to n as its terms.
2
1, 1, 3, 4, 43, 6, 1393, 151, 3980, 265, 7489051, 479, 1004933203, 28065, 1567857, 3025576, 44811373131073, 107069, 13807296146243251, 12541924, 85867066404, 1867630045, 2448516766522879398193, 47040432, 85536466996746340043
OFFSET
1,3
COMMENTS
The positive integers coprime to n and <= n can be written either from largest to smallest or from smallest to largest and the numerator of the continued fraction would remain unchanged.
EXAMPLE
The positive integers coprime to 8 and <= 8 are 1,3,5,7. So a(8) is the numerator of 1 +1/(3 +1/(5 +1/7)) = 151/115. a(8) is also the numerator of 7 +1/(5 +1/(3 +1/1)) = 151/21.
MATHEMATICA
f[n_] := Select[Range[n], GCD[ #, n] == 1 &]; g[n_] := Numerator[FromContinuedFraction[f[n]]]; Table[g[n], {n, 26}] (* Ray Chandler, Jan 22 2007 *)
CROSSREFS
Sequence in context: A348225 A172144 A032837 * A041055 A246626 A032838
KEYWORD
frac,nonn
AUTHOR
Leroy Quet, Jan 19 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved