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

A182801 Joint-rank array of the numbers j*r^(i-1), where r = golden ratio = (1+sqrt(5))/2, i>=1, j>=1, read by antidiagonals.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 7, 9, 11, 8, 10, 13, 16, 19, 14, 12, 18, 23, 28, 32, 25, 15, 21, 31, 39, 48, 54, 42, 17, 26, 36, 52, 66, 81, 89, 71, 20, 29, 44, 61, 86, 110, 134, 147, 117, 22, 34, 49, 73, 102, 141, 181, 221, 240, 193, 24, 38, 57, 82
Offset: 1

Views

Author

Clark Kimberling, Dec 04 2010

Keywords

Comments

Joint-rank arrays are introduced here as follows.
Suppose that R={f(i,j)} is set of positive numbers, where i and j range through countable sets I and J, respectively, such that for every n, then number f(i,j) < n is finite. Let T(i,j) be the position of f(i,j) in the joint ranking of all the numbers in R. The joint-rank array of R is the array T whose i-th row is T(i,j).
For A182801, f(i,j)=j*r^(i-1), where r=(1+sqrt(5))/2 and I=J={1,2,3,...}.
(row 1)=A020959; (row 2)=A020960; (row 3)=A020961.
(col 1)=A020956; (col 2)=A020957; (col 3)=A020958.
Every positive integer occurs exactly once in A182801, so that as a sequence it is a permutation of the positive integers.

Examples

			Northwest corner:
1....3....5....7...10...12...
2....6....9...13...18...21...
4...11...16...23...31...36...
8...19...28...39...52...61...
		

Crossrefs

Programs

  • Mathematica
    r=GoldenRatio;
    f[i_,j_]:=Sum[Floor[j*r^(i-k)],{k,1,i+Log[r,j]}];
    TableForm[Table[f[i,j],{i,1,16},{j,1,16}]] (* A182801 *)

Formula

T(i,j)=Sum{floor(j*r^(i-k)): k>=1}.

A347068 Rectangular array (T(n,k)), by downward antidiagonals: T(n,k) = position of k in the ordering of {h*r^m, r = 1/(golden ratio), h >= 1, 0 <= m <= n}.

Original entry on oeis.org

2, 5, 4, 7, 10, 8, 10, 14, 18, 14, 13, 20, 26, 31, 25, 15, 26, 36, 46, 53, 42, 18, 30, 47, 63, 79, 88, 71, 20, 36, 55, 81, 107, 132, 146, 117, 23, 40, 65, 96, 136, 178, 219, 239, 193, 26, 46, 73, 112, 162, 225, 294, 359, 391, 315, 28, 52, 84, 127, 189, 269
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2021

Keywords

Comments

Row 1: A001950 (upper Wythoff sequence);
row 2: A283234;
row 3: A190508;
col 1: A020956.

Examples

			Corner:
    2,   5,   7,  10,  13,  15,  18,  20,  23, ...
    4,  10,  14,  20,  26,  30,  36,  40,  46, ...
    8,  18,  26,  36,  47,  55,  65,  73,  84, ...
   14,  31,  46,  63,  81,  96, 112, 127, 145, ...
   25,  53,  79, 107, 136, 162, 189, 215, 244, ...
   42,  88, 132, 178, 225, 269, 314, 358, 405, ...
   71, 146, 219, 294, 370, 443, 517, 590, 666, ...
   ...
		

Crossrefs

