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.

Showing 1-6 of 6 results.

A085038 Erroneous version of A063934.

Original entry on oeis.org

3, 4, 5, 6, 7, 10, 13, 12, 11, 14, 17, 18, 19
Offset: 1

Views

Author

Keywords

A063932 Average of largest prime less than or equal to n and smallest prime greater than or equal to n.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 9, 9, 11, 12, 13, 15, 15, 15, 17, 18, 19, 21, 21, 21, 23, 26, 26, 26, 26, 26, 29, 30, 31, 34, 34, 34, 34, 34, 37, 39, 39, 39, 41, 42, 43, 45, 45, 45, 47, 50, 50, 50, 50, 50, 53, 56, 56, 56, 56, 56, 59, 60, 61, 64, 64, 64, 64, 64, 67, 69, 69, 69, 71, 72, 73
Offset: 2

Views

Author

Henry Bottomley, Aug 21 2001

Keywords

Examples

			a(7) = (7 + 7)/2 = 7;
a(8) = (7 + 11)/2 = 9.
		

Crossrefs

Interleaving of A000040 and A001223-1 copies of A024675. Cf. A063934.

Programs

  • Mathematica
    Table[Mean[{NextPrime[n-1],NextPrime[n+1,-1]}],{n,2,80}] (* Harvey P. Dale, Nov 22 2011 *)
  • PARI
    { for (n=2, 1000, write("b063932.txt", n, " ", (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 02 2009

Formula

a(n) = (A007917(n) + A007918(n))/2 = n - A063933(n).

A063933 Difference between n and the average of largest prime less than or equal to n and smallest prime greater than or equal to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, -2, -1, 0, 1, 2, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, -3, -2, -1, 0, 1, 2, 3, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0
Offset: 2

Views

Author

Henry Bottomley, Aug 21 2001

Keywords

Examples

			a(10) = 10 - (11 - 7)/2 = 1; a(11) = 11 - (11 + 11)/2 = 0.
		

Programs

  • PARI
    { for (n=2, 1000, write("b063933.txt", n, " ", n - (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 03 2009

Formula

a(n) = n - (A007917(n) + A007918(n))/2 = n - A063932(n).
a(n) = 0 for numbers in A063934 (i.e., in A000040 or A024675).

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

A144043 a(2n-1) = 2*prime(n), a(2n) = prime(n) + prime(n+1).

Original entry on oeis.org

4, 5, 6, 8, 10, 12, 14, 18, 22, 24, 26, 30, 34, 36, 38, 42, 46, 52, 58, 60, 62, 68, 74, 78, 82, 84, 86, 90, 94, 100, 106, 112, 118, 120, 122, 128, 134, 138, 142, 144, 146, 152, 158, 162, 166, 172, 178, 186, 194, 198, 202, 204
Offset: 1

Views

Author

Raul Rato (rtrato(AT)yahoo.com), Sep 08 2008

Keywords

Comments

Previous name was "Sum of the middle pair in the n-term sequence 2, 3, 5, ..., prime(n)." - Jon E. Schoenfield, Oct 12 2015
The bisections are the doubled primes (A100484) and the sums of adjacent primes (A001043). - R. J. Mathar, Sep 11 2011

Examples

			4 = sumtwice(2); 5 = sum(2,3); 6 = 2, sumtwice(3), 5, 7; 8 = 2, sum(3,5), 7, 11;
		

Programs

  • MATLAB
    clc clear all aP= [primes(1000)]; qN= numel(aP); kL=[]; %init empty result for nn= 1:qN %Loop to sum the central pairs auxT= ceil((nn+1)/2); auxL= ceil(nn/2); kL= [kL; aP(auxL)+aP(auxT)]; end kL %kL is the result
  • Maple
    A144043 := proc(n) ithprime(ceil((n+1)/2))+ithprime(ceil(n/2)) ; end proc: # R. J. Mathar, Sep 11 2011
  • Mathematica
    With[{p=Prime[Range[50]]},Riffle[2p,ListConvolve[{1,1},p]]] (* Paolo Xausa, Nov 02 2023 *)

Formula

a(2n-1) = 2 prime(n), a(2n) = prime(n) + prime(n+1), n = 1,2,... - Zak Seidov, Jan 15 2014
a(n) = 2*A063934(n-1) for n>2. - Michel Marcus, Oct 13 2015

Extensions

Removed initial terms that regarded 1 as a prime. - R. J. Mathar, Sep 11 2011
Comments edited by Zak Seidov, Jan 15 2014
Name changed (based on formula from Zak Seidov) by Jon E. Schoenfield, Oct 12 2015

A076639 Numbers that are neither primes nor interprimes.

Original entry on oeis.org

1, 8, 10, 14, 16, 20, 22, 24, 25, 27, 28, 32, 33, 35, 36, 38, 40, 44, 46, 48, 49, 51, 52, 54, 55, 57, 58, 62, 63, 65, 66, 68, 70, 74, 75, 77, 78, 80, 82, 84, 85, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100, 104, 106, 110, 112, 114, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Roger L. Bagula, Oct 23 2002

Keywords

Comments

The complement of A063934. - Bill McEachen, Oct 30 2020

Crossrefs

Showing 1-6 of 6 results.