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 11-20 of 23 results. Next

A111566 a(n) = ((1+sqrt(8))*(2+sqrt(2))^n + (1-sqrt(8))*(2-sqrt(2))^n)/2.

Original entry on oeis.org

1, 6, 22, 76, 260, 888, 3032, 10352, 35344, 120672, 412000, 1406656, 4802624, 16397184, 55983488, 191139584, 652591360, 2228086272, 7607162368, 25972476928, 88675582976, 302757378048, 1033678346240, 3529198628864, 12049437822976, 41139354034176, 140458540490752
Offset: 0

Views

Author

Creighton Dement, Aug 06 2005

Keywords

Comments

Binomial transform of A048655: generalized Pellian with second term equal to 5.
Floretion Algebra Multiplication Program, FAMP Code: 1vesseq[K*J] with K = + .5'i + .5'j + .5k' + .5'kk' and J = + .5i' + .5j' + 2'kk' + .5'ki' + .5'kj'.

Crossrefs

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+2*r)*(2+r)^n+(1-2*r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 27 2009
    
  • Mathematica
    LinearRecurrence[{4,-2},{1,6},30] (* Harvey P. Dale, Jan 31 2015 *)
  • PARI
    x='x+O('x^30); Vec((1+2*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Jan 27 2018

Formula

a(n) = 4*a(n-1) - 2*a(n-2), a(0) = 1, a(1) = 6.
Program "FAMP" returns: a(n) = A007052(n) - A006012(n) + A111567(n).
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: (1+2*x)/(1-4*x+2*x^2).
a(n) = A007070(n) + 2*A007070(n-1). (End)
a(n) = Sum_{k=0..n} A207543(n,k)*2^k. - Philippe Deléham, Feb 25 2012
a(n) = 4*A007070(n) - A007052(n+1). - Yuriy Sibirmovsky, Sep 13 2016
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x) + 2*sqrt(2)*sinh(sqrt(2)*x)). - Stefano Spezia, May 26 2024

Extensions

Edited by N. J. A. Sloane, Jul 27 2009 using new definition from Al Hakanson (hawkuu(AT)gmail.com)

A048693 Generalized Pellian with 2nd term equal to 6.

Original entry on oeis.org

1, 6, 13, 32, 77, 186, 449, 1084, 2617, 6318, 15253, 36824, 88901, 214626, 518153, 1250932, 3020017, 7290966, 17601949, 42494864, 102591677, 247678218, 597948113, 1443574444, 3485097001, 8413768446
Offset: 0

Views

Author

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?). - R. J. Mathar, Aug 10 2012

