login
A256134
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
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, 12, 12, -1, -13, -14, -14, -14, 1, 15, 16, 16, 16, -1, -17, -18, -18, -19, -19, -20, -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
OFFSET
1,5
COMMENTS
In order to construct this sequence we use the following rules:
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).
The diagram must be modified such that the new diagram contains only one region of infinite length as shown in Example section, figure 1.
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.
The sign of a(n) is the same as the sign of the precedent term in the sequence whose absolute value is 1.
The positive value of a(n) means that the line segment rotates in the direction of the clockwise.
The negative value of a(n) means that the line segment rotates counter to the clockwise.
A line segment of length x can be replaced be x toothpicks with nodes between their endpoints.
Also the sequence can be interpreted as an irregular array T(j,k), see Formula section and Example section.
FORMULA
Written as an irregular array we have that:
T(1,3) = 1.
And for j > 1:
T(j,1) = m*(j-1), where m is the precedent term in the sequence whose absolute value is 1.
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.
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.
EXAMPLE
Written as an irregular array T(j,k) the sequence begins:
-----------------------
j/k: 1 2 3
-----------------------
1: 1;
2: 1, 1, -1;
3: -2, -2, 1;
4: 3, 4;
5: 4, 5;
6: 5, 5, -1;
7: -6, -7;
8: -7, -8;
9: -8, -8, 1;
10: 9, 10;
11: 10, 11;
12: 11, 12;
13: 12, 12, -1;
14: -13, -14;
15: -14, -14, 1;
16: 15, 16;
17: 16, 16; -1;
18: -17, -18;
19: -18, -19:
20: -19, -20;
...
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
. | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | 37
. | | | _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 31
. | | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ | | | 29
. | | | | | _ _ _ _ _ _ _ _ _ _ | | | | 23
. | | | | | | | _ _ _ _ _ _ _ _ | | | | | 19
. | | | | | | |_ _ _ _ _ _ _ _ | | | | | | 17
. | | | | | | | _ _ _ _ _ _ | | | | | | | 13
. | | | | | | | | _ _ _ _ | | | | | | | | 11
. | | | | | | | | | _ _ | | | | | | | | | 7
. | | | | | | | | |_ _ | | | | | | | | | | 5
. A014076 | | | | | | | | | | | | | | | | | | | | 3
. 1 | | | | | | | | |_|_ _| | | | | | | | | | A065091
. 9 | | | | | | | |_ _ _ _ _|_ _| | | | | | |
. 15 | | | | | | |_ _ _ _ _ _ _ _ _| | | | | |
. 21 | | | | | |_ _ _ _ _ _ _ _ _ _ _| | | | |
. 25 | | | | |_ _ _ _ _ _ _ _ _ _ _ _ _| | | |
. 27 | | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
. 33 | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
. 35 | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
. 39 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.
Figure 1. Here the diagram described in A256253 was modified such that the new diagram contains only one region of infinite length.
.
Illustration of initial terms (n = 1..46):
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
. | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
. | | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
. | | | _ _ _ _ _ _ _ _ _ _ _ _ | | |
. | | | | | | _ _ _ _ _ _ _ _ _ | | | |
. | | | | | | |_ _ _ _ _ _ _ _ | | | | |
. | | | | | | _ _ _ _ _ _ _ | | | | | |
. | | | | | | | _ _ _ _ _ | | | | | | |
. | | | | | | | | _ _ _ | | | | | | | |
. | | | | | | | | |_ _ | | | | | | | | |
. | | | | | | | | _ | | | | | | | | | |
. | | | | | | | | | |_| | | | | | | | | |
. | | | | | | | |_ _ _ _| |_| | | | | | |
. | | | | | | |_ _ _ _ _ _ _ _| | | | | |
. | | | | | |_ _ _ _ _ _ _ _ _ _| | | | |
. | | | | |_ _ _ _ _ _ _ _ _ _ _ _| | | |
. | | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
. | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
. | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| Labyrinth
. |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <-- entrance
.
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.
CROSSREFS
KEYWORD
sign,tabf,walk,look
AUTHOR
Omar E. Pol, Mar 31 2015
STATUS
approved