A138885
n-th run has length n-th nonprime number, with digits 0 and 1 only, starting with 1.
Original entry on oeis.org
1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
.n ..... Run ................... Length
.1 ..... 1 ..................... 1
.2 ..... 0,0,0,0 ............... 4
.3 ..... 1,1,1,1,1,1 ........... 6
.4 ..... 0,0,0,0,0,0,0,0 ....... 8
.5 ..... 1,1,1,1,1,1,1,1,1 ..... 9
-
Join[{1},{PadRight[{},#[[1]],0],PadRight[{},#[[2]],1]}&/@Partition[Select[Range[ 20],CompositeQ],2]]//Flatten (* Harvey P. Dale, May 26 2023 *)
A138886
n-th run has length n-th nonprime number A018252, with digits 0 and 1 only, starting with 0.
Original entry on oeis.org
0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
.n ..... Run ................... Length
.1 ..... 0 ..................... 1
.2 ..... 1,1,1,1 ............... 4
.3 ..... 0,0,0,0,0,0 ........... 6
.4 ..... 1,1,1,1,1,1,1,1 ....... 8
.5 ..... 0,0,0,0,0,0,0,0,0 ..... 9
A211197
Table T(n,k) = 2*n + ((-1)^n)*(1/2 - (k-1) mod 2) - 1/2; n, k > 0, read by antidiagonals.
Original entry on oeis.org
1, 2, 4, 1, 3, 5, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11, 13, 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22
Offset: 1
The start of the sequence as table for general case:
b(1)..c(1)..b(1)..c(1)..b(1)..c(1)..b(1)..c(1)..
c(2)..b(2)..c(2)..b(2)..c(2)..b(2)..c(2)..b(2)..
b(3)..c(3)..b(3)..c(3)..b(3)..c(3)..b(3)..c(3)..
c(4)..b(4)..c(4)..b(4)..c(4)..b(4)..c(4)..b(4)..
b(5)..c(5)..b(5)..c(5)..b(5)..c(5)..b(5)..c(5)..
c(6)..b(6)..c(6)..b(6)..c(6)..b(6)..c(6)..b(6)..
b(7)..c(7)..b(7)..c(7)..b(7)..c(7)..b(7)..c(7)..
c(8)..b(8)..c(8)..b(8)..c(8)..b(8)..c(8)..b(8)..
. . .
The start of the sequence as triangle array read by rows for general case:
b(1);
c(1),c(2);
b(1),b(2),b(3);
c(1),c(2),c(3),c(4);
b(1),b(2),b(3),b(4),b(5);
c(1),c(2),c(3),c(4),c(5),c(6);
b(1),b(2),b(3),b(4),b(5),b(6),b(7);
c(1),c(2),c(3),c(4),c(5),c(6),c(7),c(8);
. . .
Row number r contains r numbers.
If r is odd b(1),b(2),...,b(r).
If r is even c(1),c(2),...,c(r).
The start of the sequence as table for b(n)=2*n-1 and c(n)=2*n:
1....2...1...2...1...2...1...2...
4....3...4...3...4...3...4...3...
5....6...5...6...5...6...5...6...
8....7...8...7...8...7...8...7...
9...10...9..10...9..10...9..10...
12..11..12..11..12..11..12..11...
13..14..13..14..13..14..13..14...
16..15..16..15..16..15..16..15...
. . .
The start of the sequence as triangle array read by rows for b(n)=2*n-1 and c(n)=2*n:
1;
2,4;
1,3,5;
2,4,6,8;
1,3,5,7,9;
2,4,6,8,10,12;
1,3,5,7,9,11,13;
2,4,6,8,10,12,14,16;
. . .
Row number r contains r numbers.
If r is odd 1,3,...2*r-1 - coincides with the elements row number r triangle array read by rows for sequence 2*A002260-1.
If r is even 2,4,...,2*r - coincides with the elements row number r triangle array read by rows for sequence 2*A002260.
-
t=int((math.sqrt(8*n-7) - 1)/ 2)
i=n-t*(t+1)/2
j=(t*t+3*t+4)/2-n
result =2*i+((-1)**i)*(0.5 - (j-1) % 2) - 0.5
-
a211197_list = [2*n - k%2 for k in range(1, 13) for n in range(1, k+1)] # David Radcliffe, Jun 01 2025
Comments