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-10 of 13 results. Next

A061593 Number of ways to place 2n nonattacking kings on a 4 X 2n chessboard.

Original entry on oeis.org

12, 79, 408, 1847, 7698, 30319, 114606, 419933, 1501674, 5266069, 18174084, 61892669, 208424880, 695179339, 2299608732, 7552444115, 24648046806, 79994460139, 258339007890, 830619734681, 2660070154542, 8488515938929, 27000079296648, 85629004867577
Offset: 1

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 22 2001

Keywords

Crossrefs

Column k=2 of A350819.

Programs

  • Magma
    [(17*n-109)*3^n+2*Fibonacci(2*n+10): n in [1..30]]; // Vincenzo Librandi, Jul 12 2011
  • Maple
    with(combinat): A061593:=n->(17*n-109)*3^n+2*fibonacci(2*n+10): seq(A061593(n), n=1..30); # Wesley Ivan Hurt, Nov 08 2014
  • Mathematica
    Table[(17 n - 109)*3^n + 2 Fibonacci[2 n + 10], {n, 30}] (* Wesley Ivan Hurt, Nov 08 2014 *)
    CoefficientList[Series[x (12-29x+33x^2-9x^3)/((1-3x+x^2)(1-3x)^2),{x,0,30}],x] (* or *) LinearRecurrence[{9,-28,33,-9},{0,12,79,408,1847},30] (* Harvey P. Dale, Dec 20 2021 *)

Formula

G.f.: x*(12-29*x+33*x^2-9*x^3)/((1-3*x+x^2)*(1-3*x)^2).
a(n) = 9*a(n-1) - 28*a(n-2) + 33*a(n-3) - 9*a(n-4); a(1)=12, a(2)=79, a(3)=408, a(4)=1847.
a(n) = (17*n-109)*3^n + 2*Fibonacci(2*n+10).
a(n) = 17*A027471(n+2) - 126*A000244(n) + A025169(n+4).

A218064 T(n,k) = Number of n X k arrays of the minimum value of corresponding elements and their horizontal or antidiagonal neighbors in a random 0..1 n X k array.

Original entry on oeis.org

2, 2, 4, 4, 6, 8, 6, 18, 16, 16, 10, 42, 74, 42, 32, 16, 108, 260, 308, 110, 64, 26, 268, 1046, 1664, 1282, 288, 128, 42, 676, 3974, 10246, 10566, 5338, 754, 256, 68, 1694, 15578, 60804, 99934, 66978, 22228, 1974, 512, 110, 4258, 60242, 368220, 925904, 975296
Offset: 1

Views

Author

R. H. Hardin Oct 19 2012

Keywords

Comments

Table starts
....2.....2........4..........6...........10..............16................26
....4.....6.......18.........42..........108.............268...............676
....8....16.......74........260.........1046............3974.............15578
...16....42......308.......1664........10246...........60804............368220
...32...110.....1282......10566........99934..........925904...........8679594
...64...288.....5338......66978.......975296........14096488.........204211050
..128...754....22228.....424332......9519284.......214514380........4803404048
..256..1974....92562....2687866.....92918894......3263893360......112984025006
..512..5168...385450...17025060....907013406.....49658510202.....2657601417086
.1024.13530..1605108..107835994...8853740672....755518606946....62512388662498
.2048.35422..6684066..683025864..86425318934..11494629017172..1470427119098160
.4096.92736.27834106.4326234664.843636853718.174881679122376.34587669928567490

Examples

			Some solutions for n=3, k=4
..1..0..0..0....0..0..1..0....1..1..1..1....0..0..0..0....1..0..0..0
..1..0..1..0....0..0..0..0....1..1..0..0....1..1..0..0....0..0..0..0
..0..0..0..0....1..0..0..1....1..0..0..0....0..0..0..0....1..1..0..1
		

Crossrefs

Column 2 is A025169(n-1).
Row 1 is A006355(n+1).