Programs

  • Mathematica
    z = 1000; r = N[(-1+Sqrt[5])/2];
    s[m_] := Range[z] r^m; t[0] = s[0];
    t[n_] := Sort[Union[s[n], t[n - 1]]]
    row[n_] := Flatten[Table[Position[t[n], N[k]], {k, 1, z}]]
    TableForm[Table[row[n], {n, 1, 10}]] (* A347068, array *)
    w[n_, k_] := row[n][[k]];
    Table[w[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* A347068, sequence *)

A215004 a(0) = a(1) = 1; for n>1, a(n) = a(n-1) + a(n-2) + floor(n/2).

Original entry on oeis.org

1, 1, 3, 5, 10, 17, 30, 50, 84, 138, 227, 370, 603, 979, 1589, 2575, 4172, 6755, 10936, 17700, 28646, 46356, 75013, 121380, 196405, 317797, 514215, 832025, 1346254, 2178293, 3524562, 5702870, 9227448, 14930334, 24157799, 39088150, 63245967, 102334135, 165580121
Offset: 0

Views

Author

Alex Ratushnyak, Jul 31 2012

Keywords

Comments

If the first two terms are {0,1}, we get A020956 except for the first term.
If the first two terms are {1,2}, we get A281362.

Crossrefs

Cf. A020956, except for first term: same formula, seed {0,1}.

Programs

  • Magma
    [Fibonacci(n+3)-(2*n+5-(-1)^n)/4: n in [0..40]]; // _G. C. Greubel, Feb 01 2018
    
  • Mathematica
    Table[((-1)^n - 2 n + 8 Fibonacci[n] + 4 LucasL[n] - 5)/4, {n, 0, 20}] (* Vladimir Reshetnikov, May 18 2016 *)
    RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-1]+a[n-2]+Floor[n/2]},a,{n,40}] (* or *) LinearRecurrence[{2,1,-3,0,1},{1,1,3,5,10},40] (* Harvey P. Dale, Jul 11 2020 *)
  • PARI
    Vec(-(x^3-x+1)/((x-1)^2*(x+1)*(x^2+x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2015
    
  • PARI
    a(n)=([0,1,0,0,0;0,0,1,0,0;0,0,0,1,0;0,0,0,0,1;1,0,-3,1,2]^n* [1;1;3;5;10])[1,1] \\ Charles R Greathouse IV, Jan 16 2017
    
  • Python
    prpr = prev = 1
    for n in range(2,100):
        print(prpr, end=', ')
        curr = prpr+prev + n//2
        prpr = prev
        prev = curr
    
  • SageMath
    [fibonacci(n+3) -(n+2+(n%2))//2 for n in range(41)] # G. C. Greubel, Apr 05 2024

Formula

From Colin Barker, Sep 16 2015: (Start)
a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5) for n>4.
G.f.: (1-x+x^3) / ((1-x)^2*(1+x)*(1-x-x^2)). (End)
a(n) = Fibonacci(n+3) - floor((n+3)/2). - Nathan Fox, Jan 27 2017
a(n) = (-3/4 + (-1)^n/4 + (2^(-n)*((1-t)^n*(-2+t) + (1+t)^n*(2+t)))/t + (-1-n)/2) where t=sqrt(5). - Colin Barker, Feb 09 2017
From G. C. Greubel, Apr 05 2024: (Start)
a(n) = Fibonacci(n+3) - (1/4)*(2*n + 5 - (-1)^n).
E.g.f.: 2*exp(x/2)*( cosh(sqrt(5)*x/2) + (2/sqrt(5))*sinh(sqrt(5)*x/2) ) - (1/2)*( (x+2)*cosh(x) + (x+3)*sinh(x) ). (End)

A277752 a(n) = Sum_{k=0..n} (-1)^k*floor(phi^k), where phi is the golden ratio (A001622).

Original entry on oeis.org

1, 0, 2, -2, 4, -7, 10, -19, 27, -49, 73, -126, 195, -326, 516, -848, 1358, -2213, 3564, -5785, 9341, -15135, 24467, -39612, 64069, -103692, 167750, -271454, 439192, -710659, 1149838, -1860511, 3010335, -4870861, 7881181, -12752058, 20633223, -33385298, 54018504, -87403820, 141422306
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 31 2016

Keywords

Comments

Alternating sum of A014217.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[(-1)^n Floor[GoldenRatio^n], {n, 0, 40}]]
    LinearRecurrence[{0, 3, -1, -2, 1}, {1, 0, 2, -2, 4}, 41]

Formula

G.f.: (1 - x^2 - x^3)/((1 - x)^2*(1 + 2*x - x^3)).
a(n) = 3*a(n-2) - a(n-3) - 2*a(n-4) + a(n-5).
a(n) = Sum_{k=0..n} (-1)^k*floor(Fibonacci(2k+3)/Fibonacci(k+3)).
a(n) = Sum_{k=0..n} (-1)^k*(L(k) - (1 + (-1)^k)/2), where L(k) is the Lucas numbers beginning at 2 (A000032).
a(n) = 2^(-n-2)*(9*2^n - 2^(n+1)*n - (-2)^n - 2*(1 + sqrt(5))*(sqrt(5) - 1)^n + 2*(sqrt(5) - 1)*(-1-sqrt(5))^n).
a(n) ~ (-1)^n*phi^(n-1).
a(n) = (-1)^n*Lucas(n-1) - (1/4)*(2*n -9 +(-1)^n). - G. C. Greubel, Oct 31 2016

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.