login
The OEIS is supported by the many generous donors to the OEIS 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. 4

%I #29 May 26 2021 02:33:27

%S 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,

%T 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,

%U 2,1,2,13,2,10,2,67,2,4,2,7,2,4,2,13,2,28,2

%N Number of successive odd numbers that are not twin primes and number of successive twin primes, interleaved.

%C See also both A256252 and A256253 which contain similar diagrams.

%H Antti Karttunen, <a href="/A256262/b256262.txt">Table of n, a(n) for n = 1..30998</a>

%e 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:

%e 1;

%e 3, 5, 7;

%e 9;

%e 11, 13;

%e 15;

%e 17; 19;

%e 21, 23, 25, 27;

%e 39, 31;

%e ...

%e a(n) is the length of the n-th row.

%e .

%e 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).

%e . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | 31

%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 29

%e . | | | | |_ _ _ _ _ _ _ _ _ | | | 19

%e . | | | | |_ _ _ _ _ _ _ _ | | | | 17

%e . | | | | | |_ _ _ _ _ _ | | | | | 13

%e . | | | | | |_ _ _ _ _ | | | | | | 11

%e . | | | | | | |_ _ _ | | | | | | | 7

%e . | | | | | | |_ _ | | | | | | | | 5

%e . A255763 | | | | | | |_ | | | | | | | | | 3

%e . 1 | | | | | | |_|_|_|_| | | | | | | A001097

%e . 9 | | | | | |_ _ _ _ _|_|_| | | | |

%e . 15 | | | | |_ _ _ _ _ _ _ _|_|_| | |

%e . 21 | | | |_ _ _ _ _ _ _ _ _ _ _| | |

%e . 23 | | |_ _ _ _ _ _ _ _ _ _ _ _| | |

%e . 25 | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |

%e . 27 |_ _ _ _ _ _ _ _ _ _ _ _ _ _|_|_|

%e .

%e 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:

%e .

%e . |_ _ _

%e . |_ _

%e . |_ _

%e . |

%e . |

%e . |

%e . |_ _

%e .

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

%e .

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

%o 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

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

%K nonn

%O 1,2

%A _Omar E. Pol_, Mar 31 2015

%E More terms from _Michel Marcus_, May 25 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 09:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)