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

A256253 Number of successive odd nonprimes A014076 and number of successive odd primes A065091, interleaved.

Original entry on oeis.org

1, 3, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 2, 1, 1, 6, 1, 1, 1, 2, 2, 4, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 2, 1, 2, 5, 1, 5, 1, 1, 2, 1, 1, 2, 2, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 4, 1, 6, 1, 1, 2, 1, 1, 6, 1, 2, 1, 4, 2, 1, 1, 2, 1, 3, 1, 2, 1, 2
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

See also A256252 and A256262 which contain similar diagrams.

Examples

			Consider an irregular array in which the odd-indexed rows list successive odd nonprimes (A014076) and the even-indexed rows list successive odd primes (A065091), in the sequence of odd numbers (A005408), as shown below:
1;
3, 5, 7;
9;
11, 13;
15;
17; 19;
21,
23;
25, 27;
39, 31;
...
a(n) is the length of the n-th row.
.
Illustration of the first 16 regions of the diagram of the symmetric representation of odd nonprimes (A014076) and of odd primes (A065091):
.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |   31
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _  | |   29
.           | | |_ _ _ _ _ _ _ _ _ _ _  | | |   23
.           | | | |_ _ _ _ _ _ _ _ _  | | | |   19
.           | | | |_ _ _ _ _ _ _ _  | | | | |   17
.           | | | | |_ _ _ _ _ _  | | | | | |   13
.           | | | | |_ _ _ _ _  | | | | | | |   11
.           | | | | | |_ _ _  | | | | | | | |    7
.           | | | | | |_ _  | | | | | | | | |    5
.   A014076 | | | | | |_  | | | | | | | | | |    3
.      1    | | | | | |_|_|_|_| | | | | | | | A065091
.      9    | | | | |_ _ _ _ _|_|_| | | | | |
.     15    | | | |_ _ _ _ _ _ _ _|_|_| | | |
.     21    | | |_ _ _ _ _ _ _ _ _ _ _|_| | |
.     25    | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
.     27    |_ _ _ _ _ _ _ _ _ _ _ _ _ _|_|_|
.
a(n) is also the length of the n-th boundary segment in the zig-zag path of the above diagram, between the two types of numbers, as shown below for n = 1..10:
.
.                       |_ _ _
.                             |_ _
.                                 |_ _
.                                     |_
.                                       |
.                                       |_ _
.
The sequence begins:    1,3,1,2,1,2,1,1,2,2,...
.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(nb = 1, isp = 0); forstep (n=3, nn, 2, if (bitxor(isp, ! isprime(n)), nb++, print1(nb, ", "); nb = 1; isp = ! isp););} \\ Michel Marcus, May 25 2015

Formula

a(n) = A256252(n-1), n >= 3.

A256252 Number of successive odd noncomposite numbers A006005 and number of successive odd composite numbers A071904, interleaved.

Original entry on oeis.org

4, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 2, 1, 1, 6, 1, 1, 1, 2, 2, 4, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 2, 1, 2, 5, 1, 5, 1, 1, 2, 1, 1, 2, 2, 4, 1, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 4, 1, 6, 1, 1, 2, 1, 1, 6, 1, 2, 1, 4, 2, 1, 1, 2, 1, 3, 1, 2, 1, 2
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

See also A256253 and A256262 which contain similar diagrams.

Examples

			Consider an irregular array in which the odd-indexed rows list successive odd noncomposite numbers (A006005) and the even-indexed rows list successive odd composite numbers (A071904), in the sequence of odd numbers (A005408), as shown below:
1, 3, 5, 7;
9;
11, 13;
15;
17; 19;
21,
23;
25, 27;
39, 31;
...
a(n) is the length of the n-th row.
.
Illustration of the first 16 regions of the diagram of the symmetric representation of odd noncomposite numbers A006005 and odd composite numbers A071904:
.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |   31
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _  | |   29
.           | | |_ _ _ _ _ _ _ _ _ _ _  | | |   23
.           | | | |_ _ _ _ _ _ _ _ _  | | | |   19
.           | | | |_ _ _ _ _ _ _ _  | | | | |   17
.           | | | | |_ _ _ _ _ _  | | | | | |   13
.           | | | | |_ _ _ _ _  | | | | | | |   11
.           | | | | | |_ _ _  | | | | | | | |    7
.           | | | | | |_ _  | | | | | | | | |    5
.           | | | | | |_  | | | | | | | | | |    3
.   A071904 | | | | | |_|_|_|_| | | | | | | |    1
.      9    | | | | |_ _ _ _ _|_|_| | | | | | A006005
.     15    | | | |_ _ _ _ _ _ _ _|_|_| | | |
.     21    | | |_ _ _ _ _ _ _ _ _ _ _|_| | |
.     25    | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
.     27    |_ _ _ _ _ _ _ _ _ _ _ _ _ _|_|_|
.
a(n) is also the length of the n-th boundary segment in the zig-zag path of the above diagram, between the two types of numbers, as shown below for n = 1..9:
.                      _ _ _ _
.                             |_ _
.                                 |_ _
.                                     |_
.                                       |
.                                       |_ _
.
The sequence begins:      4,1,2,1,2,1,1,2,2,...
.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(nb = 1, isc = 0); forstep (n=3, nn, 2, if (bitxor(isc, isprime(n)), nb++, print1(nb, ", "); nb = 1; isc = ! isc););} \\ Michel Marcus, May 25 2015

Formula

a(n) = A256253(n+1), n >= 2.

A258972 Number of other odd numbers between the twin primes, with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 4, 4, 7, 4, 13, 1, 13, 4, 13, 4, 1, 13, 4, 13, 4, 13, 16, 34, 4, 13, 28, 22, 13, 7, 10, 7, 73, 4, 1, 13, 10, 67, 4, 7, 4, 13, 28, 37, 22, 4, 4, 7, 52, 10, 13, 1, 58, 4, 22, 13, 10, 31, 40, 1, 25, 7, 22, 13, 25, 1, 10, 7, 4, 46, 13, 19, 13, 19, 82, 19, 31, 13, 10, 7, 28, 4, 82, 13, 58, 22, 40, 1, 19, 13, 13, 4, 7, 34, 1
Offset: 1

Views

Author

Omar E. Pol, Jun 15 2015

Keywords

Comments

Bisection of A256262.

Examples

			--------------------------------------------
.         Other            Twin
.      odd numbers        primes
n        A255763         A001097       a(n)
--------------------------------------------
1           1            3, 5, 7        1
2           9             11, 13        1
3          15             17, 19        1
4    21, 23, 25, 27       29, 31        4
5    33, 35, 37, 39       41, 43        4
...
For n = 5, between the successive pairs of twin primes [29, 31] and [41, 43] there are four odd numbers that are not twin primes: 33, 35, 37, 39, so a(5) = 4.
		

Crossrefs

Formula

a(n) = abs((A001359(n+1) - A001359(n))/2 - 2).
a(n) = abs((A006512(n+1) - A006512(n))/2 - 2).
Showing 1-3 of 3 results.