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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209302 Table T(n,k)=max{n+k-1,n+k-1} n, k > 0, read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). 1
1, 2, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 7, 6, 5, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10, 9, 8, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

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

FORMULA

In general, let m be natural number. Table T(n,k) = max{m*n+k-m,n+m*k-m}. For the general case

a(n) = (m+1)*sqrt(n-1)+1-|n-floor(sqrt(n-1))^2- floor(sqrt(n-1))|.

For m = 1

a(n) = 2*sqrt(n-1)+1-|n-floor(sqrt(n-1))^2- floor(sqrt(n-1))|.

EXAMPLE

The start of the sequence as table for general case:

1  m+1 2*m+1 3*m+1 4*m+1 5*m+1 6*m+1 ...

m+1  m+2 2*m+2 3*m+2 4*m+2 5*m+2 6*m+2 ...

2*m+1 2*m+2 2*m+3 3*m+3 4*m+3 5*m+3 6*m+3 ...

3*m+1 3*m+2 3*m+3 3*m+4 4*m+4 5*m+4 6*m+4 ...

4*m+1 4*m+2 4*m+3 4*m+4 4*m+5 5*m+5 6*m+5 ...

5*m+1 5*m+2 5*m+3 5*m+4 5*m+5 5*m+6 6*m+6 ...

6*m+1 6*m+2 6*m+3 6*m+4 6*m+5 6*m+6 6*m+7 ...

. . .

The start of the sequence as triangle array read by rows for general case:

1;

m+1,     m+2,    m+1;

2*m+1, 2*m+2,  2*m+3, 2*m+2, 2*m+1;

3*m+1, 3*m+2,  3*m+3, 3*m+4, 3*m+3, 3*m+2, 3*m+1;

4*m+1, 4*m+2,  4*m+3, 4*m+4, 4*m+5, 4*m+4, 4*m+3, 4*m+2, 4*m+1;

. . .

Row number r contains 2*r-1 numbers: r*m+1, r*m+2, ... r*m+r, r*m+r+1, r*m+r,...., r*m+2, r*m+1

The start of the sequence as triangle array read by rows for m=1:

1;

2,3,2;

3,4,5,4,3;

4,5,6,7,6,5,4;

5,6,7,8,9,8,7,6,5;

6,7,8,9,10,11,10,9,8,7,6;

7,8,9,10,11,12,13,12,11,10,9,8,7;

. . .

PROG

(Python)

result = 2*int(math.sqrt(n-1)) - abs(n-int(math.sqrt(n-1))**2 - int(math.sqrt(n-1)) -1) +1

CROSSREFS

Cf.  A187760.

Sequence in context: A064672 A138554 A063772 * A205122 A174863 A064289

Adjacent sequences:  A209299 A209300 A209301 * A209303 A209304 A209305

KEYWORD

nonn,tabf

AUTHOR

Boris Putievskiy, Jan 18 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 21 09:11 EST 2018. Contains 317431 sequences. (Running on oeis4.)