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-5 of 5 results.

A368518 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 1 + 2*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 + 3*x^2.

Original entry on oeis.org

1, 1, 2, 2, 4, 7, 3, 10, 18, 20, 5, 20, 51, 68, 61, 8, 40, 118, 220, 251, 182, 13, 76, 264, 584, 905, 888, 547, 21, 142, 558, 1452, 2678, 3540, 3076, 1640, 34, 260, 1145, 3380, 7279, 11536, 13418, 10456, 4921, 55, 470, 2286, 7548, 18391, 33990, 47600, 49552
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
   1
   1    2
   2    4    7
   3   10   18    20
   5   20   51    68    61
   8   40  118   220   251   182
  13   76  264   584   905   888   547
  21  142  558  1452  2678  3540  3076  1640
Row 4 represents the polynomial p(4,x) = 3 + 10*x + 18*x^2 + 20*x^3, so (T(4,k)) = (3,10,18,20), k=0..3.
		

Crossrefs

Cf. A000045 (column 1); A002605, (p(n,n-1)); A030195 (row sums), (p(n,1)); A182228 (alternating row sums), (p(n,-1)); A015545, (p(n,2)); A099012, (p(n,-2)); A087567, (p(n,3)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367299, A367300, A367301, A368150, A368151, A368152, A368153, A368154, A368155, A368156.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 1 + 2 x; u[x_] := p[2, x]; v[x_] := 1 + 3x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 1 + 2*x, u = p(2,x), and v = 1 + 32*x^2.
p(n,x) = k*(b^n - c^n), where k = -1/sqrt(5 + 4*x + 16*x^2), b = (1/2)*(2*x + 1 - 1/k), c = (1/2)*(2*x + 1 + 1/k).

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

A368153 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 1 + 2*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 - 3*x - x^2.

Original entry on oeis.org

1, 1, 2, 2, 1, 3, 3, 4, -2, 4, 5, 5, 4, -10, 5, 8, 10, -3, 4, -25, 6, 13, 16, 1, -29, 14, -49, 7, 21, 28, -8, -24, -78, 56, -84, 8, 34, 47, -12, -88, -26, -162, 168, -132, 9, 55, 80, -31, -140, -200, 100, -330, 408, -195, 10, 89, 135, -58, -301, -230, -296
Offset: 1

Views

Author

Clark Kimberling, Jan 20 2024

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
   1
   1   2
   2   1   3
   3   4  -2    4
   5   5   4  -10    5
   8  10  -3    4  -25    6
  13  16   1  -29   14  -49    7
  21  28  -8  -24  -78   56  -84   8
Row 4 represents the polynomial p(4,x) = 3 + 4*x - 2*x^2 + 4*x^3, so (T(4,k)) = (3,4,-2,4), k=0..3.
		

Crossrefs

Cf. A000045 (column 1); A000027 (p(n,n-1)); A057083 (row sums), (p(n,1)); A182228 (alternating row sums), (p(n,-1)); A190970, (p(n,2)); A030195, (p(n,-2)); A052918, (p(n,-3)); A190972, (p(n,-4)); A057085, (p(n,-5)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367299, A367300, A367301, A368150, A368151, A368152.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 1 + 2 x; u[x_] := p[2, x]; v[x_] := 1 - 3x - x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 1 + 2*x, u = p(2,x), and v = 1 - 3*x - x^2.
p(n,x) = k*(b^n - c^n), where k = -1/sqrt(5 - 8*x), b = (1/2)*(2*x + 1 - 1/k), c = (1/2)*(2*x + 1 + 1/k).

A368157 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 1 + 2*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 + 2*x^2.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 3, 10, 16, 16, 5, 20, 46, 56, 44, 8, 40, 108, 184, 188, 120, 13, 76, 244, 496, 692, 608, 328, 21, 142, 520, 1248, 2088, 2480, 1920, 896, 34, 260, 1074, 2936, 5764, 8256, 8592, 5952, 2448, 55, 470, 2156, 6616, 14764, 24760, 31200, 28992
Offset: 1

Views

Author

Clark Kimberling, Jan 20 2024

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
   1
   1    2
   2    4    6
   3   10   16    16
   5   20   46    56    44
   8   40  108   184   188   120
  13   76  244   496   692   608   328
  21  142  520  1248  2088  2480  1920  896
Row 4 represents the polynomial p(4,x) = 3 + 10*x + 16*x^2 + 16*x^3, so (T(4,k)) = (3,10,16,16), k=0..3.
		

Crossrefs

Cf. A000045 (column 1); A002605, (p(n,n-1)); A030195 (row sums), (p(n,1)); A182228 (alternating row sums), (p(n,-1)); A015545, (p(n,2)); A099012, (p(n,-2)); A087567, (p(n,3)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367299, A367300, A367301, A368150, A368151, A368152, A368153, A368154, A368155, A368156.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 1 + 2 x; u[x_] := p[2, x]; v[x_] := 1 + 2x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 1 + 2*x, u = p(2,x), and v = 1 + 2*x^2.
p(n,x) = k*(b^n - c^n), where k = -1/sqrt(5 + 4*x + 13*x^2), b = (1/2)*(2*x + 1 - 1/k), c = (1/2)*(2*x + 1 + 1/k).
Showing 1-5 of 5 results.