OFFSET
1,4
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Paul Pollack, Carl Pomerance and Enrique Treviño, Sets of monotonicity for Euler's totient function, preprint. See M2(n).
Paul Pollack, Carl Pomerance and Enrique Treviño, Sets of monotonicity for Euler's totient function, Ramanujan J. 30 (2013), no. 3, 379--398.
Terence Tao, Monotone non-decreasing sequences of the Euler totient function, arXiv:2309.02325 [math.NT], 2023.
FORMULA
Pollack et al. conjectured that a(n) < A365339(n)-2 for all n >= 31957.
PROG
(Python)
from bisect import bisect
from sympy import totient, isprime
def A365740(n):
plist = tuple(totient(i) for i in range(1, n+1) if not isprime(i))
m = len(plist)
qlist, c = [0]*(m+1), 0
for i in range(m):
qlist[a:=bisect(qlist, plist[i], lo=1, hi=c+1, key=lambda x:plist[x])]=i
c = max(c, a)
return c
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Sep 17 2023
STATUS
approved