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.

Previous Showing 21-30 of 39 results. Next

A005592 a(n) = F(2n+1) + F(2n-1) - 1.

Original entry on oeis.org

1, 2, 6, 17, 46, 122, 321, 842, 2206, 5777, 15126, 39602, 103681, 271442, 710646, 1860497, 4870846, 12752042, 33385281, 87403802, 228826126, 599074577, 1568397606, 4106118242, 10749957121, 28143753122, 73681302246, 192900153617, 505019158606, 1322157322202
Offset: 0

Views

Author

Keywords

Comments

For any m, the maximum element in the continued fraction of F(2n+m)/F(m) is a(n). - Benoit Cloitre, Jan 10 2006
The continued fraction [a(n);1,a(n)-1,1,a(n)-1,...] = phi^(2n), where phi = 1.618... is the golden ratio, A001622. - Thomas Ordowski, Jun 07 2013
a(n) is the number of labeled subgraphs of the n-cycle C_n. For example, a(3)=17. There are 7 subgraphs of the triangle C_3 with 0 edges, 6 with 1 edge, 3 with 2 edges, and 1 with 3 edges (C_3 itself); here 7+6+3+1 = 17. - John P. McSorley, Oct 31 2016
a(n) equals the sum of the n-th row of triangle A277919. - John P. McSorley, Nov 25 2016

Examples

			G.f. = 1 + 2*x + 6*x^2 + 17*x^3 + 46*x^4 + 122*x^5 + 321*x^6 + 842*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals A004146+1 and A005248+1.
Bisection of A014217; the other bisection is A002878, which also bisects A000032.

Programs

  • Haskell
    a005592 n = a005592_list !! (n-1)
    a005592_list = map (subtract 1) $
                       tail $ zipWith (+) a001519_list $ tail a001519_list
    -- Reinhard Zumkeller, Aug 09 2013
  • Magma
    [Fibonacci(2*n+1)+Fibonacci(2*n-1)-1: n in [1..30]]; // Vincenzo Librandi, Aug 23 2011
    
  • Maple
    A005592:=-(2-2*z+z**2)/(z-1)/(z**2-3*z+1); # conjectured by Simon Plouffe in his 1992 dissertation
    # second Maple program:
    F:= n-> (<<0|1>, <1|1>>^n)[1,2]:
    a:= n-> F(2*n+1)+F(2*n-1)-1:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 04 2016
  • Mathematica
    Table[Fibonacci[2n+1]+Fibonacci[2n-1]-1,{n,30}] (* Harvey P. Dale, Aug 22 2011 *)
    a[n_] := LucasL[2n]-1; Array[a, 30] (* Jean-François Alcover, Dec 09 2015 *)
  • PARI
    a(n)=fibonacci(2*n+1)+fibonacci(2*n-1)-1 \\ Charles R Greathouse IV, Aug 23 2011
    
  • Sage
    [lucas_number2(n,3,1)-1 for n in range(1,29)] # Zerinvary Lajos, Jul 06 2008
    

Formula

a(n) = Lucas(2*n)-1, with Lucas(n)=A000032(n).
a(n) = floor(r^(2*n)), where r = golden ratio = (1+sqrt(5))/2.
a(n) = floor(Fibonacci(5*n)/Fibonacci(3*n)). - Gary Detlefs, Mar 11 2011
a(n) = +4*a(n-1) -4*a(n-2) +1*a(n-3). - Joerg Arndt, Mar 11 2011
a(n) = A001519(2*n-1) + A001519(2*n+1) - 1. - Reinhard Zumkeller, Aug 09 2013
a(n) = 3*a(n) - a(n-1) + 1; a(n) = A004146(n) + 1, n>0. - Richard R. Forberg, Sep 04 2013
a(n) = 2*cosh(2*n*arcsinh(1/2)) - 1. - Ilya Gutkovskiy, Oct 31 2016
a(n) = floor(sqrt(5)*Fibonacci(2*n)), for n > 0 (Seamons, 1966). - Amiram Eldar, Feb 05 2022

Extensions

Formulae and comments by Clark Kimberling, Nov 24 2010
a(0)=1 prepended by Alois P. Heinz, Nov 04 2016

A020956 a(n) = Sum_{k>=1} floor(tau^(n-k)) where tau is A001622.

Original entry on oeis.org

