OFFSET
1,2
COMMENTS
Permutation of natural numbers with inverse A213913.
LINKS
PROG
(Haskell)
a213912 n = a213912_list !! (n-1)
a213912_list = 1 : f [1] where
f xs@(x:_) = y : f (y : xs) where
y = if z `notElem` xs then z else 3 * x where z = a000196 x
(PARI) lista(nn) = {my(k, v=vector(nn)); v[1]=1; for(n=2, nn, if(vecsearch(vecsort(v), k=sqrtint(v[n-1])), v[n]=3*v[n-1], v[n]=k)); v; } \\ Jinyuan Wang, Jun 26 2020
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Mar 05 2013
STATUS
approved