login
A086493
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 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
OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Zak Seidov)
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
print(aupton(52)) # Michael S. Branicky, Jun 09 2021
CROSSREFS
Sequence in context: A310581 A310582 A177929 * A234965 A320881 A224796
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 28 2003
EXTENSIONS
More terms from Ray Chandler and Gabriel Cunningham (gcasey(AT)mit.edu), Sep 16 2003
STATUS
approved