OFFSET
1,2
COMMENTS
The fraction k(n) = a(2*n-1)/a(2*n) is already in lowest terms.
EXAMPLE
k(1) = a(1)/a(2) = 1/9 = 0.1111111... with the infinite period 1 = k;
k(2) = a(3)/a(4) = 2/9 = 0.2222222... with the infinite period 2 = k;
k(3) = a(5)/a(6) = 1/3 = 0.3333333... with the infinite period 3 = k;
...
k(12) = a(23)/a(24) = 4/33 = 0.12121212... with the infinite period 12 = k;
k(13) = a(25)/a(26) = 13/99 = 0.13131313... with the infinite period 13 = k;
k(14) = a(27)/a(28) = 14/99 = 0.14141414... with the infinite period 14 = k;
etc.
Note that the infinite period 9 is given here by the fraction 1/1 as 1/1 = 0.9999999...
Note also that periods like 11, or 222, or 3333... are respectively given by the fractions 1/9, 2/9, 1/3... already used for the periods 1, 2, 3...
MATHEMATICA
Flatten@Table[{Numerator@#, Denominator@#}&@FromDigits[{{IntegerDigits@k}, 0}], {k, 48}] (* Giorgos Kalogeropoulos, Nov 03 2021 *)
PROG
(Python)
from sympy import sympify
def A348870(n): return (lambda m, r: r.p if m % 2 else r.q)(n, sympify('0.['+str((n+1)//2)+']')) # Chai Wah Wu, Nov 12 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Nov 02 2021
STATUS
approved