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 65 results. Next

A183584 T(n,k)=Half the number of nXk 0..3 arrays with each element equal to either the maximum or the minimum of its horizontal and vertical neighbors.

Original entry on oeis.org

0, 2, 2, 2, 14, 2, 8, 78, 78, 8, 14, 407, 814, 407, 14, 38, 2216, 9667, 9667, 2216, 38, 80, 12024, 110674, 240358, 110674, 12024, 80, 194, 65277, 1282814, 5987795, 5987795, 1282814, 65277, 194, 434, 354615, 14823037, 149355515, 320224986, 149355515
Offset: 1

Views

Author

R. H. Hardin Jan 05 2011

Keywords

Comments

Table starts
....0........2...........2..............8.................14
....2.......14..........78............407...............2216
....2.......78.........814...........9667.............110674
....8......407........9667.........240358............5987795
...14.....2216......110674........5987795..........320224986
...38....12024.....1282814......149355515........17195908538
...80....65277....14823037.....3724940988.......922710498351
..194...354615...171459557....92915045150.....49526167251643
..434..1926386..1982720806..2317648165893...2658141294593252
.1016.10465655.22929915669.57811518197886.142669482408162261

Examples

			Some solutions with a(1,1)<=1 for 4X3
..1..1..3....1..3..3....1..0..3....1..2..2....0..2..2....1..2..2....1..3..3
..1..3..3....1..1..1....1..0..3....1..1..3....0..0..0....1..1..3....1..0..0
..2..1..3....1..1..1....0..0..0....1..1..3....0..2..2....0..3..3....1..3..3
..2..1..1....2..2..2....0..1..1....1..1..1....2..2..2....0..0..3....3..3..3
		

Crossrefs

Column 1 is 2*A006130(n-2)

A186168 T(n,k)=1/4 the number of nXk 0..3 arrays with every element equal to exactly one or two of its horizontal and vertical neighbors.

Original entry on oeis.org

0, 1, 1, 1, 7, 1, 4, 48, 48, 4, 7, 321, 702, 321, 7, 19, 2175, 14364, 14364, 2175, 19, 40, 14748, 253341, 751266, 253341, 14748, 40, 97, 99933, 4762206, 37402872, 37402872, 4762206, 99933, 97, 217, 677283, 87054174, 1899336597, 5033988714, 1899336597
Offset: 1

Views

Author

R. H. Hardin Feb 13 2011

Keywords

Comments

Table starts
...0........1............1...............4.................7.................19
...1........7...........48.............321..............2175..............14748
...1.......48..........702...........14364............253341............4762206
...4......321........14364..........751266..........37402872.........1899336597
...7.....2175.......253341........37402872........5033988714.......704281652979
..19....14748......4762206......1899336597......704281652979....268995986029278
..40....99933.....87054174.....95752776009....96951738076992.101554003879403823
..97...677283...1610684397...4840082975532.13435825601048421
.217..4590168..29645381115.244420512852030
.508.31108893.546876640548

Examples

			Some solutions for 5X4 with a(1,1)=0
..0..0..1..0....0..0..1..1....0..0..1..1....0..0..1..0....0..0..1..1
..0..0..1..0....0..0..3..2....0..0..2..2....0..0..1..0....0..0..2..1
..1..1..3..3....1..1..3..2....1..1..0..0....1..1..0..0....1..1..2..2
..0..0..3..3....0..1..3..2....1..3..3..0....1..1..2..1....2..2..1..0
..1..1..0..0....0..0..0..0....0..0..2..2....0..0..2..1....3..3..1..0
		

Crossrefs

Column 1 is A006130(n-2)

A206255 T(n,k) = Number of (n+1) X (k+1) 0..3 arrays with every 2 X 2 subblock having zero permanent.

Original entry on oeis.org

