login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211197 Table T(n,k) = 2*n + ((-1)^n)*(1/2 - (k-1) mod 2) - 1/2; n, k > 0, read by antidiagonals. 1
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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

In general, let B and C be sequences. By b(n) and c(n) denote elements B and C respectively. Table T(n,k) = (1-(-1)^k)*b(n)/2+(1+(-1)^k)*c(n)/2 read by antidiagonals.

For this sequence b(n)=2*n-1, b(n)=A005408(n), c(n)=2*n, c(n)=A005843(n).

If n is odd   row T(n,k) is alternation b(n) and c(n) starts from b(n).

If n is even  row T(n,k) is alternation c(n) and b(n) starts from c(n).

For this sequence if n is odd   alternation numbers  2*n-1 and 2*n   starts from  2*n-1.

For this sequence if n is even  alternation numbers  2*n   and 2*n-1 starts from  2*n.

T(n,k) is replication of the first and the second columns that are “a braid” from sequences B and C.

LINKS

Boris Putievskiy, Rows n = 1..140 of triangle, flattened

Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO]

FORMULA

For the general case:

As table T(n,k) = (1-(-1)^k)*b(n)/2+(1+(-1)^k)*c(n)/2.

As linear sequence

a(n) = (1-(-1)^j)*b(i)/2+(1+(-1)^j)*c(i)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).

For b(n) = 2*n-1 and c(n) = 2*n:

As table T(n,k) = 2*n+((-1)^n)*(1/2- (k-1) mod 2) - 1/2.

As linear sequence

a(n) = 2*A002260(n) + ((-1)^A002260(n))*(1/2- (A004736(n)-1) mod 2) -1/2.

a(n) = -(1+(-1)^A003056(n))*A002260(n) +(1+(-1)^A003056(n))*(2*A002260(n)-1)/2.

a(n) =  2*i+((-1)^i)*(1/2- (j-1) mod 2) - 1/2, a(n) = -(1+(-1)^t)*i +(1+(-1)^t)*(2*i-1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).

EXAMPLE

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.

PROG

(Python)

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

CROSSREFS

Cf. A000027, A003056, A002260, A004736, A210530, A158405, A005408, A005843.

Sequence in context: A141843 A130266 A261595 * A258246 A258240 A198578

Adjacent sequences:  A211194 A211195 A211196 * A211198 A211199 A211200

KEYWORD

nonn,tabl

AUTHOR

Boris Putievskiy, Feb 03 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 11 15:53 EST 2018. Contains 318049 sequences. (Running on oeis4.)