cp's OEIS Frontend

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.

Showing 1-6 of 6 results.

A014217 a(n) = floor(phi^n), where phi = (1+sqrt(5))/2 is the golden ratio.

Original entry on oeis.org

1, 1, 2, 4, 6, 11, 17, 29, 46, 76, 122, 199, 321, 521, 842, 1364, 2206, 3571, 5777, 9349, 15126, 24476, 39602, 64079, 103681, 167761, 271442, 439204, 710646, 1149851, 1860497, 3010349, 4870846, 7881196, 12752042, 20633239, 33385281, 54018521, 87403802
Offset: 0

Views

Author

Keywords

Comments

a(n) = floor(lim_{k->oo} Fibonacci(k)/Fibonacci(k-n)). - Jon Perry, Jun 10 2003
For n > 1, a(n) is the maximum element in the continued fraction for A000045(n)*phi. - Benoit Cloitre, Jun 19 2005
a(n) is also the curvature (rounded down) of the circle inscribed in the n-th kite arranged in a spiral, starting with a unit circle, as shown in the illustration in the links section. - Kival Ngaokrajang, Aug 29 2013
a(n) is the n-th Lucas number (A000032) if n is odd, and a(n) is the n-th Lucas number minus 1 if n is even. (Mario Catalani's formula below expresses this fact.) This is related to the fact that the powers of phi approach the values of the Lucas numbers, the odd powers from above and the even powers from below. - Geoffrey Caveney, Apr 18 2014
a(n) is the sum of the last summands over all Arndt compositions of n (see the Checa link). - Daniel Checa, Dec 25 2023
a(n) is the number of (saturated or unsaturated) substituted N-heterocycles in chemistry (N = nitrogen). That means the number of matchings in a cycle graph when the two maximum matchings in every cycle with an even number of vertices are indistinguishable (because the corresponding resonance structures in the molecule are equivalent). - Stefan Schuster, Mar 20 2025

Crossrefs

Programs

  • Haskell
    a014217 n = a014217_list !! n
    a014217_list = 1 : 1 : zipWith (+)
       a000035_list (zipWith (+) a014217_list $ tail a014217_list)
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Magma
    [Floor( ((1+Sqrt(5))/2)^n ): n in [0..100]]; // Vincenzo Librandi, Apr 16 2011
    
  • Maple
    A014217 := proc(n)
        option remember;
        if n <= 3 then
            op(n+1,[1,1,2,4]) ;
        else
            procname(n-1)+2*procname(n-2)-procname(n-3)-procname(n-4) ;
        end if;
    end proc: # R. J. Mathar, Jun 23 2013
    #
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-1|-1|2|1>>^n. <<1, 1, 2, 4>>)[1, 1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 12 2017
  • Mathematica
    Table[Floor[GoldenRatio^n], {n, 0, 36}] (* Vladimir Joseph Stephan Orlovsky, Dec 12 2008 *)
    LinearRecurrence[{1, 2, -1, -1}, {1, 1, 2, 4}, 40] (* Jean-François Alcover, Nov 05 2017 *)
  • PARI
    my(x='x+O('x^44)); Vec((1-x^2+x^3)/((1+x)*(1-x)*(1-x-x^2))) \\ Joerg Arndt, Jul 10 2023
    
  • Python
    from sympy import floor, sqrt
    def A014217(n): return floor(((1+sqrt(5))/2)**n) # Chai Wah Wu, Dec 17 2021
  • Sage
    [floor(golden_ratio^n) for n in range(37)] # Danny Rorabaugh, Apr 19 2015
    

Formula

