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!)
A061141 Compute sum of divisors of the prime(n+1)-prime(n)-1 composite numbers between two consecutive primes; choose the largest. 3

%I #16 Jul 13 2021 03:08:05

%S 7,12,18,28,31,39,42,60,72,91,90,96,84,124,120,168,144,144,195,168,

%T 186,224,252,217,216,210,280,248,360,255,336,288,403,372,392,378,294,

%U 480,372,546,384,508,399,468,576,600,504,560,450,546,744,504,728,588,720

%N Compute sum of divisors of the prime(n+1)-prime(n)-1 composite numbers between two consecutive primes; choose the largest.

%H Michael S. Branicky, <a href="/A061141/b061141.txt">Table of n, a(n) for n = 2..10001</a> (terms 2..1002 from Harry J. Smith)

%F a(n) = Max{sigma(c); p(n+1) > c > p(n)}, c is composite, p(n) is the n-th prime and sigma=A000203().

%t Max[DivisorSigma[1,Range[#[[1]]+1,#[[2]]-1]]]&/@Partition[Prime[ Range[2,60]],2,1] (* _Harvey P. Dale_, May 19 2017 *)

%o (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

%o (Python)

%o from sympy import prime, divisor_sigma as sigma

%o def a(n): return max(sigma(c) for c in range(prime(n)+1, prime(n+1)))

%o print([a(n) for n in range(2, 57)]) # _Michael S. Branicky_, Jul 12 2021

%Y Cf. A000040, A000203, A061120, A335579.

%K nonn

%O 2,1

%A _Labos Elemer_, May 29 2001

%E Offset changed by _Michael S. Branicky_, Jul 12 2021

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 April 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)