OFFSET
1,1
LINKS
MAPLE
A054082 := proc(nmax) local a, k, n, p ; a := [2, 1] ; while nops(a) < nmax do n := nops(a)+1 : k := floor((n+1)/2) ; p := 1; while p in a do p := p+1 ; od ; if n mod 2 = 1 then a := [op(a), p+k-1] ; else a := [op(a), p] ; fi ; od ; RETURN(a) ; end: A064579 := proc(a054082) local a, n, ainv ; n := 1; a := [] ; while member(n, a054082, 'ainv') do a := [op(a), ainv] ; n := n+1; od; RETURN(a) ; end: a054082 := A054082(200) : a064579 := A064579(a054082) : print(op(a064579)) ; # R. J. Mathar, Jun 27 2007
MATHEMATICA
a[n_] := If[OddQ[n], Floor[((n+1)/2 - 1) GoldenRatio] + (n+1)/2 + 1, Floor[(n/2 - 1) GoldenRatio] + 2]; a[2] = 1;
Sort[Array[{a[#], #}&, 100]][[All, 2]] (* Jean-François Alcover, Apr 01 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 16 2001
EXTENSIONS
Corrected and extended by R. J. Mathar, Jun 27 2007
STATUS
approved