login
A086491
Group the natural numbers such that the n-th group sum is divisible by prime(n): (1, 2, 3), (4, 5), (6, 7, 8, 9), (10, 11), (12, 13, 14, 15, 16, 17, 18, 19, 20, 21), ... Sequence contains the sum of the terms in the n-th group.
3
6, 9, 30, 21, 165, 234, 238, 38, 690, 522, 2325, 4107, 4018, 4988, 564, 9540, 708, 3172, 9380, 21726, 8395, 14615, 1245, 25365, 11155, 8585, 1545, 19795, 55154, 44070, 78486, 64714, 1781, 21684, 102661, 75047, 14287, 81011, 190380, 153624, 249526, 83079
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Zak Seidov)
EXAMPLE
a(4) = 10+11 = 21 is divisible by 7 = prime(4).
MATHEMATICA
k = 0; Table[p = Prime[n]; k++; sm = 0; While[sm = sm + k; Mod[sm, p] > 0, k++]; sm, {n, 50}] (* T. D. Noe, Mar 19 2014 *)
PROG
(Python)
from itertools import count
from sympy import prime, primerange
def aupton(terms):
alst, naturals = [], count(1)
for p in primerange(1, prime(terms)+1):
s = next(naturals)
while s%p: s += next(naturals)
alst.append(s)
return alst
print(aupton(42)) # Michael S. Branicky, Jun 09 2021
CROSSREFS
Sequence in context: A025493 A368716 A091519 * A178597 A179908 A180325
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 28 2003
EXTENSIONS
More terms from Ray Chandler, Sep 16 2003
STATUS
approved