%I #24 Sep 08 2022 08:45:07
%S 3,9,13,19,25,29,35,39,45,51,55,61,67,71,77,81,87,93,97,103,107,113,
%T 119,123,129,135,139,145,149,155,161,165,171,177,181,187,191,197,203,
%U 207,213,217,223,229,233,239,245,249,255,259,265,271,275,281,285,291,297
%N Pair the odd numbers such that the k-th pair is (r, r+2k) where r is the smallest odd number not included earlier: (1,3),(5,9),(7,13),(11,19),(15,25),(17,29),(21,35),(23,39),(27,45),... This is the sequence of the second member of pairs.
%C (A075317(n),a(n)) = (2*A(n)-1, 2*B(n)-1), where A and B are the basic Wythoff sequences A(n)=A000201(n) and B(n)=A001950(n). For a proof, see section 2 of the Carlitz et al. paper. - _Michel Dekking_, Sep 08 2016
%H Vincenzo Librandi, <a href="/A075318/b075318.txt">Table of n, a(n) for n = 1..1000</a>
%H L. Carlitz, R. Scoville and V. E. Hoggatt, Jr., <a href="http://www.fq.math.ca/Scanned/10-1/carlitz1.pdf">Fibonacci representations</a>, Fib. Quart. 10 (1972), 1-28.
%F a(n) = 2*floor(n*phi^2)-1, where phi=(1+sqrt(5))/2. - _Michel Dekking_, Sep 08 2016
%p A075318 := proc(nmax) local r,k,a,pairs ; a := [3] ; pairs := [1,3] ; k := 2 ; r := 5 ; while nops(a) < nmax do while r in pairs do r := r+2 ; od ; if r+2*k in pairs then printf("inconsistency",k) ; fi ; a := [op(a),r+2*k] ; pairs := [op(pairs),r,r+2*k] ; k := k+1 ; od ; RETURN(a) ; end: a := A075318(200) : for n from 1 to nops(a) do printf("%d,",op(n,a)) ; od ; # _R. J. Mathar_, Nov 12 2006
%t Table[2 Floor[n ((1 + Sqrt[5]) / 2)^2] - 1, {n, 60}] (* _Vincenzo Librandi_, Sep 08 2016 *)
%t 2*Floor[Range[60]GoldenRatio^2]-1 (* _Harvey P. Dale_, Feb 08 2020 *)
%o (Magma) [2*Floor(n*((1+Sqrt(5))/2)^2)-1: n in [1..60]]; // _Vincenzo Librandi_, Sep 08 2016
%o (PARI) a(n)=localbitprec(logint(sqrtint(45*n^4)+5*n^2,2)+2); 2*floor(n*(sqrt(5)+1)/2+n)-1 \\ _Charles R Greathouse IV_, Sep 09 2016
%o (Python)
%o from math import isqrt
%o def A075318(n): return (n+isqrt(5*n**2)&-2)+(n<<1)-1 # _Chai Wah Wu_, Aug 16 2022
%Y Cf. A075317, A075319, A075320.
%K nonn,easy
%O 1,1
%A _Amarnath Murthy_, Sep 14 2002
%E More terms from _R. J. Mathar_, Nov 12 2006