OFFSET
1,1
EXAMPLE
s t s/t denominator
p1 p2 p1-1 p2-1 (s/t)
2 3 1 2 1/2 2 = a(1)
3 5 2 4 1/2 2
5 7 4 6 2/3 3 = a(2)
7 11 6 10 3/5 5 = a(3)
11 13 10 12 5/6 6 = a(4)
13 17 12 16 3/4 4
17 19 16 18 8/9 9 = a(5)
19 23 18 22 9/11 11 = a(6)
23 29 22 28 11/14 14 = a(7)
29 31 28 30 14/15 15 = a(8)
31 37 30 36 5/6 6
37 41 36 40 9/10 10
41 43 40 42 20/21 21 = a(9)
43 47 42 46 21/23 23 = a(10)
PROG
(Python)
from itertools import islice
from math import gcd
from sympy import nextprime
def A390027_gen(): # generator of terms
c, p, q = 0, 2, 3
while True:
if (d:=(q-1)//gcd(p-1, q-1))>c:
yield d
c = d
p, q = q, nextprime(q)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Oct 22 2025
STATUS
approved
