login
The OEIS is supported by the many generous donors to the OEIS 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
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 * A356154 A261209 A340006
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)