login
A280870
Numerator of the mediant of prime(n) / prime(n+1) and prime(n+2) / prime(n+3).
2
7, 5, 4, 5, 7, 4, 5, 8, 9, 11, 9, 10, 11, 48, 53, 19, 21, 33, 14, 25, 13, 14, 18, 19, 25, 52, 53, 55, 59, 61, 44, 135, 143, 145, 153, 157, 27, 168, 173, 177, 185, 187, 97, 49, 204, 211, 219, 113, 115, 78, 237, 245, 249, 257, 263, 89, 91, 69, 40, 287, 295
OFFSET
1,1
COMMENTS
The mediant of two reduced proper fractions a/b and c/d is (a+c)/(b+d), the value of which is strictly between a/b and c/d.
LINKS
Wikipedia, Mediant
EXAMPLE
The mediant of 2/3 and 5/7 is 7/10.
MATHEMATICA
Array[Numerator[(#1 + #3)/(#2 + #4)] & @@ Prime@ Range[#, # + 3] &, 61] (* Michael De Vlieger, Oct 08 2021 *)
PROG
(PARI) vector(100, n, numerator((prime(n)+prime(n+2)) / (prime(n+1)+prime(n+3))))
(Python)
from math import gcd
from sympy import nextprime
def aupton(terms):
alst, p, q, r, s = [], 2, 3, 5, 7
while len(alst) < terms:
alst.append((p+r)//gcd(p+r, q+s))
p, q, r, s = q, r, s, nextprime(s)
return alst
print(aupton(61)) # Michael S. Branicky, Oct 08 2021
CROSSREFS
Sequence in context: A273841 A112407 A154195 * A374772 A019858 A289032
KEYWORD
nonn,frac
AUTHOR
Colin Barker, Jan 09 2017
STATUS
approved