OFFSET
2,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 2..10001 (terms 2..1002 from Harry J. Smith)
FORMULA
a(n) = Max{sigma(c); p(n+1) > c > p(n)}, c is composite, p(n) is the n-th prime and sigma=A000203().
MATHEMATICA
Max[DivisorSigma[1, Range[#[[1]]+1, #[[2]]-1]]]&/@Partition[Prime[ Range[2, 60]], 2, 1] (* Harvey P. Dale, May 19 2017 *)
PROG
(PARI) { n=1; q=3; forprime (p=5, prime(1003), a=0; for (i=q + 1, p - 1, a=max(sigma(i), a)); q=p; write("b061141.txt", n++, " ", a) ) } \\ Harry J. Smith, Jul 18 2009
(Python)
from sympy import prime, divisor_sigma as sigma
def a(n): return max(sigma(c) for c in range(prime(n)+1, prime(n+1)))
print([a(n) for n in range(2, 57)]) # Michael S. Branicky, Jul 12 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 29 2001
EXTENSIONS
Offset changed by Michael S. Branicky, Jul 12 2021
STATUS
approved