a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4).
a(n) = a(n-1) + a(n-2) + (1-(-1)^n)/2 = a(n-1) + a(n-2) + A000035(n).
a(n) = A000032(n) - (1 + (-1)^n)/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 17 2003
G.f.: (1-x^2+x^3)/((1+x)*(1-x)*(1-x-x^2)). - R. J. Mathar, Sep 06 2008
a(2n-1) = (Fibonacci(4n+1)-2)/Fibonacci(2n+2). - Gary Detlefs, Feb 16 2011
a(n) = floor(Fibonacci(2n+3)/Fibonacci(n+3)). - Gary Detlefs, Feb 28 2011
a(2n) = Fibonacci(2*n-1) + Fibonacci(2*n+1) - 1. - Gary Detlefs, Mar 10 2011
a(n+2*k) - a(n) = A203976(k)*A000032(n+k) if k odd, a(n+2*k) - a(n) = A203976(k)*A000045(n+k) if k even, for k > 0. - Paul Curtz, Jun 05 2013
a(n) = A052952(n) - A052952(n-2) + A052952(n-3). - R. J. Mathar, Jun 13 2013
a(n+6) - a(n-6) = 40*A000045(n), case k=6 of my formula above. - Paul Curtz, Jun 13 2013
From Paul Curtz, Jun 17 2013: (Start)
a(n-3) + a(n+3) = A153382(n).
a(n-1) + a(n+2) = A022319(n). (End)
For k > 0, a(2k) = A169985(2k)-1 and a(2k+1) = A169985(2k+1) (which is equivalent to Catalani's 2003 formula). - Danny Rorabaugh, Apr 15 2015
a(n) = ((-1)^(1+n)-1)/2 + ((1-sqrt(5))/2)^n + ((1+sqrt(5))/2)^n. - Colin Barker, Nov 05 2017
a(n) = floor(2*sinh(n*arccsch(2))). - Federico Provvedi, Feb 23 2022
E.g.f.: 2*exp(x/2)*cosh(sqrt(5)*x/2) - cosh(x). - Stefano Spezia, Jul 26 2022
a(n) = floor(Fibonacci(n)*phi) + Fibonacci(n-1) = A074331(n) + A000045(n-1) = A052952(n-1) + A000045(n-1). This is the case k=1 of the formula (also found in A128440): floor(k * phi^n) = floor(Fibonacci(n)*k*phi) + Fibonacci(n-1) * k. - Chunqing Liu, Oct 03 2023

Extensions

Corrected by T. D. Noe, Nov 09 2006
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar

A169985 Round phi^n to the nearest integer.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 26 2010

Keywords

Comments

Phi = (1+sqrt(5))/2, see A001622.
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
Equals the Lucas sequence beginning at 1 (A000204) with 2 inserted between 1 and 3.
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

Examples

			a(4) = 7 because we have: {}, {1}, {2}, {3}, {4}, {1,3}, {2,4}. - _Geoffrey Critzer_, Sep 23 2013
		

Crossrefs

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 k > 0, a(2k) = A169986(2k) and a(2k+1) = A014217(2k+1). - Danny Rorabaugh, Apr 15 2015
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

A214986 Power ceiling array for the golden ratio, by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 7, 8, 5, 1, 1, 12, 21, 22, 7, 1, 1, 20, 55, 94, 48, 12, 1, 1, 33, 144, 399, 329, 134, 18, 1, 1, 54, 377, 1691, 2255, 1487, 323, 30, 1, 1, 88, 987, 7164, 15456, 16492, 5796, 872, 47, 1, 1, 143, 2584, 30348, 105937, 182900
Offset: 1

Views

Author

Clark Kimberling, Oct 28 2012

Keywords

Comments

row 0: A000012 ... row 6: A049660
row 1: A000071 ... row 8: A049668
row 2: A001906 ... col 0: A000012
row 3: A049652 ... col 1: A169986
row 4: A004187
For x>1, define c(x,0) = 1 and c(x,n) = ceiling(x*c(x,n-1)) for n>0. Row m of A214986 is the sequence c(r^m,n), where r = golden ratio = (1 + sqrt(5))/2. The name of the array corresponds to the power ceiling function f(x) = limit of c(x,n)/x^n as n increases without bound; f(x) generalizes the case for x = 3/2 as described under "Power Ceilings" at MathWorld. For a graph of f(x), see the Mathematica program at A083286.
The term "power ceiling sequence" extends to sequences generated by recurrences P(n) = ceiling(x*P(n-1)) + g(n), and "power ceiling functions" f(x) to the limit of P(n)/x^n in case x>1 and g(n)/x^n -> 0.
Suppose that h is a nonnegative integer and g(n) is a constant. If x is a positive integer power of the golden ratio r, then f(x), in many cases, lies in the field Q(sqrt(5)). Examples matching rows of A214986, using g(n) = 0, follow:
...
x ... P ........ f(x)
r ... A000071 .. (5 + 2*sqrt(5))/2 = 1.8944... (A010532)
r^2 . A001906 .. (5 + 3*sqrt(5))/10 = 1.7082...(A176015)
r^3 . A049652 .. (25 + 11*sqrt(5))/40 = 1.2399...
r^4 . A004187 .. (15 + 7*sqrt(5))/10 = 1.0219...
...
If k is odd, then f(r^k) = r^k((b(k) + c(k))/d(k)), where
b(k) = L(j)^2 + L(j-1)^2, where j=[(k+1)/2], L=A000032 (Lucas numbers); c(k) = (L(k)+2)*sqrt(5); d(k) = 10*F(k)*L(k), where F=A000045 (Fibonacci numbers). If k is even, then f(r^k) = r^k/(F(k)*sqrt(5)).

Examples

			Northwest corner:
1...1....1.....1......1.......1
1...2....4.....7......12......20
1...3....8.....21.....55......144
1...5....22....94.....399.....1691
1...7....48....329....2255....15456
1...19...134...1487...16492...182900
		

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio;
    s[x_, 0] := 1; s[x_, n_] := Ceiling[x*s[x, n - 1]];
    t = TableForm[Table[s[r^m, n], {m, 0, 10}, {n, 0, 10}]  ]
    u = Flatten[Table[s[r^m, n - m], {n, 0, 10}, {m, 0, n}]]

Formula

The odd-numbered rows of A214986 are even-numbered rows of A213978; the even-numbered rows of A214986 are odd-numbered rows of A214984.

A062724 a(n) = floor(tau^n) + 1, where tau = (1 + sqrt(5))/2.

Original entry on oeis.org

2, 2, 3, 5, 7, 12, 18, 30, 47, 77, 123, 200, 322, 522, 843, 1365, 2207, 3572, 5778, 9350, 15127, 24477, 39603, 64080, 103682, 167762, 271443, 439205, 710647, 1149852, 1860498, 3010350, 4870847, 7881197, 12752043, 20633240, 33385282
Offset: 0

Views

Author

Jason Earls, Jul 15 2001

Keywords

Comments

Apart from the first term, this sequence also gives the ceiling of the powers of the golden ratio (cf. A169986). - Mohammad K. Azarian, Apr 14 2008

Crossrefs

Equals A014217 + 1.

Programs

  • Mathematica
    Floor[GoldenRatio^Range[0,40]]+1 (* Harvey P. Dale, Dec 18 2019 *)
  • PARI
    j=[]; for(n=0,60,t=(1+sqrt(5))/2; j=concat(j,floor((t^n))+1)); j
    
  • PARI
    { default(realprecision, 200); t=(1 + sqrt(5))/2; p=1; for (n=0, 400, if (n, p*=t); write("b062724.txt", n, " ", p\1 + 1) ) } \\ Harry J. Smith, Aug 09 2009

Formula

a(n) = 3*Fibonacci(n-1) + Fibonacci(n-2) + (n mod 2), n > 0. - Gary Detlefs, Dec 29 2010

A118841 Numbers k such that ceiling(phi^k) is prime.

Original entry on oeis.org

1, 2, 3, 4, 8, 16
Offset: 1

Views

Author

Eric W. Weisstein, May 01 2006

Keywords

Comments

a(7) if it exists is greater than 250000. - Mark Rodenkirch, Feb 22 2020

Crossrefs

Programs

  • Mathematica
    Select[Range[20],PrimeQ[Ceiling[GoldenRatio^#]]&] (* James C. McMahon, Sep 14 2024 *)
  • PARI
    c(n) = 3*fibonacci(n-1) + fibonacci(n-2) + (n % 2); \\ A169986(n) for n >= 1
    for(n=1,10^7,if(ispseudoprime(c(n)),print1(n,", ")))
    \\ Joerg Arndt, Feb 22 2020

Extensions

a(7)-a(8) from Charles R Greathouse IV, Jul 30 2011
a(9)-a(11) from Charles R Greathouse IV, Aug 01 2011
Incorrect a(7)-a(11) removed by Mark Rodenkirch, Feb 22 2020

A279100 a(n) = Sum_{k=0..n} ceiling(phi^k), where phi is the golden ratio (A001622).

Original entry on oeis.org

1, 3, 6, 11, 18, 30, 48, 78, 125, 202, 325, 525, 847, 1369, 2212, 3577, 5784, 9356, 15134, 24484, 39611, 64088, 103691, 167771, 271453, 439215, 710658, 1149863, 1860510, 3010362, 4870860, 7881210, 12752057, 20633254, 33385297, 54018537, 87403819, 141422341, 228826144, 370248469, 599074596
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 06 2016

Keywords

Comments

Partial sums of A169986.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Ceiling[GoldenRatio^n], {n, 0, 40}]]
    LinearRecurrence[{2, 1, -3, 0, 1}, {1, 3, 6, 11, 18}, 41]

Formula

G.f.: (1 + x - x^2 - x^3 - x^4)/((1 - x)^2*(1 - 2*x^2 - x^3)).
a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5).
a(n) = (10*n - 5*(-1)^n + 2^(1-n)*sqrt(5)*(5 + 3*sqrt(5))*(1 + sqrt(5))^n + sqrt(5)*2^(1-n)*(3*sqrt(5) - 5) *(1 - sqrt(5))^n - 35)/20.
a(n) ~ phi^(n+2).
Showing 1-6 of 6 results.