OFFSET
0,3
COMMENTS
This sequence is conjectured to be a permutation of the nonnegative integers, generated by the following process:
Begin with the nonnegative integers in their normal positions. Starting with n=0, the number in position n, which will be our a(n), "catapults" the neighbor to its right a(n) spaces further to the right. Increment n and repeat.
Whether or not this is actually a permutation of the nonnegative integers depends on whether or not there exists a number that is catapulted an infinite number of times. If such a number (say X) exists, the inverse "permutation" will be undefined at the X-th term.
LINKS
Andrew Weimholt, Table of n, a(n) for n = 0..2000
EXAMPLE
Step 0: a(0)=0 catapults 1 a distance of 0 -> 0,1,2,3,4,5,6,7,8.
Step 1: a(1)=1 catapults 2 a distance of 1 -> 0,1,3,2,4,5,6,7,8.
Step 2: a(2)=3 catapults 2 a distance of 3 -> 0,1,3,4,5,6,2,7,8.
Step 3: a(3)=4 catapults 5 a distance of 4 -> 0,1,3,4,6,2,7,8,5.
PROG
(Sage)
def A167161(N): #Generates a(0)-a(N)
A = range(3*N)
for n in range(N):
a = A.pop(n+1)
A.insert(n+A[n]+1, a)
return A[:N+1]
A167161(71) # Danny Rorabaugh, Mar 29 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Weimholt, Oct 29 2009
STATUS
approved