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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236459 Regular triangle: T(n, k) Manhattan distance between n and k in a left-aligned triangle with next M natural numbers in row M. 0
0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 3, 2, 1, 1, 0, 4, 3, 2, 2, 1, 0, 3, 2, 3, 1, 2, 3, 0, 4, 3, 2, 2, 1, 2, 1, 0, 5, 4, 3, 3, 2, 1, 2, 1, 0, 6, 5, 4, 4, 3, 2, 3, 2, 1, 0, 4, 3, 4, 2, 3, 4, 1, 2, 3, 4, 0, 5, 4, 3, 3, 2, 3, 2, 1, 2, 3, 1, 0, 6, 5, 4, 4, 3, 2, 3, 2, 1, 2, 2, 1, 0, 7, 6, 5, 5, 4, 3, 4, 3, 2, 1, 3, 2, 1, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

First column is A051162. Right diagonal is all zeros.

LINKS

Table of n, a(n) for n=1..105.

EXAMPLE

Triangle where distances are measured begins:

1

2 3

4 5 6

7 8 9 10

Distance between 1 and 1 is 0, hence T(1, 1) = 0.

Distance between 2 and 1 is 1, and between 2 and 2 is 0. Hence second row of this triangle is 1, 0.

Triangle starts:

0;

1, 0;

2, 1, 0;

2, 1, 2, 0;

3, 2, 1, 1, 0;

PROG

(PARI) getxy(n) = {y = sqrtint(2*n); if (n<=y*(y+1)/2, y--); x = n - y*(y+1)/2; [x, y]; }

trg(nn) = {i= 1; for (n = 1, nn, v = getxy(n); for (k = 1, n, nv = getxy(k); print1(abs(nv[1]-v[1])+abs(nv[2]-v[2]), ", "); ); print(); ); }

CROSSREFS

Cf. A236345.

Sequence in context: A230025 A207869 A130210 * A190427 A287108 A287360

Adjacent sequences:  A236456 A236457 A236458 * A236460 A236461 A236462

KEYWORD

nonn,tabl

AUTHOR

Michel Marcus, Jan 26 2014

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 November 12 04:21 EST 2019. Contains 329051 sequences. (Running on oeis4.)