Examples

			a(n)=[ (5+sqrt(2))(1+sqrt(2))^n-(5-sqrt(2))(1-sqrt(2))^n ]/2*sqrt(2)
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->4*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{5},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,6},30] (* Harvey P. Dale, Mar 29 2013 *)
  • Maxima
    a[0]:1$
    a[1]:6$
    a[n]:=2*a[n-1]+a[n-2]$
    A048693(n):=a[n]$
    makelist(A048693(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=6.
G.f.: (1+4*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
a(n) = 4*A000129(n) + A000129(n+1). - R. J. Mathar, Aug 10 2012

A266504 a(n) = 2*a(n - 2) + a(n - 4) with a(0) = a(1) = 2, a(2) = 1, a(3) = 3.

Original entry on oeis.org

2, 2, 1, 3, 4, 8, 9, 19, 22, 46, 53, 111, 128, 268, 309, 647, 746, 1562, 1801, 3771, 4348, 9104, 10497, 21979, 25342, 53062, 61181, 128103, 147704, 309268, 356589, 746639, 860882, 1802546, 2078353, 4351731, 5017588, 10506008, 12113529, 25363747, 29244646, 61233502
Offset: 0

Views

Author

Raphie Frank, Dec 30 2015

Keywords

Comments

This sequence gives all x in N | 2*x^2 - 7(-1)^x = y^2. The companion sequence to this sequence, giving y values, is A266505.
A266505(n)/a(n) converges to sqrt(2).
Alternatively, 1/4*(3*A002203(floor[n/2]) - A002203(n-(-1)^n)), where A002203 gives the Companion Pell numbers, or, in Lucas sequence notation, V_n(2, -1).
Alternatively, bisection of A266506.
Alternatively, A048654(n -1) and A078343(n + 1) interlaced.
Alternatively, A100525(n-1), A266507(n), A038761(n) and A253811(n) interlaced.
Let b(n) = (a(n) - a(n)(mod 2))/2, that is b(n) = {1, 1, 0, 1, 2, 4, 4, 9, 11, 23, 26, 55, 64, ...}. Then:
A006452(n) = {b(4n+0) U b(4n+1)} gives n in N such that n^2 - 1 is triangular;
A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that n^2 + n + 1 is triangular (indices of Sophie Germain triangular numbers);
A216162(n) = {b(4n+0) U b(4n+2) U b(4n+1) U b(4n+3)}, sequences A006452 and A216134 interlaced.

Crossrefs

Programs

  • Magma
    I:=[2,2,1,3]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
    
  • Mathematica
    LinearRecurrence[{0, 2, 0, 1}, {2, 2, 1, 3}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
    Table[SeriesCoefficient[(1 - x) (2 + 4 x + x^2)/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 41}] (* Michael De Vlieger, Dec 31 2015 *)
  • PARI
    Vec((1-x)*(2+4*x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Colin Barker, Dec 31 2015

Formula

a(n) = 1/sqrt(8)*(+sqrt(2)*(1+sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n - 3*(1-sqrt(2))^(floor(n/2)-(-1)^n) + sqrt(2)*(1-sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n + 3*(1+sqrt(2))^(floor(n/2)-(-1)^n)).
a(n) = 1/4*((3*((1+sqrt(2))^floor(n/2)+(1-sqrt(2))^floor(n/2))) - (-1)^n*((1+sqrt(2))^(floor(n/2)-(-1)^n)+(1-sqrt(2))^(floor(n/2)-(-1)^n))).
a(2n) = (+sqrt(2)*(1+sqrt(2))^(n-1) - 3 *(1-sqrt(2))^(n-1) + sqrt(2)*(1-sqrt(2))^(n-1) + 3*(1 + sqrt(2))^(n-1))/sqrt(8) = A048654(n -1).
a(2n) = 1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) - ((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))) = A048654(n -1).
a(2n + 1) = (-sqrt(2)*(1+sqrt(2))^(n+1) - 3 *(1-sqrt(2))^(n+1) - sqrt(2)*(1-sqrt(2))^(n+1) + 3*(1+sqrt(2))^(n+1))/sqrt(8) = A078343(n + 1).
a(2n + 1) =1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) + ((1+sqrt(2))^(n+1)+(1-sqrt(2))^(n+1))) = A078343(n + 1).
a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A100525(n-1).
a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A266507(n).
a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038761(n).
a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A253811(n).
sqrt(2*a(n)^2 - 7(-1)^a(n))*sgn(2*n - 1) = A266505(n).
(a(2n + 1) + a(2n))/2 = A002203(n), where A002203 gives the companion Pell numbers.
(a(2n + 1) - a(2n))/2 = A000129(n), where A000129 gives the Pell numbers.
(a(2n+2) + a(2n+1))*2 = A002203(n+2)
(a(2n+2) - a(2n+1))*2 = A002203(n-1).
G.f.: (1-x)*(2+4*x+x^2) / (1-2*x^2-x^4). - Colin Barker, Dec 31 2015

A048697 Generalized Pellian with second term equal to 10.

Original entry on oeis.org

1, 10, 21, 52, 125, 302, 729, 1760, 4249, 10258, 24765, 59788, 144341, 348470, 841281, 2031032, 4903345, 11837722, 28578789, 68995300, 166569389, 402134078, 970837545, 2343809168, 5658455881
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a048697 n = a048697_list !! n
    a048697_list = 1 : 10 : zipWith (+)
                            a048697_list (map (* 2) $ tail a048697_list)
    -- Reinhard Zumkeller, Sep 05 2014
  • Maple
    with(combinat): a:=n->8*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..25); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{9},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,10},35] (* Harvey P. Dale, Jul 26 2011 *)

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=10.
a(n) = ((9+sqrt(2))(1+sqrt(2))^n - (9-sqrt(2))(1-sqrt(2))^n) / 2*sqrt(2).
G.f.: (1+8*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008

A117584 Generalized Pellian triangle.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 7, 12, 1, 5, 9, 17, 29, 1, 6, 11, 22, 41, 70, 1, 7, 13, 27, 53, 99, 169, 1, 8, 15, 32, 65, 128, 239, 408, 1, 9, 17, 37, 77, 157, 309, 577, 985, 1, 10, 19, 42, 89, 186, 379, 746, 1393, 2378
Offset: 1

Views

Author

Gary W. Adamson, Mar 29 2006

Keywords

Examples

			First few rows of the triangle are:
  1;
  1, 2;
  1, 3,  5;
  1, 4,  7, 12;
  1, 5,  9, 17, 29;
  1, 6, 11, 22, 41, 70;
  1, 7, 13, 27, 53, 99, 169;
  ...
The triangle rows are antidiagonals of the generalized Pellian array:
  1, 2,  5, 12, 29, ...
  1, 3,  7, 17, 41, ...
  1, 4,  9, 22, 53, ...
  1, 5, 11, 27, 65, ...
  ...
For example, in the row (1, 5, 11, 27, 65, ...), 65 = 2*27 + 11.
		

Crossrefs

Diagonals include A000129, A001333, A048654, A048655, A048693.
Cf. A117185.

Programs

  • Magma
    P:= func< n | Round( ((1+Sqrt(2))^n - (1-Sqrt(2))^n)/(2*Sqrt(2)) ) >;
    T:= func< n,k | P(k) + (n-1)*P(k-1) >;
    [T(n-k+1, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Jul 05 2021
    
  • Mathematica
    T[n_, k_]:= Fibonacci[k, 2] + (n-1)*Fibonacci[k-1, 2];
    Table[T[n-k+1, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Jul 05 2021 *)
  • Sage
    def T(n,k): return lucas_number1(k,2,-1) + (n-1)*lucas_number1(k-1,2,-1)
    flatten([[T(n-k+1, k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jul 05 2021

Formula

Antidiagonals of the generalized Pellian array. First row of the array = A000129: (1, 2, 5, 12, ...). n-th row of the array starts (1, n+1, ...); as a Pellian sequence.
From G. C. Greubel, Jul 05 2021: (Start)
T(n, k) = P(k) + (n-1)*P(k-1), where P(n) = A000129(n) (square array).
Sum_{k=1..n} T(n-k+1, k) = A117185(n). (End)

A266505 a(n) = 2*a(n - 2) + a(n - 4) with a(0) = -1, a(1) = 1, a(2) = 3, a(3) = 5.

Original entry on oeis.org

-1, 1, 3, 5, 5, 11, 13, 27, 31, 65, 75, 157, 181, 379, 437, 915, 1055, 2209, 2547, 5333, 6149, 12875, 14845, 31083, 35839, 75041, 86523, 181165, 208885, 437371, 504293, 1055907, 1217471, 2549185, 2939235, 6154277, 7095941, 14857739, 17131117, 35869755, 41358175, 86597249, 99847467
Offset: 0

Views

Author

Raphie Frank, Dec 30 2015

Keywords

Comments

a(n)/A266504(n) converges to sqrt(2).
Alternatively, bisection of A266506.
Alternatively, A135532(n) and A048655(n) interlaced.
Alternatively, A255236(n-1), A054490(n), A038762(n) and A101386(n) interlaced.
Let b(n) = (a(n) - (a(n) mod 2))/2, that is b(n) = {-1, 0, 1, 2, 2, 5, 6, 13, 15, 32, 37, 78, 90, ...}. Then:
A006451(n) = {b(4n+0) U b(4n+1)} gives n in N such that triangular(n) + 1 is square;
A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that triangular(n) follows form n^2 + n + 1 (twice a triangular number + 1).

Crossrefs

Programs

  • Magma
    I:=[-1,1,3,5]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
    
  • Maple
    a:=proc(n) option remember; if n=0 then -1 elif n=1 then 1 elif n=2 then 3 elif n=3 then 5 else 2*a(n-2)+a(n-4); fi; end:  seq(a(n), n=0..50); # Wesley Ivan Hurt, Jan 01 2016
  • Mathematica
    LinearRecurrence[{0, 2, 0, 1}, {-1, 1, 3, 5}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
    Table[SeriesCoefficient[(-1 + 3 x) (1 + x)^2/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 42}] (* Michael De Vlieger, Dec 31 2015 *)
  • PARI
    my(x='x+O('x^40)); Vec((-1+3*x)*(1+x)^2/(1-2*x^2-x^4)) \\ G. C. Greubel, Jul 26 2018

Formula

G.f.: (-1 + 3*x)*(1 + x)^2/(1 - 2*x^2 - x^4).
a(n) = (-(1+sqrt(2))^floor(n/2)*(-1)^n - sqrt(8)*(1-sqrt(2))^floor(n/2) - (1-sqrt(2))^floor(n/2)*(-1)^n + sqrt(8)*(1+sqrt(2))^floor(n/2))/2.
a(n) = 3*(((1+sqrt(2))^floor(n/2)-(1-sqrt(2))^floor(n/2))/sqrt(8)) - (-1)^n*(((1+sqrt(2))^(floor(n/2)-(-1)^n)-(1-sqrt(2))^(floor(n/2)-(-1)^n))/sqrt(8)).
a(n) = (3*A000129(floor(n/2)) - A000129(n-(-1)^n)), where A000129 gives the Pell numbers.
a(n) = sqrt(2*A266504(n)^2 - 7*(-1)^A266504(n))*sgn(2*n-1), where A266504 gives all x in N such that 2*x^2 - 7*(-1)^x = y^2. This sequence gives associated y values.
a(2n) = (-(1 + sqrt(2))^n - sqrt(8)*(1 - sqrt(2))^n - (1 - sqrt(2))^n + sqrt(8)*(1 + sqrt(2))^n)/2 = a(2n) = A135532(n).
a(2n) = 3*(((1+sqrt(2))^n-(1-sqrt(2))^n)/sqrt(8)) - (((1+sqrt(2))^(n-1)-(1-sqrt(2))^(n-1))/sqrt(8)) = A135532(n).
a(2n+1) = (+(1 + sqrt(2))^n - sqrt(8)*(1 - sqrt(2))^n + (1 - sqrt(2))^n + sqrt(8)*(1 + sqrt(2))^n)/2 = a(2n + 1) = A048655(n).
a(2n+1) = 3*(((1+sqrt(2))^n-(1-sqrt(2))^n)/sqrt(8)) + (((1+sqrt(2))^(n+1)-(1-sqrt(2))^(n+1))/sqrt(8)) = A048655(n).
a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A255236(n-1).
a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A054490(n).
a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038762(n).
a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A101386(n).
(sqrt(2*(a(2n + 1) )^2 + 14*(-1)^floor(n/2)))/2 = A266504(n).
(a(2n + 1) + a(2n))/8 = A000129(n), where A000129 gives the Pell numbers.
a(2n + 1) - a(2n) = A002203(n), where A002203 gives the companion Pell numbers.
(a(2n + 2) + a(2n + 1))/2 = A000129(n+2).
(a(2n + 2) - a(2n + 1))/2 = A000129(n-1).

A048695 Generalized Pellian with second term equal to 8.

Original entry on oeis.org

1, 8, 17, 42, 101, 244, 589, 1422, 3433, 8288, 20009, 48306, 116621, 281548, 679717, 1640982, 3961681, 9564344, 23090369, 55745082, 134580533, 324906148, 784392829, 1893691806, 4571776441, 11037244688
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->6*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{7},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,8},30] (* Harvey P. Dale, May 01 2013 *)

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=8.
a(n) = ((7+sqrt(2))(1+sqrt(2))^n - (7-sqrt(2))(1-sqrt(2))^n)/2*sqrt(2).
G.f.: (1+6*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008

A111955 a(n) = A078343(n) + (-1)^n.

Original entry on oeis.org

0, 1, 4, 7, 20, 45, 112, 267, 648, 1561, 3772, 9103, 21980, 53061, 128104, 309267, 746640, 1802545, 4351732, 10506007, 25363748, 61233501, 147830752, 356895003, 861620760, 2080136521, 5021893804, 12123924127, 29269742060, 70663408245
Offset: 0

Views

Author

Creighton Dement, Aug 25 2005

Keywords

Comments

This sequence is a companion sequence to A111954 (compare formula / program code). Three other companion sequences (i.e., they are generated by the same floretion given in the program code) are A105635, A097076 and A100828.
Floretion Algebra Multiplication Program, FAMP Code: 4kbasejseq[J*D] with J = - .25'i + .25'j + .5'k - .25i' + .25j' + .5k' - .5'kk' - .25'ik' - .25'jk' - .25'ki' - .25'kj' - .5e and D = + .5'i - .25'j + .25'k + .5i' - .25j' + .25k' - .5'ii' - .25'ij' - .25'ik' - .25'ji' - .25'ki' - .5e. (an initial term 0 was added to the sequence)

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,3,1},{0,1,4},40] (* Harvey P. Dale, Mar 12 2015 *)

Formula

a(n) + a(n+1) = A048655(n).
a(n) = a(n-1) + 3*a(n-2) + a(n-3), n >= 3; a(n) = (-1/4*sqrt(2)+1)*(1-sqrt(2))^n + (1/4*sqrt(2)+1)*(1+sqrt(2))^n - (-1)^n;
G.f.: -x*(1+3*x) / ( (1+x)*(x^2+2*x-1) ). - R. J. Mathar, Oct 02 2012
E.g.f.: cosh(x) - exp(x)*cosh(sqrt(2)*x) - sinh(x) + 3*exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, May 26 2024

A117895 Triangle T(n, k) = (k-n)*A000129(k+1) + (3*n-3*k+1)*A000129(k) with T(n,0) = 1, for 0 <= k <= n-1, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 4, 8, 1, 5, 5, 11, 19, 1, 6, 6, 14, 26, 46, 1, 7, 7, 17, 33, 63, 111, 1, 8, 8, 20, 40, 80, 152, 268, 1, 9, 9, 23, 47, 97, 193, 367, 647, 1, 10, 10, 26, 54, 114, 234, 466, 886, 1562, 1, 11, 11, 29, 61, 131, 275, 565, 1125, 2139, 3771, 1, 12, 12, 32, 68, 148, 316, 664, 1364, 2716, 5164, 9104
Offset: 0

Views

Author

Gary W. Adamson, Mar 30 2006

Keywords

Comments

Successive deletions of the right borders of triangle A117894 produces triangles whose row sums = generalized Pell sequences starting (1, 2...), (1, 3...), (1, 4...); etc. Row sums of A117894 = A000129: (1, 2, 5...). Row sums of A117895 = A001333: (1, 3, 7...). Deletion of the border of A117895 would produce a triangle with row sums of the Pell sequence A048654 (1, 4, 9...); and so on.

Examples

			First few rows of the triangle are:
  1;
  1, 2;
  1, 3, 3;
  1, 4, 4,  8;
  1, 5, 5, 11, 19;
  1, 6, 6, 14, 26, 46;
  1, 7, 7, 17, 33, 63, 111;
  1, 8, 8, 20, 40, 80, 152, 268;
...
Row 4, (1, 4, 4, 8) is produced by adding (0, 1, 1, 3) to row 4 of A117894: (1, 3, 3, 5).
		

Crossrefs

Programs

  • Magma
    Pell:= func< n | Round(((1+Sqrt(2))^n - (1-Sqrt(2))^n)/(2*Sqrt(2))) >;
    [k eq 0 select 1 else (k-n)*Pell(k+1) + (3*n-3*k+1)*Pell(k): k in [0..n-1], n in [0..12]]; // G. C. Greubel, Sep 27 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0, 1, (k-n)*Fibonacci[k+1, 2] + (3*n-3*k +1)*Fibonacci[k, 2]]; Table[T[n, k], {n,0,12}, {k,0,n-1}]//Flatten (* G. C. Greubel, Sep 27 2021 *)
  • Sage
    def P(n): return lucas_number1(n, 2, -1)
    def A117895(n,k): return 1 if (k==0) else (k-n)*P(k+1) + (3*n-3*k+1)*P(k)
    flatten([[A117895(n,k) for k in (0..n-1)] for n in (0..12)]) # G. C. Greubel, Sep 27 2021

Formula

Delete right border of triangle A117894. Alternatively, let row 1 = 1 and using the heading 0, 1, 1, 3, 7, 17, 41, 99, 239...(i.e. A001333 starting with 0, 1, 1, 3...); add the first n terms of the heading to n-th row of triangle A117894.
From G. C. Greubel, Sep 27 2021: (Start)
T(n, k) = (k-n)*A000129(k+1) + (3*n-3*k+1)*A000129(k) with T(n,0) = 1.
T(n, 1) = n+1 for n >= 1.
T(n, 2) = n+1 for n >= 2.
T(n, n) = 2*[n=0] + A078343(n). (End)

Extensions

New name and more terms added by G. C. Greubel, Sep 27 2021

A135246 Shifted Pell recurrence: a(n) = 2*a(n-2) + a(n-4).

Original entry on oeis.org

1, 3, 5, 7, 11, 17, 27, 41, 65, 99, 157, 239, 379, 577, 915, 1393, 2209, 3363, 5333, 8119, 12875, 19601, 31083, 47321, 75041, 114243, 181165, 275807, 437371, 665857, 1055907, 1607521, 2549185, 3880899, 6154277, 9369319, 14857739, 22619537, 35869755, 54608393, 86597249, 131836323, 209064253, 318281039, 504725755, 768398401, 1218515763, 1855077841, 2941757281, 4478554083
Offset: 0

Views

Author

Paul Curtz, Feb 15 2008

Keywords

Comments

Mix A048655(n) and A001333(n+2).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 0, 1}, {1, 3, 5, 7}, 25] (* G. C. Greubel, Oct 04 2016 *)
  • PARI
    Vec((1 + 3*x + 3*x^2 + x^3)/(1 - 2*x^2 - x^4) + O(x^50)) \\ Michel Marcus, Oct 05 2016

Formula

G.f.: (1 + 3*x + 3*x^2 + x^3)/(1 - 2*x^2 - x^4). - G. C. Greubel, Oct 04 2016
a(n) = 2*a(n-2) + a(n-4). - Wesley Ivan Hurt, Dec 30 2023
Previous Showing 11-20 of 23 results. Next