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 11 results. Next

A162203 The mountain path of the primes (see comment lines for definition).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 27 2009

Keywords

Comments

On the infinite square grid we draw an infinite straight line from the point (1,0) in direction (2,1).
We start at stage 1 from the point (0,0) drawing an edge ((0,0),(2,0)) in a horizontal direction.
At stage 2 we draw an edge ((2,0),(2,2)) in a vertical direction. We can see that the straight line intercepts at the number 3 (the first odd prime).
At stage 3 we draw an edge ((2,2),(4,2)) in a horizontal direction. We can see that the straight line intercepts at the number 5 (the second odd prime).
And so on (see illustrations).
The absolute value of a(n) is equal to the length of the n-th edge of a path, or infinite square polyedge, such that the mentioned straight line intercepts, on the path, at the number 1 and the odd primes. In other words, the straight line intercepts the odd noncomposite numbers (A006005).
The position of the x-th odd noncomposite number A006005(x) is represented by the point P(x,x-1).
So the position of the first prime number is represented by the point P(2,0) and position of the x-th prime A000040(x), for x>1, is represented by the point P(x,x-1); for example, 31, the 11th prime, is represented by the point P(11,10).
See also A162200, A162201 and A162202 for more information.

Examples

			Array begins:
=====
X..Y
=====
2, 2;
2, 3;
1,-1;
1, 3;
1,-1;
1, 3;
1,-3;
1, 4;
1,-2;
1, 5;
		

Crossrefs

Programs

  • PARI
    \\ (After Nathaniel Johnston_'s formula):
    A052288(n) = ((prime(n+3) - prime(n+1))/2);
    A162203(n) = if(n<=3, 2, if(n%2, 1, 1+((-1)^(n/2)*(A052288(n/2)-1)))); \\ Antti Karttunen, Mar 02 2023

Formula

From Nathaniel Johnston, May 10 2011: (Start)
a(2n+1) = 1 for n >= 2.
a(2n) = (-1)^n*(A162341(n+2) - 1) = (-1)^n*(A052288(n) - 1) + 1 for n >= 2. (End)

Extensions

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

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

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

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

A162351 Values x of pairs (x,y) that generate the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18
Offset: 0

Views

Author

Omar E. Pol, Jul 03 2009

Keywords

Comments

See A162350 is the main entry for this sequence.

Crossrefs

Showing 1-10 of 11 results. Next