A232335 T(n,k)=Number of nXk 0..2 arrays with every 0 next to a 1 and every 1 next to a 2 horizontally or antidiagonally, with no adjacent elements equal.

Original entry on oeis.org

1, 2, 1, 4, 6, 1, 6, 18, 16, 1, 10, 32, 74, 42, 1, 16, 82, 154, 308, 110, 1, 26, 162, 628, 734, 1282, 288, 1, 42, 388, 1470, 4906, 3472, 5338, 754, 1, 68, 806, 5530, 13170, 38986, 16338, 22228, 1974, 1, 110, 1858, 13906, 82526, 117690, 312276, 76630, 92562, 5168
Offset: 1

Views

Author

R. H. Hardin, Nov 22 2013

Keywords

Comments

Table starts
.1.....2.......4.......6.........10.........16............26............42
.1.....6......18......32.........82........162...........388...........806
.1....16......74.....154........628.......1470..........5530.........13906
.1....42.....308.....734.......4906......13170.........82526........239992
.1...110....1282....3472......38986.....117690.......1274656.......4158066
.1...288....5338...16338.....312276....1047700......20052758......71916112
.1...754...22228...76630....2510674....9298730.....318521414....1241196022
.1..1974...92562..358656...20221026...82332898....5084744564...21383016966
.1..5168..385450.1676330..162993780..727588212...81376107850..367791626696
.1.13530.1605108.7828014.1314329242.6419787202.1303994749578.6317140944234

Examples

			Some solutions for n=5 k=4
..2..1..0..1....2..1..2..1....2..1..0..2....1..2..0..2....2..1..0..1
..0..1..2..0....0..1..2..0....0..2..1..0....0..1..0..1....2..1..2..1
..2..0..1..0....2..0..1..0....1..2..1..0....2..1..2..1....2..1..0..2
..1..2..1..2....1..2..1..2....1..2..1..0....0..1..0..2....0..2..1..2
..1..0..1..0....1..2..1..0....1..0..2..1....2..1..0..2....1..0..1..2
		

Crossrefs

Column 2 is A025169(n-1)
Column 3 is A218059
Row 1 is A006355(n+1)

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = 3*a(n-1) -a(n-2)
k=3: a(n) = 5*a(n-1) -3*a(n-2) -2*a(n-3)
k=4: a(n) = 7*a(n-1) -9*a(n-2) -8*a(n-3) -4*a(n-4)
k=5: a(n) = 11*a(n-1) -21*a(n-2) -20*a(n-3) -12*a(n-4) for n>5
k=6: [order 7] for n>9
k=7: [order 16] for n>18
Empirical for row n:
n=1: a(n) = a(n-1) +a(n-2) for n>3
n=2: a(n) = a(n-1) +3*a(n-2) -a(n-3) +a(n-4) -a(n-5) for n>6
n=3: [order 8] for n>12
n=4: [order 21] for n>24
n=5: [order 36] for n>42
n=6: [order 80] for n>87

A052995 Expansion of 2*x*(1 - x)/(1 - 3*x + x^2).

Original entry on oeis.org

0, 2, 4, 10, 26, 68, 178, 466, 1220, 3194, 8362, 21892, 57314, 150050, 392836, 1028458, 2692538, 7049156, 18454930, 48315634, 126491972, 331160282, 866988874, 2269806340, 5942430146, 15557484098, 40730022148, 106632582346, 279167724890, 730870592324
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Terms >=4 give solutions x to floor(phi^2*x^2) - floor(phi*x)^2 = 5, where phi =(1 + sqrt(5))/2. - Benoit Cloitre, Mar 16 2003
Except for the first term, positive values of x (or y) satisfying x^2 - 18*x*y + y^2 + 256 = 0. - Colin Barker, Feb 14 2014
a(n+1) is the square of the distance AB, where A is the point (F(n), F(n+1)), B is the 90-degree rotation of A about the origin, and F(n)=A000045(n) are the Fibonacci numbers. - Burak Muslu, Mar 24 2021

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 30.
  • B. Muslu, Sayılar ve Bağlantılar 2, Luna, 2021, pages 60-61.