49, 361, 361, 1600, 8029, 1600, 9409, 99856, 99856, 9409, 47089, 1718209, 1364224, 1718209, 47089, 258064, 26512201, 49336576, 49336576, 26512201, 258064, 1343281, 434613664, 944701696, 4556324929, 944701696, 434613664, 1343281, 7198489
Offset: 1

Views

Author

R. H. Hardin, Feb 05 2012

Keywords

Comments

Table starts
......49..........361...........1600..............9409................47089
.....361.........8029..........99856...........1718209.............26512201
....1600........99856........1364224..........49336576............944701696
....9409......1718209.......49336576........4556324929.........226637884225
...47089.....26512201......944701696......226637884225.......14139111560401
..258064....434613664....27285753856....16533087493120.....2261195747329024
.1343281...6990799321...603269103616..1006239668280961...186370092021300625
.7198489.113636628469.15860529270784.68438717405988481.24455901146017548025

Examples

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

Crossrefs

Cf. A006130.

Formula

Column 1 is A006130(n+2)^2.

A083856 Square array T(n,k) of generalized Fibonacci numbers, read by antidiagonals upwards (n, k >= 0).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 3, 1, 0, 1, 1, 4, 5, 5, 1, 0, 1, 1, 5, 7, 11, 8, 1, 0, 1, 1, 6, 9, 19, 21, 13, 1, 0, 1, 1, 7, 11, 29, 40, 43, 21, 1, 0, 1, 1, 8, 13, 41, 65, 97, 85, 34, 1, 0, 1, 1, 9, 15, 55, 96, 181, 217, 171, 55, 1
Offset: 0

Views

Author

Paul Barry, May 06 2003

Keywords

Comments

Row n >= 0 of the array gives the solution to the recurrence b(k) = b(k-1) + n*b(k-2) for k >= 2 with b(0) = 0 and b(1) = 1.

Examples

			Array T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
  0, 1, 1,  1,  1,   1,   1,    1,    1,     1, ... [A057427]
  0, 1, 1,  2,  3,   5,   8,   13,   21,    34, ... [A000045]
  0, 1, 1,  3,  5,  11,  21,   43,   85,   171, ... [A001045]
  0, 1, 1,  4,  7,  19,  40,   97,  217,   508, ... [A006130]
  0, 1, 1,  5,  9,  29,  65,  181,  441,  1165, ... [A006131]
  0, 1, 1,  6, 11,  41,  96,  301,  781,  2286, ... [A015440]
  0, 1, 1,  7, 13,  55, 133,  463, 1261,  4039, ... [A015441]
  0, 1, 1,  8, 15,  71, 176,  673, 1905,  6616, ... [A015442]
  0, 1, 1,  9, 17,  89, 225,  937, 2737, 10233, ... [A015443]
  0, 1, 1, 10, 19, 109, 280, 1261, 3781, 15130, ... [A015445]
  ...
		

Crossrefs

Rows include A057427 (n=0), A000045 (n=1), A001045 (n=2), A006130 (n=3), A006131 (n=4), A015440 (n=5), A015441 (n=6), A015442 (n=7), A015443 (n=8), A015445 (n=9).
Columns include A000012 (k=1,2), A000027 (k=3), A005408 (k=4), A028387 (k=5), A000567 (k=6), A106734 (k=7).
Cf. A083857 (binomial transform), A083859 (main diagonal), A083860 (first subdiagonal), A083861 (second binomial transform), A110112, A110113 (diagonal sums), A193376 (transposed variant), A172237 (transposed variant).

