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-4 of 4 results.

A162801 Bisection of A162800.

Original entry on oeis.org

0, 4, 9, 15, 21, 30, 39, 45, 56, 64, 72, 81, 93, 102, 108, 120, 134, 144, 154, 165, 176, 186, 195, 205, 225, 231, 240, 254, 266, 274, 282, 300, 312, 324, 342, 351, 363, 376, 386, 399, 414, 426, 436, 446, 459, 465, 483, 495, 506, 522, 544, 560, 570, 582, 596
Offset: 1

Views

Author

Omar E. Pol, Jul 16 2009

Keywords

Comments

Essentially the same as A058296.

Crossrefs

A162802 Bisection of A162800.

Original entry on oeis.org

2, 6, 12, 18, 26, 34, 42, 50, 60, 69, 76, 86, 99, 105, 111, 129, 138, 150, 160, 170, 180, 192, 198, 217, 228, 236, 246, 260, 270, 279, 288, 309, 315, 334, 348, 356, 370, 381, 393, 405, 420, 432, 441, 453, 462, 473, 489, 501, 515, 532, 552, 566, 574, 590, 600
Offset: 1

Views

Author

Omar E. Pol, Jul 16 2009

Keywords

Comments

Also, 2 together with the numbers A079424.

Crossrefs

A162345 Length of n-th edge in the graph of the zig-zag function for prime numbers.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 04 2009

Keywords

Comments

Also, first differences of A162800.
Also {2, 2, } together with the numbers A052288.
Note that the graph of the zig-zag function for prime numbers is similar to the graph of the mountain path function for prime numbers but with exactly a vertex between consecutive odd noncomposite numbers (A006005).
This is the same as A115061 if n>1 (and also essentially equal to A052288). Proof: Because this is the first differences of A162800, which is {0,2} together with A024675, this sequence (for n>=3) is given by a(n) = (prime(n+1) - prime(n-1))/2. Similarly, because half the numbers between prime(n-1) and prime(n+1) are closer to prime(n) than any other prime, A115061(n) = (prime(n+1) - prime(n-1))/2 for n>=3 as well. - Nathaniel Johnston, Jun 25 2011

Examples

			Array begins:
=====
x, y
=====
2, 2;
2, 3;
3, 3;
3, 3;
5, 4;
		

Crossrefs

Programs

  • Magma
    [2,2] cat[(NthPrime(n+1)-NthPrime(n-1))/2: n in [3..80]]; // Vincenzo Librandi, Dec 19 2016
  • Maple
    A162345 := proc(n) if(n<=2)then return 2: fi: return (ithprime(n+1) - ithprime(n-1))/2: end: seq(A162345(n),n=1..100); # Nathaniel Johnston, Jun 25 2011
  • Mathematica
    Join[{2, 2}, Table[(Prime[n+1] - Prime[n-1])/2, {n, 3, 100}]] (* Vincenzo Librandi, Dec 19 2016 *)

Formula

a(n) = (prime(n+1) - prime(n-1))/2 for n>=3. - Nathaniel Johnston, Jun 25 2011

Extensions

Edited by Omar E. Pol, Jul 16 2009

A162735 An alternating sum of all numbers from prime(n) to prime(n+1).

Original entry on oeis.org

1, 4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 13 2009

Keywords

Comments

Without the initial term, identical to A024675, cf. formula. Except for the initial terms, also the same as A162800. - M. F. Hasler, Jun 01 2013

Examples

			a(1) = 1 = -2+3. a(2) = 4=3-4+5. a(3) = 6 =5-6+7. a(4) = 9 = 7-8+9-10+11.
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, Most[#] + Differences[#]/2] & [Prime[Range[2, 100]]] (* Paolo Xausa, Jun 17 2024 *)

Formula

a(n) = sum_{j= A000040(n).. A000040(n+1)} (-1)^(j+1)*j = A001057(A000040(n+1))-A001057(A000040(n)-1).
{1} U A024675.

Extensions

Edited by R. J. Mathar, Sep 23 2009
Showing 1-4 of 4 results.