cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-40 of 44 results. Next

A174518 Sums of two consecutive primes and composite numbers in-between.

Original entry on oeis.org

5, 12, 18, 45, 36, 75, 54, 105, 182, 90, 238, 195, 126, 225, 350, 392, 180, 448, 345, 216, 532, 405, 602, 837, 495, 306, 525, 324, 555, 1800, 645, 938, 414, 1584, 450, 1078, 1120, 825, 1190, 1232, 540, 2046, 576, 975, 594, 2665, 2821, 1125, 684, 1155, 1652
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_,x_]:=n*x+x*(x+1)/2;Table[Prime[n]+f[Prime[n],Prime[n+1]-Prime[n]-1]+Prime[n+1],{n,5!}]

Formula

a(n) = Sum_{k=prime(n)..prime(n+1)} k. - Wesley Ivan Hurt, Apr 27 2021

A373823 Half the sum of the n-th maximal run of first differences of odd primes.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 6, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 2, 7, 2, 3, 1, 5, 1, 6, 2, 6, 1, 5, 1, 2, 1, 12, 2, 1, 2, 3, 1, 5, 9, 1, 3, 2, 1, 5, 7, 2, 1, 2, 7, 3, 5, 1, 2, 3, 4, 6, 2, 3, 4, 2, 4, 5, 1, 5, 1, 3, 2, 3, 4, 2, 1, 2, 6, 4, 2, 4, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2024

Keywords

Comments

Halved run-sums of A001223.

Examples

			The odd primes are:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with first differences:
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, ...
with runs:
(2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), ...
with halved sums a(n).
		

Crossrefs

Halved run-sums of A001223.
For run-lengths we have A333254, run-lengths of run-lengths A373821.
Multiplying by two gives A373822.
A000040 lists the primes.
A027833 gives antirun lengths of odd primes (partial sums A029707).
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.

Programs

  • Mathematica
    Total/@Split[Differences[Select[Range[3,1000],PrimeQ]]]/2

A378618 Sum of nonsquarefree numbers between prime(n) and prime(n+1).

Original entry on oeis.org

0, 4, 0, 17, 12, 16, 18, 20, 104, 0, 68, 40, 0, 89, 199, 110, 60, 127, 68, 72, 151, 161, 172, 278, 297, 0, 104, 108, 112, 849, 128, 403, 0, 579, 150, 461, 322, 164, 680, 351, 180, 561, 192, 196, 198, 819, 648, 449, 228, 232, 470, 240, 1472, 508, 521, 532, 270
Offset: 1

Views

Author

Gus Wiseman, Dec 09 2024

Keywords

Examples

			The nonsquarefree numbers between prime(24) = 89 and prime(25) = 97 are {90, 92, 96}, so a(24) = 278.
		

Crossrefs

For prime instead of nonsquarefree we have A001043.
For composite instead of nonsquarefree we have A054265.
Zeros are A068361.
A000040 lists the primes, differences A001223, seconds A036263.
A070321 gives the greatest squarefree number up to n.
A071403 counts squarefree numbers up to prime(n), restriction of A013928.
A120327 gives the least nonsquarefree number >= n.
A378086 counts nonsquarefree numbers up to prime(n), restriction of A057627.
For squarefree numbers (A005117, differences A076259) between primes:
- length is A061398, zeros A068360
- min is A112926, differences A378037
- max is A112925, differences A378038
- sum is A373197
For nonsquarefree numbers (A013929, differences A078147) between primes:
- length is A061399
- min is A377783 (differences A377784), union A378040
- max is A378032 (differences A378034), restriction of A378033 (differences A378036)
- sum is A378618 (this)

