login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A365398 Length of the longest subsequence of 1, ..., n on which sigma, the sum of the divisors of n (A000203), is nondecreasing. 12
1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23, 24, 24, 25, 25, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence was inspired by A365339. In particular, note remark (4.4) by Terence Tao in the linked paper.
LINKS
Terence Tao, Monotone non-decreasing sequences of the Euler totient function, arXiv:2309.02325 [math.NT], 2023.
FORMULA
a(n+1) - a(n) <= 1.
a(n) >= A000720(n)+1 since A000203(p) = p+1 for p prime. - Chai Wah Wu, Sep 08 2023
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
Cf. A061069.
Sequence in context: A047742 A302778 A203967 * A365399 A267530 A050292
KEYWORD
nonn
AUTHOR
Peter Luschny, Sep 08 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 24 04:12 EDT 2024. Contains 373661 sequences. (Running on oeis4.)