Programs

  • Julia
    function generalized_fibonacci(r, n)
       F = BigInt[1 r; 1 0]
       Fn = F^n
       Fn[2, 1]
    end
    for r in 0:6 println([generalized_fibonacci(r, n) for n in 0:9]) end # Peter Luschny, Mar 06 2017
  • Maple
    A083856_row := proc(r, n) local R; R := proc(n) option remember;
    if n<=1 then n else R(n-1)+r*R(n-2) fi end: R(n) end:
    for r from 0 to 9 do seq(A083856_row(r, n), n=0..9) od; # Peter Luschny, Mar 06 2017
  • Mathematica
    T[, 0] = 0; T[, 1|2] = 1; T[n_, k_] := T[n, k] = T[n, k-1] + n T[n, k-2];
    Table[T[n-k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018 *)

Formula

T(n, k) = (((1 + sqrt(4*n + 1))/2)^k - ((1 - sqrt(4*n + 1))/2)^k)/sqrt(4*n + 1). [corrected by Michel Marcus, Jun 25 2018]
From Thomas Baruchel, Jun 25 2018: (Start)
The g.f. for row n >= 0 is x/(1 - x - n*x^2).
The g.f. for column k >= 1 is g(k,x) = 1/(1-x) + Sum_{m = 1..floor((k-1)/2)} (1 - x)^(-1 - m) * binomial(k - 1 - m, m) * Sum_{i = 0..m} x^i * Sum_{j = 0..i} (-1)^j * (i - j)^m * binomial(1 + m, j).
The g.f. for column k >= 1 is also g(k,x) = 1 + Sum_{m = 1..floor((k+1)/2)} ((1 - x)^(-m) * binomial(k-m, m-1) * Sum_{j = 0..m} (-1)^j * binomial(m, j) * x^m * Phi(x, -m+1, -j+m)) + Sum_{s = 0..floor((k-1)/2)} binomial(k-s-1, s) * PolyLog(-s, x), where Phi is the Lerch transcendent function. (End)
T(n,k) = Sum_{i = 0..k} (-1)^(k+i) * binomial(k,i) * A083857(n,i). - Petros Hadjicostas, Dec 24 2019

Extensions

Various sections edited by Petros Hadjicostas, Dec 24 2019

A143461 Square array A(n,k) of numbers of length n quaternary words with at least k 0-digits between any other digits (n,k >= 0), read by antidiagonals.

Original entry on oeis.org

1, 1, 4, 1, 4, 16, 1, 4, 7, 64, 1, 4, 7, 19, 256, 1, 4, 7, 10, 40, 1024, 1, 4, 7, 10, 22, 97, 4096, 1, 4, 7, 10, 13, 43, 217, 16384, 1, 4, 7, 10, 13, 25, 73, 508, 65536, 1, 4, 7, 10, 13, 16, 46, 139, 1159, 262144, 1, 4, 7, 10, 13, 16, 28, 76, 268, 2683, 1048576, 1, 4, 7, 10, 13, 16, 19, 49, 115, 487, 6160, 4194304
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Examples

			A (3,1) = 19, because 19 quaternary words of length 3 have at least 1 0-digit between any other digits: 000, 001, 002, 003, 010, 020, 030, 100, 101, 102, 103, 200, 201, 202, 203, 300, 301, 301, 303.
Square array A(n,k) begins:
       1,   1,   1,  1,  1,  1,  1,  1,  ...
       4,   4,   4,  4,  4,  4,  4,  4,  ...
      16,   7,   7,  7,  7,  7,  7,  7,  ...
      64,  19,  10, 10, 10, 10, 10, 10,  ...
     256,  40,  22, 13, 13, 13, 13, 13,  ...
    1024,  97,  43, 25, 16, 16, 16, 16,  ...
    4096, 217,  73, 46, 28, 19, 19, 19,  ...
   16384, 508, 139, 76, 49, 31, 22, 22,  ...
		

Crossrefs

Columns k=0-9 give: A000302, A006130(n+1), A084386(n+2), A143454, A143455, A143456, A143457, A143458, A143459, A143460.
Main diagonal gives A016777.

Programs

  • Maple
    A:= proc(n, k) option remember; if k=0 then 4^n elif n<=k+1 then 3*n+1 else A(n-1, k) +3*A(n-k-1, k) fi end: seq(seq(A(n, d-n), n=0..d), d=0..13);
  • Mathematica
    a[n_, 0] := 4^n; a[n_, k_] /; n <= k+1 := 3*n+1; a[n_, k_] := a[n, k] = a[n-1, k] + 3*a[n-k-1, k]; Table[a[n-k, k], {n, 0, 13}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jan 15 2014, after Maple *)

Formula

G.f. of column k: 1/(x^k*(1-x-3*x^(k+1))).
A(n,k) = 4^n if k=0, else A(n,k) = 3*n+1 if n<=k+1, else A(n,k) = A(n-1,k) + 3*A(n-k-1,k).

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

Original entry on oeis.org

1, 0, 3, 3, 12, 21, 57, 120, 291, 651, 1524, 3477, 8049, 18480, 42627, 98067, 225948, 520149, 1197993, 2758440, 6352419, 14627739, 33684996, 77568213, 178623201, 411327840, 947197443, 2181180963, 5022773292, 11566316181, 26634636057
Offset: 0

Views

Author

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

Keywords

Comments

Form the graph with matrix A=[0,1,1,1;1,1,0,0;1,0,1,0;1,0,0,1]. A052533 counts closed walks of length n at the vertex without loop. - Paul Barry, Oct 02 2004
Let M = [0, sqrt(3); sqrt(3), 1] be a 2 X 2 matrix. Then A052533 = {[M^n](1,1)}. Note also that {[M^n](2,2)} = A006130. - L. Edson Jeffery, Nov 25 2011
Pisano period lengths: 1, 3, 1, 6, 24, 3, 24, 6, 1, 24,120, 6,156, 24, 24, 12, 16, 3, 90, 24, ... - R. J. Mathar, Aug 10 2012
a(n) appears in the formula for powers of the fundamental algebraic number c = (1 + sqrt(13))/2 = A209927 of the quadratic number field Q(sqrt(13)): c^n = a(n) + A006130(n-1), for n >=0, with A006130(-1) = 0. The formulas given below and in A006130 in terms of S-Chebyshev polynomials are valid also for c^(-n), for n >= 0, with 1/c = (-1 + sqrt(13))/2 = A356033. - Wolfdieter Lang, Nov 26 2023

Crossrefs

Programs

  • GAP
    a:=[1,0];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, May 09 2019
  • Magma
    I:=[1,0]; [n le 2 select I[n] else Self(n-1)+3*Self(n-2): n in [1..40]]; // G. C. Greubel, May 09 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!( (1-x)/(1-x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Union(Z,Z,Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(coeff(series((1-x)/(1-x-3*x^2), x, n+1), x, n), n = 0..40); # G. C. Greubel, Jan 15 2020
  • Mathematica
    CoefficientList[Series[(1-x)/(1-x-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 07 2013 *)
    LinearRecurrence[{1,3}, {1,0}, 40] (* G. C. Greubel, May 09 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-x-3*x^2)) \\ G. C. Greubel, May 09 2019
    
  • Sage
    [lucas_number1(n+1,1,-3) -lucas_number1(n,1,-3) for n in (0..40)] # G. C. Greubel, May 09 2019
    

Formula

G.f.: (1 - x)/(1 - x - 3*x^2).
a(n) = A006130(n) - A006130(n-1).
a(n) = a(n-1) + 3*a(n-2), with a(0)=1, a(1)=0.
a(n) = Sum_{alpha = RootOf(-1+x+3*x^2)} (1/13)*(-1 + 7*alpha)* alpha^(-n-1).
a(n) = Sum_{k=0..floor(n/2)} C(n-k-1,n-2*k)*3^k. - Paul Barry, Mar 16 2010
If p[1]=0, and p[i]=3, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, Apr 29 2010
G.f.: (Q(0) -1)*(1-x)/x, where Q(k) = 1 + 3*x^2 + (k+2)*x - x*(k+1 + 3*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
a(n) = 3^(n/2) * Fibonacci(n-1, 1/sqrt(3)). - G. C. Greubel, Jan 15 2020
From Wolfdieter Lang, Nov 27 2023: (Start)
a(n) = 3*A006130(n-2), with A006130(-2) = 1/3 and A006130(-1) = 0.
a(n) = 3*sqrt(-3)^(n-2)*S(n-2, 1/sqrt(-3)), with the S Chebyshev polynomials (see A049310), valid also for negative indices n, using S(-n, x) = - S(n-2, x), for n>= 2, and S(-1, x) = 0. (End)

Extensions

More terms from James Sellers, Jun 06 2000

A108300 a(n+2) = 3*a(n+1) + a(n), with a(0) = 1, a(1) = 5.

Original entry on oeis.org

1, 5, 16, 53, 175, 578, 1909, 6305, 20824, 68777, 227155, 750242, 2477881, 8183885, 27029536, 89272493, 294847015, 973813538, 3216287629, 10622676425, 35084316904, 115875627137, 382711198315, 1264009222082, 4174738864561, 13788225815765, 45539416311856
Offset: 0

Views

Author

Creighton Dement, Jul 24 2005

Keywords

Comments

Binomial transform is A109114.
Invert transform is A109115.
Inverse invert transform is A016777.
Inverse binomial transform is A006130.

Crossrefs

Row sums and main diagonal of A143972. - Gary W. Adamson, Sep 06 2008

Programs

  • Maple
    seriestolist(series((-2*x-1)/(x^2-1+3*x), x=0,25));
  • Mathematica
    LinearRecurrence[{3,1},{1,5},40] (* Harvey P. Dale, Jul 04 2013 *)
  • PARI
    Vec((1 + 2*x)/(1 - 3*x - x^2) + O(x^30)) \\ Andrew Howroyd, Jun 05 2021

Formula

G.f.: (1 + 2*x)/(1 - 3*x - x^2).
a(n) = A052924(n+1) - A052924(n).
a(n)*a(n-2) = a(n-1)^2 + 9*(-1)^n. - Roger L. Bagula, May 17 2010
a(n) = 3^n*Sum_{k=0..n} A374439(n, k)*(1/3)^k. - Peter Luschny, Jul 26 2024

A140167 a(n) = (-1)*a(n-1) + 3*a(n-2) with a(1)=-1 and a(2)=1.

Original entry on oeis.org

-1, 1, -4, 7, -19, 40, -97, 217, -508, 1159, -2683, 6160, -14209, 32689, -75316, 173383, -399331, 919480, -2117473, 4875913, -11228332, 25856071, -59541067, 137109280, -315732481, 727060321, -1674257764, 3855438727, -8878212019, 20444528200
Offset: 1

Views

Author

Gary W. Adamson, May 10 2008

Keywords

Comments

A140165 is a companion sequence.

Examples

			a(5) = -19 = (-1)*7 + 3*(-4).
a(5) = -19 = term (1,2) of X^5 since X^5 = [ -2, -19; -19, -59].
		

Crossrefs

Programs

  • GAP
    a:=[-1,1];; for n in [3..30] do a[n]:= -a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
  • Magma
    I:=[-1,1]; [n le 2 select I[n] else (-1)*Self(n-1) + 3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 31 2015
    
  • Maple
    seq(coeff(series(-x/(1+x-3*x^2), x, n+1), x, n), n = 1..30); # G. C. Greubel, Dec 26 2019
  • Mathematica
    RecurrenceTable[{a[n]== -a[n-1]+3*a[n-2], a[1]== -1, a[2]==1}, a, {n,30}] (* G. C. Greubel, Aug 30 2015 *)
    Table[Round[-(-Sqrt[3])^(n-1)*(LucasL[n-1, 1/Sqrt[3]] + Fibonacci[n-1, 1/Sqrt[3] ]/Sqrt[3])/2], {n,30}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    first(m)=my(v=vector(m));v[1]=-1;v[2]=1;for(i=3,m,v[i]=-v[i-1] + 3*v[i-2]); v \\ Anders Hellström, Aug 30 2015
    
  • Sage
    def A140167_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( -x/(1+x-3*x^2) ).list()
    a=A140167_list(30); a[1:] # G. C. Greubel, Dec 26 2019
    

Formula

a(n) = (-1)*a(n-1) + 3*a(n-2), given a(1) = -1, a(2) = 1. a(n) = term (1,2) of X^n, where X = the 2x2 matrix [1,-1; -1,-2].
From R. J. Mathar, Dec 12 2009: (Start)
a(n) = (-1)^n*A006130(n-1).
G.f.: -x/(1+x-3*x^2). (End)
G.f.: -Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 3*x)/( x*(4*k+1 + 3*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (1/sqrt(13))*(exp(-(1+sqrt(13))*x/2) - exp(-(1-sqrt(13))*x/2)). G. C. Greubel, Aug 30 2015
a(n) = -(-sqrt(3))^(n-1)*(Lucas(n-1, 1/sqrt(3)) + Fibonacci(n-1, 1/sqrt(3) )/sqrt(3))/2. - G. C. Greubel, Dec 26 2019

A274977 a(n) = a(n-1) + 3*a(n-2) with n>1, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 9, 27, 54, 135, 297, 702, 1593, 3699, 8478, 19575, 45009, 103734, 238761, 549963, 1266246, 2916135, 6714873, 15463278, 35607897, 81997731, 188821422, 434814615, 1001278881, 2305722726, 5309559369, 12226727547, 28155405654, 64835588295, 149301805257, 343808570142
Offset: 0

Views

Author

Bruno Berselli, Sep 13 2016

Keywords

Comments

a(n)/a(n+1) converges to 1/A209927 as n approaches infinity.

Examples

			Table of similar sequences (not extendable on the left side) where this recurrence can be applied to the first two terms:
----------------------------------------------------------------------
(*)      -  -  1, -1,  2, -1,  5,   2,  17,  23,   74,  143,  365, ...
A052533: -  -  1,  0,  3,  3, 12,  21,  57, 120,  291,  651, 1524, ...
(^)      -  0, 1,  1,  4,  7, 19,  40,  97, 217,  508, 1159, 2683, ...
A006138: -  -  1,  2,  5, 11, 26,  59, 137, 314,  725, 1667, 3842, ...
A105476: -  -  1,  3,  6, 15, 33,  78, 177, 411,  942, 2175, 5001, ...
(^)      0, 1, 1,  4,  7, 19, 40,  97, 217, 508, 1159, 2683, 6160, ...
A105963: -  -  1,  5,  8, 23, 47, 116, 257, 605, 1376, 3191, 7319, ...
A274977: -  -  1,  6,  9, 27, 54, 135, 297, 702, 1593, 3699, 8478, ...
A075118: -  2, 1,  7, 10, 31, 61, 154, 337, 799, 1810, 4207, 9637, ...
----------------------------------------------------------------------
(*) see version A140165.
(^) see A006130 and the signed versions A140167, A182228.
		

Crossrefs

Programs

  • GAP
    a:=[1,6];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
  • Magma
    [n le 2 select 5*n-4 else Self(n-1)+3*Self(n-2): n in [1..40]];
    
  • Magma
    R:=PowerSeriesRing(Integers(), 32); Coefficients(R!((1 + 5*x)/(1- x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    seq(coeff(series((1+5*x)/(1-x-3*x^2), x, n+1), x, n), n = 0..40); # G. C. Greubel, Jan 15 2020
  • Mathematica
    RecurrenceTable[{a[n]==a[n-1] +3a[n-2], a[0]==1, a[1]==6}, a, {n,0,40}]
    Table[Round[Sqrt[3]^(n-1)*(Sqrt[3]*Fibonacci[n+1, 1/Sqrt[3]] + 5*Fibonacci[n, 1/Sqrt[3]])], {n,0,40}] (* G. C. Greubel, Jan 15 2020 *)
    LinearRecurrence[{1,3},{1,6},40] (* Harvey P. Dale, Jul 11 2023 *)
  • PARI
    v=vector(40); v[1]=1; v[2]=6; for(n=3, #v, v[n]=v[n-1]+3*v[n-2]); v
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    a = recur_gen2(1, 6, 1, 3)
    [next(a) for n in range(40)]
    

Formula

G.f.: (1 + 5*x)/(1 - x - 3*x^2).
a(n) = ((13 + 11*sqrt(13))*(1 + sqrt(13))^n + (13 - 11*sqrt(13))*(1 - sqrt(13))^n)/(26*2^n).
3*a(n) + a(n+1) = 9*A105476(n+1).
3*a(n) - a(n+1) = 27*A006130(n-3) with n>1, A006130(-1) = 0.
a(n+1) - a(n) = 27*A105476(n-3) with n>2.
a(n) = 3^((n-1)/2)*( sqrt(3)*Fibonacci(n+1, 1/sqrt(3)) + 5*Fibonacci(n, 1/sqrt(3)) ). - G. C. Greubel, Jan 15 2020
E.g.f.: (1/13)*exp(x/2)*(13*cosh((sqrt(13)*x)/2) + 11*sqrt(13)*sinh((sqrt(13)*x)/2)). - Stefano Spezia, Jan 15 2020

A074357 Coefficient of q^3 in nu(n), where nu(0)=1, nu(1)=b and, for n>=2, nu(n)=b*nu(n-1)+lambda*(1+q+q^2+...+q^(n-2))*nu(n-2) with (b,lambda)=(1,3).

Original entry on oeis.org

0, 0, 0, 0, 0, 30, 168, 639, 2415, 7872, 25542, 77727, 233547, 679410, 1949862, 5490132, 15276456, 41963844, 114153990, 307595853, 822263313, 2181777252, 5751280350, 15069310365, 39269077809, 101817186264, 262776963360
Offset: 0

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002

Keywords

Comments

Coefficient of q^0 is A006130.

Examples

			The first 6 nu polynomials are nu(0)=1, nu(1)=1, nu(2)=4, nu(3)=7+3q, nu(4)=19+15q+12q^2, nu(5)=40+45q+42q^2+30q^3+9q^4, so the coefficients of q^3 are 0,0,0,0,0,30.
		

Crossrefs

Coefficient of q^0, q^1 and q^2 are in A006130, A074355 and A074356. Related sequences with other values of b and lambda are in A074082-A074089, A074352-A074354, A074358-A074363.

Programs

  • Maple
    nu := proc(b,lambda,n) global q; local qp,i ; if n = 0 then RETURN(1) ; elif n =1 then RETURN(b) ; fi ; qp:=0 ; for i from 0 to n-2 do qp := qp + q^i ; od ; RETURN( b*nu(b,lambda,n-1)+lambda*qp*nu(b,lambda,n-2)) ; end: A074357 := proc(n) RETURN( coeftayl(nu(1,3,n),q=0,3) ) ; end: for n from 0 to 30 do printf("%d,", A074357(n)) ; od ; # R. J. Mathar, Sep 20 2006
  • Mathematica
    Join[{0, 0, 0}, LinearRecurrence[{4, 6, -32, -19, 96, 54, -108, -81}, {0, 0, 30, 168, 639, 2415, 7872, 25542}, 24]] (* Jean-François Alcover, Sep 22 2017 *)

Formula

Conjecture: O.g.f.: 3*x^5*(3*x+1)*(36*x^4+24*x^3-29*x^2-14*x+10)/(3*x^2+x-1)^4. - R. J. Mathar, Jul 22 2009

Extensions

More terms from R. J. Mathar, Sep 20 2006
Previous Showing 21-30 of 65 results. Next