Crossrefs

Bisection of A006355.
First differences of A025169.

Programs

  • Maple
    spec := [S, S=Prod(Sequence(Union(Prod(Sequence(Z),Z),Z)),Union(Z,Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
  • Mathematica
    LinearRecurrence[{3, -1}, {0, 2, 4}, 30] (* or *)
    Nest[Append[#, 3 #[[-1]] - #[[-2]]] &, {0, 2, 4}, 27] (* or *)
    CoefficientList[Series[-2 x (-1 + x)/(1 - 3 x + x^2), {x, 0, 29}], x] (* Michael De Vlieger, Jul 18 2018 *)
  • PARI
    concat(0, Vec(2*x*(1-x)/(1-3*x+x^2) + O(x^50))) \\ Colin Barker, Mar 30 2016
    
  • PARI
    a(n) = fibonacci(max(0,2*n-1))<<1; \\ Kevin Ryde, Mar 25 2021

Formula

G.f.: -2*x*(-1 + x)/(1 - 3*x + x^2).
a(0) = 0, a(1) = 2, a(2) = 4; for n > 0, a(n) - 3*a(n+1) + a(n+2) = 0.
a(n) = A069403(n-1)+1.
a(n) = Sum(2/5*(-1 + 4*_alpha)*_alpha^(-1-n), _alpha = RootOf(_Z^2 - 3*_Z + 1)).
a(n) = 2*Fibonacci(2*n-1) = 2*A001519(n) for n > 0. - Vladeta Jovovic, Mar 19 2003
a(n+2) = F(n)^2 + F(n+3)^2 = 2*F(n+1)^2 + 2*F(n+2)^2, where F = A000045. - N. J. A. Sloane, Feb 20 2005
a(n) = 1/2*(F(2*n+8) mod F(2*n+2)) for n > 2. - Gary Detlefs, Nov 22 2010
a(n) = F(n-3)*F(n-1) + F(n)*F(n+2) for n > 0, F(-2) = -1, F(-1) = 1. - Bruno Berselli, Nov 03 2015
a(n) = (2^(-n)*((3 - sqrt(5))^n*(1 + sqrt(5)) + (-1 + sqrt(5))*(3 + sqrt(5))^n))/sqrt(5) for n > 0. - Colin Barker, Mar 30 2016
a(n) = Fibonacci(2*n-2) + Lucas(2*n-2) for n > 0. - Bruno Berselli, Oct 13 2017
a(n) = Lucas(2*n) - Fibonacci(2*n) for n > 0. - Diego Rattaggi, Mar 08 2023

Extensions

More terms from James Sellers, Jun 05 2000

A054486 Expansion of (1+2*x)/(1-3*x+x^2).

Original entry on oeis.org

1, 5, 14, 37, 97, 254, 665, 1741, 4558, 11933, 31241, 81790, 214129, 560597, 1467662, 3842389, 10059505, 26336126, 68948873, 180510493, 472582606, 1237237325, 3239129369, 8480150782, 22201322977, 58123818149, 152170131470, 398386576261, 1042989597313
Offset: 0

Views

Author

Barry E. Williams, May 06 2000

Keywords

Comments

Binomial transform of A000285. - R. J. Mathar, Oct 26 2011

Examples

			G.f. = 1 + 5*x + 14*x^2 + 37*x^3 + 97*x^4 + 254*x^5 + 665*x^6 + 1741*x^7 + ...
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 122-125, 194-196.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..30], n-> F(2*n+2) +2*F(2*n) ); # G. C. Greubel, Nov 08 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+2*x)/(1-3*x+x^2)) ); // Marius A. Burtea, Nov 05 2019
    
  • Magma
    a:=[1,5]; [n le 2 select a[n] else 3*Self(n-1)-Self(n-2): n in [1..30]]; // Marius A. Burtea, Nov 05 2019
    
  • Maple
    with(combinat); f:=fibonacci; seq(f(2*n+2)+2*f(2*n), n=0..30); # G. C. Greubel, Nov 08 2019
  • Mathematica
    CoefficientList[Series[(2*z+1)/(z^2-3*z+1), {z, 0, 30}], z] (* Vladimir Joseph Stephan Orlovsky, Jul 15 2011 *)
    a[ n_]:= 3 Fibonacci[2n] + Fibonacci[2n+1]; (* Michael Somos, Mar 17 2015 *)
    LinearRecurrence[{3,-1},{1,5},40] (* Harvey P. Dale, Apr 24 2019 *)
  • PARI
    Vec((1+2*x)/(1-3*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    {a(n) = 3*fibonacci(2*n) + fibonacci(2*n+1)}; /* Michael Somos, Mar 17 2015 */
    
  • Sage
    f=fibonacci; [f(2*n+2) +2*f(2*n) for n in (0..30)] # G. C. Greubel, Nov 08 2019
    

Formula

a(n) = 3*a(n-1) - a(n-2), a(0)=1, a(1)=5.
a(n) = (5*(((3+sqrt(5))/2)^n - ((3-sqrt(5))/2)^n) - (((3+sqrt(5))/2)^(n-1) - ((3-sqrt(5))/2)^(n-1)))/sqrt(5).
a(n) + 7*A001519(n) = A005248(n). - Creighton Dement, Oct 30 2004
a(n) = Lucas(2*n+1) + Fibonacci(2*n) = A002878(n) + A001906(n) = A025169(n-1) + A001906(n+1).
a(n) = (-1)^n*Sum_{k = 0..n} A238731(n,k)*(-6)^k. - Philippe Deléham, Mar 05 2014
0 = -11 + a(n)^2 - 3*a(n)*a(n+1) + a(n+1)^2 for all n in Z. - Michael Somos, Mar 17 2015
a(n) = -2*F(n)^2 + 6*F(n)*F(n+1) + F(n+1)^2 for all n in Z where F = Fibonacci. - Michael Somos, Mar 17 2015
a(n) = 3*F(2*n) + F(2*n+1) for all n in Z where F = Fibonacci. - Michael Somos, Mar 17 2015
a(n) = -A100545(-2-n) for all n in Z. - Michael Somos, Mar 17 2015
a(n) = A000285(2*n) = A228208(2*n+1) = A104449(2*n+1) for all n in Z. - Michael Somos, Mar 17 2015
From Klaus Purath, Nov 05 2019: (Start)
a(n) = (a(n-m) + a(n+m))/Lucas(2*m), m <= n.
a(n) = sum of 2*m+1 consecutive terms starting with a(n-m) divided by Lucas(2*m+1), m <= n.
a(n) = alternating sum of 2*m+1 consecutive terms starting with a(n-m) divided by Fibonacci(2*m+1), m <= n.
a(n) + a(n+1) = sum of 2*m+2 consecutive terms starting with a(n-m) divided by Fibonacci(2*m+2), m <= n.
a(n) + a(n+1) = (a(n-m) + a(n+m+1))/Fibonacci(2*m+1), m <= n.
The following formulas are extended to negative indexes:
a(n) = 3*Fibonacci(2*n+1) - Fibonacci(2*n-3).
a(n) = (Fibonacci(2*n+5) - 3* Fibonacci(2*n-1))/2.
a(n) = (4*Lucas(2*n+2) - Lucas(2*n-4))/5.
a(n) = Fibonacci(2*n+5) - 4*Fibonacci(2*n+1).
a(n) = (5*Fibonacci(2*n+5) - Fibonacci(2*n-7))/12. (End)
E.g.f.: exp(-(1/2)*(-3+sqrt(5))*x)*(-7 + sqrt(5) + (7 + sqrt(5))*exp(sqrt(5)*x))/(2*sqrt(5)). - Stefano Spezia, Nov 19 2019
a(n) = 3*n + 1 + Sum_{k=1..n} k*a(n-k). - Yu Xiao, Jun 20 2020

Extensions

"a(1)=5", not "a(0)=5" from Dan Nielsen (nielsed(AT)uah.edu), Sep 10 2009

A038150 Array of numbers used in exotic ternary numeration system, read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 11, 16, 21, 7, 14, 29, 42, 55, 9, 19, 37, 76, 110, 144, 10, 24, 50, 97, 199, 288, 377, 12, 27, 63, 131, 254, 521, 754, 987, 13, 32, 71, 165, 343, 665, 1364, 1974, 2584, 15, 35, 84, 186, 432, 898, 1741, 3571, 5168, 6765, 17, 40, 92, 220, 487
Offset: 0

Views

Author

Keywords

Examples

			Top left corner of array:
  1,  3,  8, 21,  55, ...
  2,  6, 16, 42, 110, ...
  4, 11, 29, 76, 199, ...
  5, 14, 37, 97, 254, ...
		

Crossrefs

Rows give A001906, A025169, A002878.
Columns give A026351, A047924, A047925.
Main diagonal gives A047923.

Programs

  • Mathematica
    t[n_, 1] := Floor[(n - 1) GoldenRatio] + 1; t[n_, j_] := Floor[ GoldenRatio^2 t[n, j - 1]] + 1; Table[ t[n - m + 1, m], {n, 11}, {m, n}] // Flatten (* Birkas Gyorgy, Apr 15 2011; modified by Robert G. Wilson v, Apr 15 2011 *)

Formula

For n >= 0, A_0^n is the least nonnegative integer not in {A_j^n: 0 <= i < n, j >= 0, A_1^n = 2A_0^n + n, A_j^n = 3A_{j-1}^n - A_{j-2}^n (j >= 2).
a(n,k) = F(2k)*n + F(2k+1)*A026351(n). - Charlie Neder, Feb 07 2019

Extensions

More terms from Naohiro Nomoto, Jun 07 2001

A111282 Number of permutations avoiding the patterns {1432,2431,3412,3421,4132,4231,4312,4321}; number of strong sorting class based on 1432.

Original entry on oeis.org

1, 2, 6, 16, 42, 110, 288, 754, 1974, 5168, 13530, 35422, 92736, 242786, 635622, 1664080, 4356618, 11405774, 29860704, 78176338, 204668310, 535828592, 1402817466, 3672623806, 9615053952, 25172538050, 65902560198, 172535142544
Offset: 1

Views

Author

Len Smiley, Nov 01 2005

Keywords

Comments

a(n-1) is the sum, over all Boolean n-strings, of the product of the lengths of the runs. For example, the Boolean 7-string (0,1,1,0,1,1,1) has four runs, whose lengths are 1,2,1 and 3, contributing a product of 6 to a(6). The 4 Boolean 2-strings contribute to a(3) as follows: 00 and 11 both contribute 2 and 01 and 10 both contribute 1. - David Callan, Jul 22 2008
a(n) = A025169(n-2) for n > 1. - Reinhard Zumkeller, Apr 08 2012
The sequence 0, 2, 0, 0, 1, 2, 6, 16, 42, 110, 288, 754, 1974, ... with g.f. H(x) = 2*x+(x^4-x^5+x^6)/(1-3*x+x^2) is the number of "splitted indecomposable weakly threshold graphs" on n nodes [Barrus, 2016]. - N. J. A. Sloane, Jul 25 2017
Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {2>1, 2>4} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the second element is larger than the first and fourth elements. - Sergey Kitaev, Dec 09 2020

Examples

			x + 2*x^2 + 6*x^3 + 16*x^4 + 42*x^5 + 110*x^6 + 288*x^7 + ...
		

Programs

  • Haskell
    a111282 n = a111282_list !! (n-1)
    a111282_list = 1 : a025169_list
    -- Reinhard Zumkeller, Apr 08 2012
  • Mathematica
    a[1] = 1; a[2] = 2; a[3] = 6; a[n_] := a[n] = 3a[n - 1] - a[n - 2]; Table[a[n], {n, 28}] (* Robert G. Wilson v *)

Formula

a(n) = 3a(n-1) - a(n-2), n > 3.
a(n) = A025169(n-2), n > 1. - R. J. Mathar, Aug 18 2008
From Paul Barry, Oct 13 2009: (Start)
G.f.: (1 - x + x^2)/(1 - 3x + x^2).
a(n) = F(2n+1) + F(2n-2) + 0^n. (End)

A133586 Expansion of x*(1+2*x)/( (x^2-x-1)*(x^2+x-1) ).

Original entry on oeis.org

1, 2, 3, 6, 8, 16, 21, 42, 55, 110, 144, 288, 377, 754, 987, 1974, 2584, 5168, 6765, 13530, 17711, 35422, 46368, 92736, 121393, 242786, 317811, 635622, 832040, 1664080, 2178309, 4356618, 5702887, 11405774, 14930352, 29860704, 39088169, 78176338, 102334155
Offset: 1

Views

Author

Gary W. Adamson, Sep 18 2007

Keywords

Comments

For n>1 A133585(n) + a(n) = A000032(n+1).

Examples

			a(5) = F(6) = 8.
a(6) = 2*a(5) = 2*8 = 16.
		

Crossrefs

Cf. A001906 (bisection), A025169 (bisection), A000032, A133586.

Programs

  • Maple
    A133586aux := proc(n,k)
        add(A133080(n,j)*A133566(j,k),j=k..n) ;
    end proc:
    A000045 := proc(n)
        combinat[fibonacci](n) ;
    end proc:
    A133586 := proc(n)
        add(A133586aux(n,j)*A000045(j),j=0..n) ;
    end proc: # R. J. Mathar, Jun 20 2015
  • Mathematica
    CoefficientList[Series[(1 + 2 x)/((x^2 - x - 1) (x^2 + x - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 21 2015 *)
    LinearRecurrence[{0,3,0,-1},{1,2,3,6},40] (* Harvey P. Dale, Dec 10 2017 *)
  • PARI
    {a(n) = if( n%2, fibonacci(n+1), 2*fibonacci(n))}; /* Michael Somos, Jun 20 2015 */
    
  • PARI
    Vec(x*(1+2*x)/((x^2-x-1)*(x^2+x-1)) + O(x^50)) \\ Colin Barker, Mar 28 2016

Formula

Equals A133080 * A133566 * A000045, where A133080 and A133566 are infinite lower triangular matrices and the Fibonacci sequence as a vector (previous definition).
For odd-indexed terms, a(n) = F(n+1). For even-indexed terms, a(n) = 2*a(n-1).
For n>1 A133585(n) + a(n) = A000032(n+1).
a(n) = A147600(n) + 2*A147600(n-1). - R. J. Mathar, Jun 20 2015
a(n) = (2^(-2-n)*((1-sqrt(5))^n*(-5+sqrt(5)) - (-1-sqrt(5))^n*(-3+sqrt(5)) - (-1+sqrt(5))^n*(3+sqrt(5)) + (1+sqrt(5))^n*(5+sqrt(5))))/sqrt(5). - Colin Barker, Mar 28 2016

Extensions

New definition and A-number in previous definition corrected by R. J. Mathar, Jun 20 2015

A140833 Sum of Fibonacci numbers between F(-n)....F(n), inclusive.

Original entry on oeis.org

0, 2, 2, 6, 6, 16, 16, 42, 42, 110, 110, 288, 288, 754, 754, 1974, 1974, 5168, 5168, 13530, 13530, 35422, 35422, 92736, 92736, 242786, 242786, 635622, 635622, 1664080, 1664080, 4356618, 4356618, 11405774, 11405774, 29860704, 29860704, 78176338, 78176338
Offset: 0

Views

Author

Carey W. Strutz (cwstrutz(AT)excite.com), Jul 18 2008

Keywords

Comments

a(2n)/a(2n+1) converges to ((((sqrt 5)-1)/2)^2).

Examples

			a(3) = 2+(-1)+1+0+1+1+2=6.
G.f. = 2*x + 2*x^2 + 6*x^3 + 6*x^4 + 16*x^5 + 16*x^6 + 42*x^7 + ...
		

Crossrefs

Programs

  • Maple
    a:= n-> 2*(<<0|1>, <1|1>>^(ceil(n/2)*2))[1,2]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Nov 02 2016
  • Mathematica
    a[ n_] := 2 Fibonacci[ n + Mod[n, 2]]; (* Michael Somos, Nov 01 2016 *)
    LinearRecurrence[{0,3,0,-1},{0,2,2,6},50] (* Harvey P. Dale, Aug 07 2022 *)
  • PARI
    {a(n) = 2 * fibonacci(n + n%2)}; /* Michael Somos, Nov 01 2016 */

Formula

a(2n-1) = a(2n).
a(n) = 3*a(n-2) - a(n-4).
G.f.: 2x(1+x)/((1-x-x^2)(1+x-x^2)). a(n)=2*A094966(n) = A000045(n+2)-A039834(n-1). - R. J. Mathar, Oct 30 2008
a(n) = -a(-1-n) for all n in Z. - Michael Somos, Nov 01 2016
a(n) = 2*A000045(ceiling(n/2)*2). - Alois P. Heinz, Nov 02 2016

Extensions

a(21)-a(22) corrected by Matthew House, Nov 01 2016

A159864 Difference array of Fibonacci numbers A000045 read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 1, 0, -1, 2, 1, 1, 2, 3, 1, 0, -1, -3, 5, 2, 1, 1, 2, 5, 8, 3, 1, 0, -1, -3, -8, 13, 5, 2, 1, 1, 2, 5, 13, 21, 8, 3, 1, 0, -1, -3, -8, -21, 34, 13, 5, 2, 1, 1, 2, 5, 13, 34, 55, 21, 8, 3, 1, 0, -1, -3, -8, -21, -55, 89, 34, 13, 5, 2, 1, 1, 2, 5, 13, 34, 89
Offset: 0

Views

Author

Philippe Deléham, Apr 24 2009

Keywords

Examples

			Triangle begins:
  0;
  1,  1;
  1,  0, -1;
  2,  1,  1,  2;
  3,  1,  0, -1, -3;
  ...
		

Crossrefs

Main diagonal gives A039834.

Programs

  • Maple
    A159864Q := proc(n,k) option remember; if n = 0 then combinat[fibonacci](k) ; else procname(n-1,k+1) -procname(n-1,k) ; fi; end: A159864 := proc(n,k) A159864Q(k,n-k) ; end: for n from 0 to 5 do for k from 0 to n do printf("%d,",A159864(n,k)) ; od: od: # R. J. Mathar, May 29 2009
    # second Maple program:
    T:= (n, k)-> (<<0|1>, <1|1>>^(n-2*k))[1, 2]:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 27 2022
  • Mathematica
    nmax = 10; f = Table[Fibonacci[n], {n, 0, nmax}]; t = Table[Differences[f, n], {n, 0, nmax}]; Table[t[[n-k+1, k+1]], {n, 0, nmax}, {k, n, 0, -1}]  // Flatten (* Jean-François Alcover, Apr 14 2015 *)
    T[ n_, k_] := If[ k<0 || k>n, 0, Fibonacci[n - 2*k]]; Join@@Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Michael Somos, Oct 27 2022 *)
  • PARI
    {T(n, k) = If(k<0 || k>n, 0, fibonacci(n - 2*k))}; /* Michael Somos, Oct 27 2022 */

Formula

Conjecture: row sums are Sum_{k=0..n} T(2n,k)=0. Sum_{k=0..n} T(2n+1,k) = A025169(n). - R. J. Mathar, May 29 2009
(1/2) * Sum_{k=0..n} |T(n,k)| = A074331(n). - Alois P. Heinz, Oct 27 2022

Extensions

Sign of a(65) = -55 corrected by Jean-François Alcover, Apr 14 2015
Showing 1-10 of 13 results. Next