login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181940 a(0)=0, and there are a(n) terms between a(n) and the nearest a(n)+1. 1
0, 1, 0, 2, 0, 1, 3, 1, 0, 2, 4, 2, 0, 1, 3, 5, 3, 1, 0, 2, 4, 6, 4, 2, 0, 1, 3, 5, 7, 5, 3, 1, 0, 2, 4, 6, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Table of n, a(n) for n=0..104.

FORMULA

a(A000217(n))=n.

EXAMPLE

From Peter Luschny, May 30 2020: (Start)

Seen as a triangle:

[0]

[1, 0]

[2, 0, 1]

[3, 1, 0, 2]

[4, 2, 0, 1, 3]

[5, 3, 1, 0, 2, 4]

[6, 4, 2, 0, 1, 3, 5]

[7, 5, 3, 1, 0, 2, 4, 6]

[8, 6, 4, 2, 0, 1, 3, 5, 7]

[9, 7, 5, 3, 1, 0, 2, 4, 6, 8]

[10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9]

[11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10]

(End)

PROG

(PARI) a_list(N)={my(a=vector(2*N), c=0); for(i=2, N, a[i]=c++; my(j=i); for(k=1, c-1, a[j-=(-1)^k*(c-k+1)]=c-k); i+=c); vecextract(a, 2^N-1)}

(Python)

def T(num_rows):

    L, R = [0], [0]

    for n in range(1, num_rows):

        R.reverse()

        R.insert(0, n)

        L.extend(R)

    return L

print(T(14)) # Peter Luschny, May 30 2020

CROSSREFS

Sequence in context: A137712 A194711 A168532 * A261209 A340006 A093555

Adjacent sequences:  A181937 A181938 A181939 * A181941 A181942 A181943

KEYWORD

nonn

AUTHOR

Eric Angelini and M. F. Hasler, Apr 03 2012

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 May 18 19:58 EDT 2021. Contains 344002 sequences. (Running on oeis4.)