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-10 of 12 results. Next

A162200 Number on the positive y axis of the n-th horizontal component in the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

0, 0, 2, 2, 5, 4, 7, 6, 9, 6, 10, 8, 13, 12, 15, 12, 18, 16, 20, 17, 20, 18, 23, 20, 27, 23, 26, 25, 28, 27, 36, 29, 34, 32, 38, 34, 38, 34, 39, 36, 42, 40, 46, 42, 45, 44, 51, 41, 49, 48, 51, 48, 52, 48, 56, 52, 58, 56, 60, 57, 60, 56, 68, 61, 64, 63, 72, 64, 72, 68, 71, 68, 75
Offset: 1

Views

Author

Omar E. Pol, Jun 28 2009

Keywords

Comments

Note that the n-th horizontal component is an edge with length equal to 1 (see the link: Graph of the mountain path function).
See A162201 for the first differences.

Crossrefs

Programs

Extensions

Edited by Omar E. Pol, Jul 02 2009
More terms from R. J. Mathar, Jul 15 2009

A162201 First differences of A162200.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 28 2009

Keywords

Comments

The absolute value of a(n) is also the length of the n-th vertical edge in the graph of the "mountain path" function for prime numbers.
See A162200 for the length of the n-th horizontal component.

Crossrefs

Programs

Formula

From R. J. Mathar, Jul 15 2009: (Start)
a(n) = A052288(n-1) if n >= 2, n even.
a(n) = 2 - A052288(n-1) if n >= 3, n odd. (End)

Extensions

Edited by Omar E. Pol, Jul 02 2009
More terms from R. J. Mathar, Jul 15 2009

A162202 Number of the n-th vertex in the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

0, 2, 4, 6, 9, 10, 11, 12, 15, 16, 17, 18, 21, 22, 25, 26, 30, 31, 33, 34, 39, 40, 41, 42, 45, 46, 49, 50, 56, 57, 59, 60, 64, 65, 68, 69, 72, 73, 75, 76, 81, 82, 85, 86, 93, 94, 98, 99, 102, 103, 104, 105, 108, 109, 110, 111, 120, 121, 128, 129, 134, 135
Offset: 0

Views

Author

Omar E. Pol, Jun 28 2009

Keywords

Comments

This sequence is formed by a zero together with the partial sums of the absolute values of A162203.

Crossrefs

Extensions

Edited by Omar E. Pol, Jul 02 2009
More terms from Nathaniel Johnston, May 10 2011

A162340 Number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton whose virtual skeleton is a polyedge as the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

1, 2, 5, 6, 10, 12, 16, 18, 22, 26, 31, 34, 40, 42, 46, 50, 57, 60, 65, 69, 73, 76, 82, 86, 94, 99, 103, 105, 109, 111, 121, 129, 135, 138, 145, 150, 155, 160, 166, 170, 177, 180, 187, 192, 196, 198, 206, 217, 226, 228, 232, 236, 241, 246, 255, 260, 267, 270, 275, 279
Offset: 0

Views

Author

Omar E. Pol, Jul 01 2009

Keywords

Comments

a(n) is also the number of grid points that are covered after n-th stage by the same polyedge mentioned in the definition of this sequence.
Also, partial sums of A162341.

Crossrefs

Extensions

Edited by Omar E. Pol, Jul 05 2009
More terms from Nathaniel Johnston, Nov 06 2010

A162341 a(n) = number of grid points P(x,y) that are covered by a polyedge as the graph of the "mountain path" function for prime numbers, where x=n and y=0..oo.

Original entry on oeis.org

1, 1, 3, 1, 4, 2, 4, 2, 4, 4, 5, 3, 6, 2, 4, 4, 7, 3, 5, 4, 4, 3, 6, 4, 8, 5, 4, 2, 4, 2, 10, 8, 6, 3, 7, 5, 5, 5, 6, 4, 7, 3, 7, 5, 4, 2, 8, 11, 9, 2, 4, 4, 5, 5, 9, 5, 7, 3, 5, 4, 4, 5, 13, 8, 4, 2, 10, 9, 9, 5, 4, 4, 8, 6, 7, 4, 6, 6, 7, 5, 10, 5, 7, 5, 5, 4, 6, 6, 7, 2, 4, 7, 11, 5, 7, 5, 6, 8, 8, 9, 13, 7, 9
Offset: 0

Views

Author

Omar E. Pol, Jul 01 2009

Keywords

Comments

Se also A162340.

Crossrefs

Formula

