This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A169985 #77 Jun 19 2024 11:15:11 %S A169985 1,2,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778, %T A169985 9349,15127,24476,39603,64079,103682,167761,271443,439204,710647, %U A169985 1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803 %N A169985 Round phi^n to the nearest integer. %C A169985 Phi = (1+sqrt(5))/2, see A001622. %C A169985 a(n) is the number of subsets of {1,2,...,n} with no two consecutive elements where n and 1 are considered to be consecutive. - _Geoffrey Critzer_, Sep 23 2013 %C A169985 Equals the Lucas sequence beginning at 1 (A000204) with 2 inserted between 1 and 3. %C A169985 The Lucas sequence beginning at 2 (A000032) can be written as L(n) = phi^n + (-1/phi)^n. Since |(-1/phi)^n|<1/2 for n>1, this sequence is {L(n)} (with the first two terms switched). As a consequence, for n>1: a(n) is obtained by rounding phi^n up for even n and down for odd n; a(n) is also the nearest integer to 1/|phi^n - a(n)|. - _Danny Rorabaugh_, Apr 15 2015 %H A169985 Danny Rorabaugh, <a href="/A169985/b169985.txt">Table of n, a(n) for n = 0..4000</a> %H A169985 John Machacek and George D. Nasr, <a href="https://arxiv.org/abs/2401.02053">Transversal and Paving Positroids</a>, arXiv:2401.02053 [math.CO], 2024. See p. 23. %H A169985 Shaoxiong (Steven) Yuan, <a href="https://arxiv.org/abs/1907.12459">Generalized Identities of Certain Continued Fractions</a>, arXiv:1907.12459 [math.NT], 2019. %H A169985 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,1). %F A169985 O.g.f.: (1 + x - x^3)/(1 - x - x^2). - _Geoffrey Critzer_, Sep 23 2013 %F A169985 a(n) = round(sqrt(F(2n) + 2*F(2n-1))), for n >= 0, allowing F(-1) = 1. Also phi^n -> sqrt(F(2n) + 2*F(2n-1)), within < 0.02% by n = 4, therefore converging rapidly. - _Richard R. Forberg_, Jun 23 2014 %F A169985 For k > 0, a(2k) = A169986(2k) and a(2k+1) = A014217(2k+1). - _Danny Rorabaugh_, Apr 15 2015 %F A169985 For n > 1, a(n) = A001610(n - 1) + 1. - _Gus Wiseman_, Feb 12 2019 %F A169985 a(n) = A000032(n) for n>=2. - _G. C. Greubel_, Jul 09 2019 %e A169985 a(4) = 7 because we have: {}, {1}, {2}, {3}, {4}, {1,3}, {2,4}. - _Geoffrey Critzer_, Sep 23 2013 %t A169985 nn=34; CoefficientList[Series[(1+x-x^3)/(1-x-x^2),{x,0,nn}],x] (* _Geoffrey Critzer_, Sep 23 2013 *) %t A169985 Round[GoldenRatio^Range[0,40]] (* _Harvey P. Dale_, Jul 13 2014 *) %t A169985 Table[If[n<=1, n+1, LucasL[n]], {n, 0, 40}] (* _G. C. Greubel_, Jul 09 2019 *) %o A169985 (Magma) [Round(Sqrt(Fibonacci(2*n) + 2*Fibonacci(2*n-1))): n in [0..40]]; // _Vincenzo Librandi_, Apr 16 2015 %o A169985 (Sage) [round(golden_ratio^n) for n in range(40)] # _Danny Rorabaugh_, Apr 16 2015 %o A169985 (PARI) my(x='x+O('x^40)); Vec((1+x-x^3)/(1-x-x^2)) \\ _G. C. Greubel_, Feb 13 2019 %o A169985 (GAP) Concatenation([1,2], List([2..40], n-> Lucas(1,-1,n)[2] )); # _G. C. Greubel_, Jul 09 2019 %o A169985 (Python) %o A169985 from gmpy2 import isqrt, fib2 %o A169985 def A169985(n): return int((m:=isqrt(k:=(lambda x:(x[1]<<1)+x[0])(fib2(n<<1))))+(k-m*(m+1)>=1)) # _Chai Wah Wu_, Jun 19 2024 %Y A169985 Cf. A000032, A000045, A000204, A001622, A014217, A169986. %Y A169985 Cf. A000126, A000296, A001610. %K A169985 nonn,easy %O A169985 0,2 %A A169985 _N. J. A. Sloane_, Sep 26 2010