|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|