login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A335579
a(n) is the sum of all numbers that divide at least one of the composites between prime(n) and prime(n+1).
4
7, 12, 42, 28, 75, 39, 106, 214, 72, 289, 202, 96, 230, 429, 471, 168, 544, 362, 195, 631, 429, 749, 1125, 540, 216, 560, 280, 612, 2557, 679, 1195, 288, 2169, 372, 1391, 1378, 830, 1540, 1479, 546, 2750, 508, 1025, 468, 3835, 3900, 1245, 560, 1262, 1995, 744, 3576, 2328, 2195, 2345, 720, 2449
OFFSET
2,1
LINKS
EXAMPLE
For n=4, the composites between prime(4) and prime(5) are 8, 9, 10.
The numbers that divide at least one of these are {1,2,4,8} union {1,3,9} union {1,2,5,10} = {1,2,3,4,5,8,9,10}, and a(4) = 1+2+3+4+5+8+9+10 = 42.
MAPLE
f:= proc(n) local i, S;
S:= `union`(seq(numtheory:-divisors(i), i=ithprime(n)+1..ithprime(n+1)-1));
convert(S, `+`);
end proc:
map(f, [$2..100]);
MATHEMATICA
a[n_] := Divisors /@ Range[Prime[n]+1, Prime[n+1]-1] // Flatten // Union // Total;
Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Feb 05 2023 *)
PROG
(PARI) a(n) = my(s=[]); for (c=prime(n)+1, prime(n+1)-1, s = setunion(s, divisors(c))); vecsum(s); \\ Michel Marcus, Jan 27 2021
(Python)
from sympy import prime, divisors
def a(n): return sum(set(d for c in range(prime(n)+1, prime(n+1)) for d in divisors(c)))
print([a(n) for n in range(2, 59)]) # Michael S. Branicky, Jul 12 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Jan 26 2021
STATUS
approved