Programs

  • Mathematica
    Table[Total[Select[Range[Prime[n],Prime[n+1]],!SquareFreeQ[#]&]],{n,100}]

A079725 Sum of composite numbers less than n-th prime.

Original entry on oeis.org

0, 0, 4, 10, 37, 49, 94, 112, 175, 305, 335, 505, 622, 664, 799, 1049, 1329, 1389, 1709, 1916, 1988, 2368, 2611, 3041, 3692, 3989, 4091, 4406, 4514, 4847, 6407, 6794, 7464, 7602, 8898, 9048, 9818, 10618, 11113, 11963, 12843, 13023, 14697, 14889, 15474
Offset: 1

Views

Author

N. J. A. Sloane, Feb 18 2003

Keywords

Examples

			Prime(6) = 13, so a(6) = 4 + 6 + 8 + 9 + 1 0 + 12 = 49 = 13*14/2 - 13 - 11 - 7 - 5 - 3 - 2 - 1.
		

Crossrefs

Equals A000217(Prime_n) - A007504(n) - 1 = A034953 - A007504 - A000012.
Partial sums of A054265.

Programs

  • Maple
    with(numtheory): A079725 := proc(n) local i:
    RETURN(ithprime(n)*(ithprime(n)+1)/2 add(ithprime(i),i=1..n)-1):
    end;
  • Mathematica
    a[n_] := Block[{p = Prime[n], k}, k = p(p + 1)/2 - 1 - Sum[Prime[i], {i, 1, n}]]; Table[ a[n], {n, 1, 45}]

Formula

a(n) = prime(n)*(prime(n)+1)/2 - sum_{1..n} prime(k) - 1.
Asymptotic expression: a(n) ~ n^2 * log(n)^2 / 2.

Extensions

Edited and extended by Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Robert G. Wilson v and T. D. Noe, Feb 18 2003

A109921 a(2n) = prime(n). a(2n+1) = sum of composite numbers between prime(n) and prime(n+1). We define a(1) = 1.

Original entry on oeis.org

1, 2, 0, 3, 4, 5, 6, 7, 27, 11, 12, 13, 45, 17, 18, 19, 63, 23, 130, 29, 30, 31, 170, 37, 117, 41, 42, 43, 135, 47, 250, 53, 280, 59, 60, 61, 320, 67, 207, 71, 72, 73, 380, 79, 243, 83, 430, 89, 651, 97, 297, 101, 102, 103, 315, 107, 108, 109, 333, 113, 1560, 127, 387, 131
Offset: 1

Views

Author

Amarnath Murthy, Jul 16 2005

Keywords

Comments

1 together with the sum of consecutive composites between primes interleaved with the primes. - Omar E. Pol, Oct 01 2012

Examples

			Contribution from _Omar E. Pol_, Oct 06 2012 (Start):
a(1) = 1, by definition. Also 1 is the first nonprime.
a(2) = 2, the first prime.
a(3) = 0, the sum of composite numbers between 2 and 3.
a(4) = 3, the second prime.
a(5) = 4, the sum of the composite numbers between 3 and 5.
a(6) = 5, the third prime.
a(7) = 6, the sum of the composite numbers between 5 and 7.
a(8) = 7, the fourth prime.
a(9) = 27, the sum of the composite numbers between 7 and 11, since 8+9+10 = 27.
a(10) = 11, the fifth prime.
(End)
		

Crossrefs

Programs

  • Mathematica
    Join[{1},With[{nn=40},Riffle[Prime[Range[nn]],Table[Total[Range[Prime[n]+1,Prime[n+1]-1]],{n,nn}]]]] (* Harvey P. Dale, Jul 16 2023 *)

Extensions

More terms from David Wasserman, Aug 15 2005

A174519 Sum of 3 consecutive primes and of all composite numbers in-between.

Original entry on oeis.org

14, 25, 56, 70, 98, 112, 140, 264, 243, 297, 396, 280, 308, 528, 689, 513, 567, 726, 490, 675, 858, 924, 1350, 1235, 700, 728, 742, 770, 2242, 2318, 1452, 1215, 1859, 1885, 1377, 2041, 1782, 1848, 2249, 1593, 2405, 2431, 1358, 1372, 3060, 5275, 3723, 1582
Offset: 1

Views

Author

Keywords

Comments

2+3+4+5=14, 3+4+5+6+7=25, 5+6+7+8+9+10+11=56, ..

Crossrefs

Programs

  • Mathematica
    f[n_,x_]:=n*x+x*(x+1)/2;Table[Prime[n]+f[Prime[n],Prime[n+2]-Prime[n]-1]+Prime[n+2],{n,5!}]
    sm[{a_,b_,c_}]:=(c-a+1) (a+c)/2; sm/@Partition[Prime[Range[50]],3,1] (* Harvey P. Dale, Mar 11 2012 *)

A211006 Pair (n,p) where n is the sum of adjacent nonprimes and p is the sum of adjacent primes.

Original entry on oeis.org

1, 5, 4, 5, 6, 7, 27, 11, 12, 13, 45, 17, 18, 19, 63, 23, 130, 29, 30, 31, 170, 37, 117, 41, 42, 43, 135, 47, 250, 53, 280, 59, 60, 61, 320, 67, 207, 71, 72, 73, 380, 79, 243, 83, 430, 89, 651, 97, 297, 101, 102, 103, 315, 107, 108, 109, 333, 113, 1560, 127, 387, 131
Offset: 1

Views

Author

Omar E. Pol, Aug 11 2012

Keywords

Examples

			-----------------------------------------
.     Array from
n      A000027                      a(n)
-----------------------------------------
1         1;                          1
2         2, 3;                       5
3         4;                          4
4         5;                          5
5         6;                          6
6         7;                          7
7         8, 9, 10;                  27
8        11;                         11
9        12;                         12
10       13;                         13
11       14, 15, 16;                 45
12       17;                         17
13       18;                         18
14       19;                         19
15       20, 21, 22;                 63
16       23;                         23
17       24, 25, 26, 27, 28;        130
		

Crossrefs

Partial sums give A211007.
A variant of A109921.

Formula

a(n) = A109921(n+2), n >= 3.

A376164 Maximum of the n-th maximal run of nonsquarefree numbers (increasing by 1 at a time).

Original entry on oeis.org

4, 9, 12, 16, 18, 20, 25, 28, 32, 36, 40, 45, 50, 52, 54, 56, 60, 64, 68, 72, 76, 81, 84, 88, 90, 92, 96, 100, 104, 108, 112, 117, 121, 126, 128, 132, 136, 140, 144, 148, 150, 153, 156, 160, 162, 164, 169, 172, 176, 180, 184, 189, 192, 196, 198, 200, 204, 208
Offset: 1

Views

Author

Gus Wiseman, Sep 15 2024

Keywords

Examples

			The maximal runs of nonsquarefree numbers begin:
       4
     8   9
      12
      16
      18
      20
    24  25
    27  28
      32
      36
      40
    44  45
  48  49  50
		

Crossrefs

For length instead of maximum we have A053797 (firsts A373199).
For lengths of anti-runs we have A373409 (firsts A373573).
For sum instead of maximum we have A373414, anti A373412.
For minimum instead of maximum we have A053806, anti A373410.
For anti-runs instead of runs we have A068781.
For squarefree instead of nonsquarefree we have A373415, anti A007674.
For nonprime instead of nonsquarefree we have A006093 with 2 removed.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147, sums A329472.
A061398 counts squarefree numbers between primes, nonsquarefree A061399.
A120992 gives squarefree run-lengths, anti A373127 (firsts A373128).
A373413 adds up each maximal run of squarefree numbers, min A072284.
A375707 counts squarefree numbers between consecutive nonsquarefree numbers.

Programs

  • Mathematica
    Max/@Split[Select[Range[100],!SquareFreeQ[#]&],#1+1==#2&]//Most

A060325 a(n) = n-th prime prime(n) subtracted from sum of all composites between prime(n) and prime(n-1).

Original entry on oeis.org

-3, -1, -1, 16, -1, 28, -1, 40, 101, -1, 133, 76, -1, 88, 197, 221, -1, 253, 136, -1, 301, 160, 341, 554, 196, -1, 208, -1, 220, 1433, 256, 533, -1, 1147, -1, 613, 637, 328, 677, 701, -1, 1483, -1, 388, -1, 2044, 2164, 448, -1, 460, 941, -1, 1963, 1013, 1037, 1061, -1, 1093, 556, -1, 2299, 3593, 616, -1, 628, 3881
Offset: 2

Views

Author

Jason Earls, Apr 10 2001

Keywords

Examples

			a(2) = 0 - 3 = -3. a(5) = (8+9+10) - 11 = 16.
		

Programs

  • Mathematica
    a[n_] := Total@Range[Prime[n - 1] + 1, Prime[n] - 1] - Prime[n]; Array[a,50,2] (* James Spahlinger, Feb 20 2016 *)

Formula

a(n) = A054265(n-1) - A065091(n-1). - James Spahlinger, Feb 20 2016

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Apr 20 2001

A162153 Differences between the sum of consecutive composites and the prime that precedes them.

Original entry on oeis.org

1, 1, 20, 1, 32, 1, 44, 107, 1, 139, 80, 1, 92, 203, 227, 1, 259, 140, 1, 307, 164, 347, 562, 200, 1, 212, 1, 224, 1447, 260, 539, 1, 1157, 1, 619, 643, 332, 683, 707, 1, 1493, 1, 392, 1, 2056, 2176, 452, 1, 464, 947, 1, 1973, 1019, 1043, 1067, 1, 1099, 560, 1, 2309
Offset: 1

Views

Author

Claudio Meller, Jun 26 2009

Keywords

Examples

			a(1) = 4-3 = 1;
a(2) = 6-5 = 1;
a(3) = (8+9+10)-7 = 20;
a(4) = 12-11 = 1;
a(5) = (14+15+16)-13 = 32;
a(6) = 18-17 = 1;
a(7) = (20+21+22)-19 = 44;
a(8) = (24+25+26+27+28)-23 = 107; etc.
		

Crossrefs

Cf. A000040, A054265, A155752 (n for which a(n)=1).

Programs

  • Maple
    Primes:= select(isprime,[2,seq(i,i=3..1000,2)]):
    seq((Primes[i+1]^2-Primes[i+1]-Primes[i]^2-3*Primes[i])/2, i=2..nops(Primes)-1); # Robert Israel, Jul 18 2018

Formula

a(n) = A054265(n+1) - A000040(n+1). - R. J. Mathar, Jun 27 2009
a(n) = (prime(n+2)^2 - prime(n+1)^2 - prime(n+2) - 3*prime(n+1))/2. - Robert Israel, Jul 19 2018

Extensions

Edited and corrected by Robert Israel, Jul 18 2018
Previous Showing 31-40 of 44 results. Next