OFFSET
1,2
COMMENTS
The sequence was inspired by A365339. In particular, note remark (4.4) by Terence Tao in the linked paper.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Plot2, A365398 vs A365339.
Terence Tao, Monotone non-decreasing sequences of the Euler totient function, arXiv:2309.02325 [math.NT], 2023.
FORMULA
a(n+1) - a(n) <= 1.
PROG
(Python)
from bisect import bisect
from sympy import divisor_sigma
def A365398(n):
plist, qlist, c = tuple(divisor_sigma(i) for i in range(1, n+1)), [0]*(n+1), 0
for i in range(n):
qlist[a:=bisect(qlist, plist[i], lo=1, hi=c+1, key=lambda x:plist[x])]=i
c = max(c, a)
return c # Chai Wah Wu, Sep 08 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Sep 08 2023
STATUS
approved