A169985 Round phi^n to the nearest integer.
1, 2, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803
Offset: 0
Examples
a(4) = 7 because we have: {}, {1}, {2}, {3}, {4}, {1,3}, {2,4}. - _Geoffrey Critzer_, Sep 23 2013
Links
- Danny Rorabaugh, Table of n, a(n) for n = 0..4000
- John Machacek and George D. Nasr, Transversal and Paving Positroids, arXiv:2401.02053 [math.CO], 2024. See p. 23.
- Shaoxiong (Steven) Yuan, Generalized Identities of Certain Continued Fractions, arXiv:1907.12459 [math.NT], 2019.
- Index entries for linear recurrences with constant coefficients, signature (1,1).
Programs
-
GAP
Concatenation([1,2], List([2..40], n-> Lucas(1,-1,n)[2] )); # G. C. Greubel, Jul 09 2019
-
Magma
[Round(Sqrt(Fibonacci(2*n) + 2*Fibonacci(2*n-1))): n in [0..40]]; // Vincenzo Librandi, Apr 16 2015
-
Mathematica
nn=34; CoefficientList[Series[(1+x-x^3)/(1-x-x^2),{x,0,nn}],x] (* Geoffrey Critzer, Sep 23 2013 *) Round[GoldenRatio^Range[0,40]] (* Harvey P. Dale, Jul 13 2014 *) Table[If[n<=1, n+1, LucasL[n]], {n, 0, 40}] (* G. C. Greubel, Jul 09 2019 *)
-
PARI
my(x='x+O('x^40)); Vec((1+x-x^3)/(1-x-x^2)) \\ G. C. Greubel, Feb 13 2019
-
Python
from gmpy2 import isqrt, fib2 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
-
Sage
[round(golden_ratio^n) for n in range(40)] # Danny Rorabaugh, Apr 16 2015
Formula
O.g.f.: (1 + x - x^3)/(1 - x - x^2). - Geoffrey Critzer, Sep 23 2013
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
For n > 1, a(n) = A001610(n - 1) + 1. - Gus Wiseman, Feb 12 2019
a(n) = A000032(n) for n>=2. - G. C. Greubel, Jul 09 2019
Comments