login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256262 Number of successive odd numbers that are not twin primes and number of successive twin primes, interleaved. 3
1, 3, 1, 2, 1, 2, 4, 2, 4, 2, 7, 2, 4, 2, 13, 2, 1, 2, 13, 2, 4, 2, 13, 2, 4, 2, 1, 2, 13, 2, 4, 2, 13, 2, 4, 2, 13, 2, 16, 2, 34, 2, 4, 2, 13, 2, 28, 2, 22, 2, 13, 2, 7, 2, 10, 2, 7, 2, 73, 2, 4, 2, 1, 2, 13, 2, 10, 2, 67, 2, 4, 2, 7, 2, 4, 2, 13, 2, 28, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

See also both A256252 and A256253 which contain similar diagrams.

LINKS

Table of n, a(n) for n=1..80.

EXAMPLE

Consider an irregular array in which the odd-indexed rows list successive odd numbers that are not twin primes (A255763) and the even-indexed rows list successive twin primes (A001097), 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 numbers that are not twin primes (A255763) and of twin primes (A001097).

.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |   31

.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _  | |   29

.           | | | | |_ _ _ _ _ _ _ _ _  | | |   19

.           | | | | |_ _ _ _ _ _ _ _  | | | |   17

.           | | | | | |_ _ _ _ _ _  | | | | |   13

.           | | | | | |_ _ _ _ _  | | | | | |   11

.           | | | | | | |_ _ _  | | | | | | |    7

.           | | | | | | |_ _  | | | | | | | |    5

.   A255763 | | | | | | |_  | | | | | | | | |    3

.      1    | | | | | | |_|_|_|_| | | | | | | A001097

.      9    | | | | | |_ _ _ _ _|_|_| | | | |

.     15    | | | | |_ _ _ _ _ _ _ _|_|_| | |

.     21    | | | |_ _ _ _ _ _ _ _ _ _ _| | |

.     23    | | |_ _ _ _ _ _ _ _ _ _ _ _| | |

.     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..8:

.

.                         |_ _ _

.                               |_ _

.                                   |_ _

.                                       |

.                                       |

.                                       |

.                                       |_ _

.

The sequence begins:      1,3,1,2,1,2,4,2,...

.

PROG

(PARI) istwin(n) = isprime(n) && (isprime(n-2) || isprime(n+2));

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

CROSSREFS

Cf. A005408, A001097, A256252, A256253, A255763.

Sequence in context: A082882 A188902 A324081 * A332929 A157520 A325116

Adjacent sequences:  A256259 A256260 A256261 * A256263 A256264 A256265

KEYWORD

nonn

AUTHOR

Omar E. Pol, Mar 31 2015

EXTENSIONS

More terms from Michel Marcus, May 25 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 11:28 EDT 2020. Contains 334825 sequences. (Running on oeis4.)