Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #30 Jun 11 2015 10:26:36
%S 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,
%T 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,
%U 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
%N Number of successive odd noncomposite numbers A006005 and number of successive odd composite numbers A071904, interleaved.
%C See also A256253 and A256262 which contain similar diagrams.
%F a(n) = A256253(n+1), n >= 2.
%e 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:
%e 1, 3, 5, 7;
%e 9;
%e 11, 13;
%e 15;
%e 17; 19;
%e 21,
%e 23;
%e 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 noncomposite numbers A006005 and odd composite numbers A071904:
%e . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | 31
%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 29
%e . | | |_ _ _ _ _ _ _ _ _ _ _ | | | 23
%e . | | | |_ _ _ _ _ _ _ _ _ | | | | 19
%e . | | | |_ _ _ _ _ _ _ _ | | | | | 17
%e . | | | | |_ _ _ _ _ _ | | | | | | 13
%e . | | | | |_ _ _ _ _ | | | | | | | 11
%e . | | | | | |_ _ _ | | | | | | | | 7
%e . | | | | | |_ _ | | | | | | | | | 5
%e . | | | | | |_ | | | | | | | | | | 3
%e . A071904 | | | | | |_|_|_|_| | | | | | | | 1
%e . 9 | | | | |_ _ _ _ _|_|_| | | | | | A006005
%e . 15 | | | |_ _ _ _ _ _ _ _|_|_| | | |
%e . 21 | | |_ _ _ _ _ _ _ _ _ _ _|_| | |
%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..9:
%e . _ _ _ _
%e . |_ _
%e . |_ _
%e . |_
%e . |
%e . |_ _
%e .
%e The sequence begins: 4,1,2,1,2,1,1,2,2,...
%e .
%o (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
%Y Cf. A005408, A006005, A071904, A256253, A256262.
%K nonn
%O 1,1
%A _Omar E. Pol_, Mar 30 2015