login
The absolute value of a(n) is the length of the n-th line segment of a labyrinth related to odd nonprimes (A014076) and odd primes (A065091) (see Comments lines for definition).
1

%I #48 Dec 18 2015 14:46:17

%S 1,1,1,-1,-2,-2,1,3,4,4,5,5,5,-1,-6,-7,-7,-8,-8,-8,1,9,10,10,11,11,12,

%T 12,12,-1,-13,-14,-14,-14,1,15,16,16,16,-1,-17,-18,-18,-19,-19,-20,

%U -20,-20,1,21,22,22,23,23,24,24,24,-1,-25,-26,-26,-27,-27,-27,1,28,29,29,29,-1,-30,-31,-31,-31,1,32,33,33,34

%N The absolute value of a(n) is the length of the n-th line segment of a labyrinth related to odd nonprimes (A014076) and odd primes (A065091) (see Comments lines for definition).

%C In order to construct this sequence we use the following rules:

%C We start with the diagram described in A256253 in which the regions in direction S-W represent the odd nonprimes (A014076) and the regions in direction N-E represent the odd primes (A065091).

%C The diagram must be modified such that the new diagram contains only one region of infinite length as shown in Example section, figure 1.

%C The absolute value of a(n) is the length of the n-th line segment in the walk into the mentioned diagram as shown in Example section, figure 2.

%C The sign of a(n) is the same as the sign of the precedent term in the sequence whose absolute value is 1.

%C The positive value of a(n) means that the line segment rotates in the direction of the clockwise.

%C The negative value of a(n) means that the line segment rotates counter to the clockwise.

%C A line segment of length x can be replaced be x toothpicks with nodes between their endpoints.

%C Also the sequence can be interpreted as an irregular array T(j,k), see Formula section and Example section.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Labyrinth">Labyrinth</a>

%F Written as an irregular array we have that:

%F T(1,3) = 1.

%F And for j > 1:

%F T(j,1) = m*(j-1), where m is the precedent term in the sequence whose absolute value is 1.

%F T(j,2) = T(j,1), if 2*j-1 is an odd prime and 2*j+1 is an odd nonprime or if 2*j-1 is an odd nonprime and 2*j+1 is an odd prime.

%F T(j,3) = (-1)*m, if T(j,1) = T(j,2), where m is the precedent term in the sequence whose absolute value is 1, otherwise T(j,3) does not exist.

%e Written as an irregular array T(j,k) the sequence begins:

%e -----------------------

%e j/k: 1 2 3

%e -----------------------

%e 1: 1;

%e 2: 1, 1, -1;

%e 3: -2, -2, 1;

%e 4: 3, 4;

%e 5: 4, 5;

%e 6: 5, 5, -1;

%e 7: -6, -7;

%e 8: -7, -8;

%e 9: -8, -8, 1;

%e 10: 9, 10;

%e 11: 10, 11;

%e 12: 11, 12;

%e 13: 12, 12, -1;

%e 14: -13, -14;

%e 15: -14, -14, 1;

%e 16: 15, 16;

%e 17: 16, 16; -1;

%e 18: -17, -18;

%e 19: -18, -19:

%e 20: -19, -20;

%e ...

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

%e . | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | 37

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

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

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

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

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

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

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

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

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

%e . A014076 | | | | | | | | | | | | | | | | | | | | 3

%e . 1 | | | | | | | | |_|_ _| | | | | | | | | | A065091

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

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

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

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

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

%e . 33 | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |

%e . 35 | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|

%e . 39 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

%e .

%e Figure 1. Here the diagram described in A256253 was modified such that the new diagram contains only one region of infinite length.

%e .

%e Illustration of initial terms (n = 1..46):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%e . | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| Labyrinth

%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <-- entrance

%e .

%e Figure 2. Interpreted as a sequence, the absolute value of a(n) is the length of the n-th line segment starting from the center of the structure. The figure shows the first 46 line segments. Note that the structure looks like a labyrinth.

%Y Cf. A005408, A014076, A065091, A256253.

%K sign,tabf,walk,look

%O 1,5

%A _Omar E. Pol_, Mar 31 2015