a(n) = A052288(n-2) + (-1)^n for n>=3. [From Nathaniel Johnston, Nov 06 2010]

Extensions

Edited by Omar E. Pol, Jul 05 2009
More terms from Nathaniel Johnston, Nov 06 2010

A162342 Partial sums of A162200.

Original entry on oeis.org

0, 0, 2, 4, 9, 13, 20, 26, 35, 41, 51, 59, 72, 84, 99, 111, 129, 145, 165, 182, 202, 220, 243, 263, 290, 313, 339, 364, 392, 419, 455, 484, 518, 550, 588, 622, 660, 694, 733, 769, 811, 851, 897, 939, 984, 1028, 1079, 1120, 1169, 1217, 1268, 1316, 1368, 1416
Offset: 0

Views

Author

Omar E. Pol, Jul 01 2009

Keywords

Crossrefs

Extensions

More terms from Nathaniel Johnston, May 10 2011

A162343 Array read by rows in which row n lists the numbers that are in the same "y" level in the mountain path of the primes.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 9, 10, 13, 14, 17, 18, 25, 26, 15, 16, 19, 24, 27, 20, 23, 28, 33, 34, 21, 22, 29, 32, 35, 30, 31, 36, 37, 38, 41, 42, 49, 50, 39, 40, 43, 48, 51, 44, 47, 52, 45, 46, 53, 54, 59, 60, 55, 58, 61, 68, 69, 56, 57, 62, 67, 70, 75, 76, 63, 66, 71, 74
Offset: 0

Views

Author

Omar E. Pol, Jul 24 2009

Keywords

Comments

See the illustration "The mountain path of the primes", here.

Examples

			Array begins:
0, 1, 2,. . . . . . . . . . . . . . . . . .
. . . 3,. . . . . . . . . . . . . . . . . .
. . . 4, 5, 6,. . . . . . . . . . . . . . .
. . . . . . 7,. . . . . . . . . . . . . . .
. . . . . . 8,11,12,. . . . . . . . . . . .
. . . . . . 9,10,13,. . . . . . . . . . . .
. . . . . . . . .14,17,18,25,26,. . . . . .
. . . . . . . . .15,16,19,24,27,. . . . . .
. . . . . . . . . . . .20,23,28,33,34,. . .
. . . . . . . . . . . .21,22,29,32,35,. . .
. . . . . . . . . . . . . . ,30,31,36,. . .
. . . . . . . . . . . . . . . . . .37,. . .
		

Crossrefs

A162344 Array read by rows in which row n lists the numbers that are in the same "x" level in the mountain path of the primes.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15, 17, 16, 18, 19, 20, 21, 25, 24, 23, 22, 26, 27, 28, 29, 30, 33, 32, 31, 34, 35, 36, 37, 38, 39, 41, 40, 42, 43, 44, 45, 49, 48, 47, 46, 50, 51, 52, 53, 54, 55, 56, 59, 58, 57, 60, 61, 62, 63, 64, 68, 67, 66, 65, 69, 70, 71, 72
Offset: 0

Views

Author

Omar E. Pol, Jul 24 2009

Keywords

Comments

See the illustration "The mountain path of the primes", here.

Examples

			Array begins:
0, 1, 2,. . . . . . . . . . . . . . . . . .
. . . 3,. . . . . . . . . . . . . . . . . .
. . . 4, 5, 6,. . . . . . . . . . . . . . .
. . . . . . 7,. . . . . . . . . . . . . . .
. . . . . . 8,11,12,. . . . . . . . . . . .
. . . . . . 9,10,13,. . . . . . . . . . . .
. . . . . . . . .14,17,18,25,26,. . . . . .
. . . . . . . . .15,16,19,24,27,. . . . . .
. . . . . . . . . . . .20,23,28,33,34,. . .
. . . . . . . . . . . .21,22,29,32,35,. . .
. . . . . . . . . . . . . . ,30,31,36,. . .
. . . . . . . . . . . . . . . . . .37,. . .
		

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

A162350 The path of the primes: Pairs (x,y) such that the points P(x,y) represent the position of the nonnegative integers in the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 03 2009

Keywords

Examples

			n ..... Point
0 ..... P(0,0)
1 ..... P(1,0)
2 ..... P(2,0)
3 ..... P(2,1)
4 ..... P(2,2)
5 ..... P(3,2)
6 ..... P(4,2)
7 ..... P(4,3)
8 ..... P(4,4)
9 ..... P(4,5)
10 .... P(5,5)
11 .... P(5,4)
		

Crossrefs

Showing 1-10 of 12 results. Next