

A086493


Group the natural numbers such that the nth 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 first term of every group.


4



1, 4, 6, 10, 12, 22, 31, 38, 39, 54, 63, 93, 130, 158, 187, 190, 235, 238, 251, 286, 354, 377, 414, 417, 474, 497, 514, 517, 554, 646, 711, 814, 890, 892, 916, 1022, 1093, 1106, 1177, 1329, 1440, 1604, 1655, 1784, 1884, 2057, 2123, 2309, 2375, 2393, 2417, 2477
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



MATHEMATICA

k = 0; Table[p = Prime[n]; k++; first = k; sm = 0; While[sm = sm + k; Mod[sm, p] > 0, k++]; first, {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 = start = next(naturals)
while s%p: s += next(naturals)
alst.append(start)
return alst


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS

More terms from Ray Chandler and Gabriel Cunningham (gcasey(AT)mit.edu), Sep 16 2003


STATUS

approved



