OFFSET
1,2
COMMENTS
A permutation of the natural numbers. Inverse permutation is A065037.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
P. Erdős, R. Freud, and N. Hegyvári, Arithmetical properties of permutations of integers, Acta Mathematica Hungarica 41:1-2 (1983), pp. 169-176.
Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, Finding structure in sequences of real numbers via graph theory: a problem list, arXiv:2012.04625[math.CO], 2020-2021.
MATHEMATICA
w = {}; Do[ w = If[ FreeQ[w, k], w = Join[w, {k, 2k}], w], {k, 100}]; w
(* Jean-François Alcover, Nov 04 2011, after Wouter Meeussen *)
PROG
(Haskell)
import Data.List (delete)
a036552 n = a036552_list !! (n-1)
a036552_list = g [1..] where
g (x:xs) = x : (2*x) : (g $ delete (2*x) xs)
-- Reinhard Zumkeller, Feb 07 2011
(PARI) apairs(N) = my(m=0, r=List(), i=0); while(#r<N*2, if(!bitand(m, 1<<(i++)), listput(~r, i); listput(~r, i*2); m=bitor(m, 1<<(i*2)))); Vec(r); \\ Ruud H.G. van Tol, May 09 2024
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved