A237589
Sum of first n odd noncomposite numbers.
Original entry on oeis.org
1, 4, 9, 16, 27, 40, 57, 76, 99, 128, 159, 196, 237, 280, 327, 380, 439, 500, 567, 638, 711, 790, 873, 962, 1059, 1160, 1263, 1370, 1479, 1592, 1719, 1850, 1987, 2126, 2275, 2426, 2583, 2746, 2913, 3086, 3265, 3446, 3637, 3830, 4027, 4226, 4437, 4660, 4887
Offset: 1
For n = 5 the first five odd noncomposite numbers are 1, 3, 5, 7, 11, so a(5) = 1 + 3 + 5 + 7 + 11 = 27.
-
a := proc(n) option remember; `if`(n=1, 1, a(n-1) + ithprime(n)) end:
seq(a(n), n=1..49); # Peter Luschny, Sep 20 2018
-
a[1]=1; a[n_]:=a[n]=a[n-1]+Prime[n]; Table[a[n], {n,1,49}] (* Robert P. P. McKone, Jan 18 2022 *)
-
terms(n) = my(s=1, i=0); forprime(p=3, , if(i >= n, break, print1(s, ", "); i++; s=s+p))
/* Print initial 50 terms as follows */
terms(50) \\ Felix Fröhlich, Sep 20 2018
A343809
Divide the positive integers into subsets of lengths given by successive primes, then reverse the order of terms in each subset.
Original entry on oeis.org
2, 1, 5, 4, 3, 10, 9, 8, 7, 6, 17, 16, 15, 14, 13, 12, 11, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59
Offset: 1
From _Omar E. Pol_, Apr 30 2021: (Start)
Written as an irregular triangle in which row lengths give A000040 the sequence begins:
2, 1;
5, 4, 3;
10, 9, 8, 7, 6;
17, 16, 15, 14, 13, 12, 11;
28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18;
41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29;
58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42;
77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59;
...
(End)
Cf.
A000027,
A000040,
A007504,
A014284,
A034956,
A038722,
A071148,
A073612 (fixed points),
A078423,
A082548,
A115030,
A237589,
A282329,
A343859,
A344891.
-
R:= NULL: t:= 1:
for i from 1 to 20 do
p:= ithprime(i);
R:= R, seq(i,i=t+p-1..t,-1);
t:= t+p;
od:
R; # Robert Israel, Apr 30 2021
-
With[{nn=10},Reverse/@TakeList[Range[Total[Prime[Range[nn]]]],Prime[Range[nn]]]]//Flatten (* Harvey P. Dale, Apr 27 2022 *)
A118482
Partial sums of Chen primes (starting with 1).
Original entry on oeis.org
1, 3, 6, 11, 18, 29, 42, 59, 78, 101, 130, 161, 198, 239, 286, 339, 398, 465, 536, 619, 708, 809, 916, 1025, 1138, 1265, 1396, 1533, 1672, 1821, 1978, 2145, 2324, 2505, 2696, 2893, 3092, 3303, 3530, 3763, 4002, 4253, 4510, 4773, 5042, 5323, 5616, 5923
Offset: 0
-
ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then RETURN('true') else RETURN('false') fi fi end: ts_partsum_chenprime:=proc(n) local i,ans,tren; ans:=1: tren:=1: for i from 1 to n do if (ischenprime(i)='true') then tren := tren+i: ans:=[op(ans), tren]: fi od; RETURN(ans) end: ts_partsum_chenprime(500);
-
Accumulate[Join[{1},Select[Prime[Range[70]],PrimeOmega[#+2]<3&]]] (* Harvey P. Dale, May 26 2014 *)
A158976
a(n) = sum of numbers k <= n such that not all proper divisors of k are divisors of n.
Original entry on oeis.org
0, 0, 0, 0, 4, 0, 10, 6, 18, 23, 37, 10, 49, 45, 54, 66, 94, 75, 112, 90, 123, 149, 175, 120, 199, 220, 241, 251, 305, 236, 335, 307, 358, 396, 409, 385, 505, 501, 534, 499, 622, 568, 664, 630, 632, 749, 799, 688, 847, 857, 937, 959, 1049, 985, 1078, 1039, 1205
Offset: 1
For n = 7 we have the following proper divisors for k <= n: {1}, {1}, {1}, {1, 2}, {1}, {1, 2, 3}, {1}. Only 4 and 6 have proper divisors that are not divisors of 7, viz. 2 and 2, 3. Hence a(7) = 4 + 6 = 10.
A159073
Sum of the k in the range 1
Original entry on oeis.org
0, 2, 5, 9, 10, 20, 17, 29, 26, 31, 28, 67, 41, 59, 65, 69, 58, 95, 77, 119, 107, 103, 100, 179, 125, 130, 136, 154, 129, 228, 160, 220, 202, 198, 220, 280, 197, 239, 245, 320, 238, 334, 281, 359, 402, 331, 328, 487, 377, 417, 388, 418, 381, 499, 461, 556, 447, 443, 440
Offset: 1
a(8) = 29 is the sum of the following six k: 2 {1}, 3 {1}, 4 {1, 2}, 5 {1}, 7 {1}, 8 {1, 2, 4} with subsets of the proper divisors {1, 2, 4} of n = 8. 2 + 3 + 4 + 5 + 7 + 8 = 29.
A179859
Numbers k that divide the sum of the first k noncomposites.
Original entry on oeis.org
1, 3, 7, 225, 487, 735, 50047, 142835, 170209, 249655, 316585343, 374788043, 2460457827, 2803329305, 6860334657, 65397031525, 78658228039
Offset: 1
The sum of the first 7 noncomposites is 42 = 6*7, so 7 is in the sequence.
-
lista(kmax) = {my(m = 1, s = 1); print1(1, ", "); forprime(k = 1, kmax, m++; s += k; if(!(s % m), print1(m, ", ")));} \\ Amiram Eldar, May 24 2024
A179860
Integer averages of first n noncomposites for some n.
Original entry on oeis.org
1, 2, 6, 636, 1592, 2574, 292656, 917042, 1108972, 1678508, 3334890730, 3981285760, 28567166356, 32739591796, 83332116034, 871263881618, 1055495274756
Offset: 1
Sum of first 7 noncomposites is 42; 42 / 7 = 6 is in the sequence.
A179861
a(n) is the sum of the first A179859(n) noncomposites.
Original entry on oeis.org
1, 6, 42, 143100, 775304, 1891890, 14646554832, 130985694070, 188757015148, 419047914740, 1055777525624570390, 1492138298614167680, 70288308055831268412, 91779857115464381780, 571686203669195590338, 56978071532766214007450, 83023388015844408083484
Offset: 1
A179859(3) = 7; sum of first 7 noncomposites is 42, so a(3) = 42.
A180302
Sequence of primes separated by [sequence of prime] elements. 2, [find 2nd prime after 2 = ] 5, [find 3rd prime after 5 =] 13, [find 5th prime after 13 =] 61, ..., etc.
Original entry on oeis.org
2, 5, 13, 31, 61, 109, 181, 277, 397, 547, 733, 947, 1213, 1499, 1831, 2207, 2633, 3083, 3583, 4133, 4751, 5407, 6073, 6793, 7589, 8513, 9397, 10313, 11353, 12409, 13451, 14713, 15889, 17299, 18593, 20129, 21613, 23167, 24851, 26561, 28387, 30203
Offset: 1
-
NestList[n = 0; (n++; NextPrime[ #, Prime@ n]) &, 2, 41] (* Robert G. Wilson v, Aug 25 2010 *)
Prime[Accumulate[Join[{1}, Prime[Range[45]]]]] (* Alonso del Arte, Oct 09 2012 *)
A023538
Convolution of natural numbers with (1, p(1), p(2), ... ), where p(k) is the k-th prime.
Original entry on oeis.org
1, 4, 10, 21, 39, 68, 110, 169, 247, 348, 478, 639, 837, 1076, 1358, 1687, 2069, 2510, 3012, 3581, 4221, 4934, 5726, 6601, 7565, 8626, 9788, 11053, 12425, 13906, 15500, 17221, 19073, 21062, 23190, 25467, 27895, 30480, 33228, 36143, 39231, 42498, 45946, 49585
Offset: 1
Comments