1, 2, 4, 8, 14, 25, 42, 71, 117, 193, 315, 514, 835, 1356, 2198, 3562, 5768, 9339, 15116, 24465, 39591, 64067, 103669, 167748, 271429, 439190, 710632, 1149836, 1860482, 3010333, 4870830, 7881179, 12752025, 20633221, 33385263, 54018502, 87403783, 141422304
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,2,4,8,14]; [n le 5 select I[n] else 2*Self(n-1)+Self(n-2)-3*Self(n-3)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Nov 01 2016
    
  • Magma
    [Lucas(n+1)-(2*n+5-(-1)^n)/4: n in [1..40]]; // G. C. Greubel, Apr 05 2024
    
  • Mathematica
    LinearRecurrence[{2,1,-3,0,1}, {1,2,4,8,14}, 40] (* Vincenzo Librandi, Nov 01 2016 *)
  • PARI
    Vec(x*(1-x^2+x^3)/((1-x-x^2)*(1+x)*(1-x)^2) + O(x^50)) \\ Michel Marcus, Nov 01 2016
    
  • Python
    prpr = 0
    prev = 1
    for n in range(2,100):
        print(prev, end=", ")
        curr = prpr+prev + n//2
        prpr = prev
        prev = curr
    # Alex Ratushnyak, Jul 30 2012
    
  • SageMath
    [lucas_number2(n+1,1,-1) -(n+2+(n%2))//2 for n in range(1,41)] # G. C. Greubel, Apr 05 2024

Formula

G.f.: x*(1-x^2+x^3)/((1-x-x^2)*(1+x)*(1-x)^2). - Ralf Stephan, Apr 08 2004
a(n) = Lucas(n+1) - floor(n/2) - 1.
a(n) = Sum_{k=0..n-1} A014217(k).
a(n) = 2^(-2-n)*((-2)^n - 5*2^n + 2*(1-t)^(1+n) + 2*(1+t)^n + 2*t*(1+t)^n - 2^(1+n)*n) where t=sqrt(5). - Colin Barker, Feb 09 2017
From G. C. Greubel, Apr 05 2024: (Start)
a(n) = Lucas(n+1) - (1/4)*(2*n + 5 - (-1)^n).
E.g.f.: exp(x/2)*(cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2)) - (1/2)*((x+2)*cosh(x) + (x+3)*sinh(x)). (End)

Extensions

More terms from Vladeta Jovovic, Apr 04 2002

A169986 Ceiling(phi^n) where phi = (1+sqrt(5))/2.

Original entry on oeis.org

1, 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

N. J. A. Sloane, Sep 26 2010

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [3*Fibonacci(n-1) + Fibonacci(n-2)+ n mod 2: n in [1..40]]; // Vincenzo Librandi, Apr 16 2015
    
  • Mathematica
    Ceiling[GoldenRatio^Range[0,40]] (* or *) Join[{1},LinearRecurrence[{1,2,-1,-1},{2,3,5,7},40]] (* Harvey P. Dale, Nov 12 2014 *)
  • PARI
    a(n)=if(n, 3*fibonacci(n-1) + fibonacci(n-2) + n%2, 1) \\ Charles R Greathouse IV, Apr 16 2015
  • Sage
    [ceil(golden_ratio^n) for n in range(37)] # Danny Rorabaugh, Apr 16 2015
    

Formula

For n >= 5, a(n) = a(n-1) + 2a(n-2) - a(n-3) - a(n-4). - Charles R Greathouse IV, Oct 14 2010
a(n) = 3*Fibonacci(n-1) + Fibonacci(n-2) + (n mod 2), n>0. - Gary Detlefs, Dec 29 2010
G.f.: (-x+x^2+x^3+x^4-1) / ((1-x)*(1+x)*(x^2+x-1)). - R. J. Mathar, Jan 06 2011
a(2k) = A000032(2k) = A169985(2k) and a(2k+1) = A000032(2k+1)+1 = A169985(2k+1)+1, for k>0. - Danny Rorabaugh, Apr 15 2015

A128440 Array T(n,k) = floor(k*t^n) where t = golden ratio = (1 + sqrt(5))/2, read by descending antidiagonals.

Original entry on oeis.org

1, 3, 2, 4, 5, 4, 6, 7, 8, 6, 8, 10, 12, 13, 11, 9, 13, 16, 20, 22, 17, 11, 15, 21, 27, 33, 35, 29, 12, 18, 25, 34, 44, 53, 58, 46, 14, 20, 29, 41, 55, 71, 87, 93, 76, 16, 23, 33, 47, 66, 89, 116, 140, 152, 122, 17, 26, 38, 54, 77, 107, 145, 187, 228, 245, 199
Offset: 1

Views

Author

Clark Kimberling, Mar 03 2007

Keywords

Comments

Row 1 = Lower Wythoff sequence = A000201; Row 2 = Upper Wythoff sequence = A001950; Column 1 = A014217 (after first term); T(n,n) = A128440(n). Every positive integer occurs exactly once in the first two rows.
Conjecture: rows 2n-1 and 2n are disjoint for every positive integer n. - Clark Kimberling, Nov 11 2022
Stronger conjecture: for any positive integer n, if the numbers in rows 2n-1 and 2n are jointly arranged in increasing order, and each number is replaced by its position in the ordering, then the resulting two rows are identical to the first two rows. - Clark Kimberling, Nov 13 2022

Examples

			Corner:
   1    3    4    6    8    9   11   12
   2    5    7   10   13   15   18   20
   4    8   12   16   21   25   29   33
   6   13   20   27   34   41   47   54
  11   22   33   44   55   66   77   88
  17   35   53   71   89  107  125  143
  29   58   87  116  145  174  203  232
  46   93  140  187  234  281  328  375
		

Crossrefs

Programs

  • Mathematica
    r = (1 + Sqrt[5])/2; t[k_, n_] := Floor[n*r^k];
    Grid[Table[t[k, n], {k, 1, 10}, {n, 1, 20}]]
    (* Clark Kimberling, Nov 11 2022 *)
  • PARI
    T(n,k) = floor(k*quadgen(5)^n);
    matrix(7, 7, n, k, T(n,k)) \\ Michel Marcus, Nov 14 2022

Formula

T(k,n) = k*F(n-1) + floor(k*t*F(n)), where F=A000045, the Fibonacci numbers.

A001674 a(n) = floor(sqrt( 2*Pi )^n).

Original entry on oeis.org

1, 2, 6, 15, 39, 98, 248, 621, 1558, 3906, 9792, 24546, 61528, 154230, 386597, 969056, 2429063, 6088760, 15262258, 38256809, 95895600, 240374623, 602529828, 1510318305, 3785806567, 9489609784, 23786924200, 59624976768, 149457652641, 374634777972
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A001674 (ceiling sqrt(2 Pi)^n), A017910 (floor sqrt(2)^n), A000149 (floor e^n), A001672 (floor Pi^n), A062541 (floor (Pi*e)^n), A121831 (floor (Pi+e)^n), A032739 (floor (Pi/e)^n), A014217 (floor ((1+sqrt(5))/2)^n).

Programs

  • Mathematica
    Table[Floor[Sqrt[2*Pi]^n], {n, 0, 50}] (* T. D. Noe, Aug 09 2012 *)
  • PARI
    a(n)=(2*Pi)^(n/2)\1 \\ M. F. Hasler, May 29 2018

Extensions

Edited by M. F. Hasler, May 29 2018

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

A122958 a(0)=1, a(n) = 2 - 2^(n-1) for n>0.

Original entry on oeis.org

1, 1, 0, -2, -6, -14, -30, -62, -126, -254, -510, -1022, -2046, -4094, -8190, -16382, -32766, -65534, -131070, -262142, -524286, -1048574, -2097150, -4194302, -8388606, -16777214, -33554430, -67108862, -134217726, -268435454, -536870910, -1073741822, -2147483646
Offset: 0

Views

Author

Philippe Deléham, Oct 26 2006

Keywords

Comments

Take square of A014217 (1,1,2,4,6) and successive differences: a(n) is principal diagonal (k-th term of k-th row). a(n) differences: 0, -1, -2, -4, -8, -16, ... = -A131577. - Paul Curtz, Sep 26 2008

Examples

			G.f. = 1 + x - 2*x^3 - 6*x^4 - 14*x^5 - 30*x^6 - 62*x^7 - 126*x^8 - 254*x^9 + ...
		

Crossrefs

Apart from signs, same as A000918.
Cf. A131577.

Programs

Formula

a(0) = 1, a(1) = 1, a(2) = 0, a(n) = 3*a(n-1) - 2*a(n-2) for n>2.
G.f.: (1 - 2*x - x^2)/(1 - 3*x + 2*x^2).
a(n) = -A000918(n-1) for n>0.
a(n+1) = 2*a(n) - 2 for n>0. - Michael Somos, Feb 08 2015
E.g.f.: exp(x)*(2 - cosh(x)). - Stefano Spezia, May 07 2023

Extensions

Corrected a(22) by Vincenzo Librandi, Aug 11 2011

A152738 a(n) = floor((n^2)/phi).

Original entry on oeis.org

0, 0, 2, 5, 9, 15, 22, 30, 39, 50, 61, 74, 88, 104, 121, 139, 158, 178, 200, 223, 247, 272, 299, 326, 355, 386, 417, 450, 484, 519, 556, 593, 632, 673, 714, 757, 800, 846, 892, 940, 988, 1038, 1090, 1142, 1196, 1251, 1307, 1365, 1423, 1483, 1545, 1607, 1671
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    phi:=(1+Sqrt(5))/2; [Floor(n^2/phi): n in [0..30]]; // G. C. Greubel, Sep 01 2018
  • Mathematica
    a[n_]:=Floor[(n^2)/GoldenRatio];
  • PARI
    a(n)=n^2\((1+sqrt(5))/2) \\ Charles R Greathouse IV, Jul 29 2011
    

Extensions

Offset corrected by B. D. Swan, Jan 03 2009

A156279 4 times the Lucas number A000032(n).

Original entry on oeis.org

8, 4, 12, 16, 28, 44, 72, 116, 188, 304, 492, 796, 1288, 2084, 3372, 5456, 8828, 14284, 23112, 37396, 60508, 97904, 158412, 256316, 414728, 671044, 1085772, 1756816, 2842588, 4599404, 7441992
Offset: 0

Views

Author

Paul Curtz, Feb 07 2009

Keywords

Comments

This is a second kind "autosequence" whose first kind companion is A022087. - Jean-François Alcover, Aug 20 2022

Crossrefs

Programs

Formula

a(n) = 4*A000032(n).
a(n) = a(n-1) + a(n-2).
a(n) = A014217(n+3) - A014217(n-3), with A014217(-5) = -11, A014217(-4) = 6, A014217(-3) = -4, A014217(-2) = 2, A014217(-1) = -1 extended as proposed in A153263.
G.f. 4*(-2 + x) / (-1 + x + x^2). - R. J. Mathar, Mar 11 2011
a(n) = Lucas(n+3) - Lucas(n-3), where Lucas(i) for i = 0..2 gives -4, 3, -1. - Bruno Berselli, Jul 27 2017

A181716 a(n) = a(n-1) + a(n-2) + (-1)^n, with a(0)=0 and a(1)=1.

Original entry on oeis.org

0, 1, 2, 2, 5, 6, 12, 17, 30, 46, 77, 122, 200, 321, 522, 842, 1365, 2206, 3572, 5777, 9350, 15126, 24477, 39602, 64080, 103681, 167762, 271442, 439205, 710646, 1149852, 1860497, 3010350, 4870846, 7881197, 12752042, 20633240, 33385281, 54018522, 87403802
Offset: 0

Views

Author

Robert G. Wilson v, Nov 07 2010

Keywords

Comments

Aside from the first term, duplicate of A098600.

Crossrefs

First differences of A014217.

Programs

  • Magma
    I:=[0, 1, 2]; [n le 3 select I[n] else 2*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jan 09 2012
    
  • Magma
    [Lucas(n-1)+(-1)^n: n in [0..40]]; // G. C. Greubel, Mar 25 2024
    
  • Mathematica
    a[0]= 0; a[1]= 1; a[n_]:= a[n]= a[n-1] +a[n-2] +(-1)^n; Array[a,38,0]
    LinearRecurrence[{0,2,1},{0,1,2},40] (* Vincenzo Librandi, Jan 09 2012 *)
  • SageMath
    [lucas_number2(n-1,1,-1)+(-1)^n for n in range(41)] # G. C. Greubel, Mar 25 2024

Formula

a(n) = a(n-1) + a(n-2) + (-1)^n.
a(n) = 2*a(n-2) + a(n-3).
a(n) - A000045(n) = A008346(n-2).
G.f.: x*(1+2*x)/(1-2*x^2-x^3). - Colin Barker, Jan 09 2012
a(n) = A000032(n-1) + (-1)^n. - G. C. Greubel, Mar 25 2024
E.g.f.: exp(x/2)*(sqrt(5)*sinh(sqrt(5)*x/2) - cosh(sqrt(5)*x/2)) + exp(-x). - Stefano Spezia, Jun 18 2024
Previous Showing 21-30 of 39 results. Next