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

A028860 a(n+2) = 2*a(n+1) + 2*a(n); a(0) = -1, a(1) = 1.

Original entry on oeis.org

-1, 1, 0, 2, 4, 12, 32, 88, 240, 656, 1792, 4896, 13376, 36544, 99840, 272768, 745216, 2035968, 5562368, 15196672, 41518080, 113429504, 309895168, 846649344, 2313089024, 6319476736, 17265131520, 47169216512, 128868696064, 352075825152, 961889042432, 2627929735168
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 04 2014
(A002605, a(.+1)) is the canonical basis of the space of linear recurrent sequences with signature (2, 2), i.e., any sequence s(n) = 2(s(n-1) + s(n-2)) is given by s = s(0)*A002605 + s(1)*a(.+1). - M. F. Hasler, Aug 06 2018

Crossrefs

Programs

  • GAP
    a:=[-1,1];; for n in [3..30] do a[n]:=2*a[n-1]+2*a[n-2]; od; a; # Muniru A Asiru, Aug 07 2018
    
  • Haskell
    a028860 n = a028860_list !! n
    a028860_list =
       -1 : 1 : map (* 2) (zipWith (+) a028860_list (tail a028860_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    I:=[-1,1]; [n le 2 select I[n] else 2*Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 13 2018
    
  • Maple
    seq(coeff(series((3*x-1)/(1-2*x-2*x^2), x,n+1),x,n),n=0..30); # Muniru A Asiru, Aug 07 2018
  • Mathematica
    (With a different offset) M = {{0, 2}, {1, 2}} v[1] = {0, 1} v[n_] := v[n] = M.v[n - 1] a = Table[Abs[v[n][[1]]], {n, 1, 50}] (* Roger L. Bagula, May 29 2005 *)
    LinearRecurrence[{2,2},{-1,1},40] (* Harvey P. Dale, Dec 13 2012 *)
    CoefficientList[Series[(-3 x + 1)/(2 x^2 + 2 x - 1), {x, 0, 27}], x] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( A028860(n)=([2,2;1,0]^n)[2,]*[1,-1]~, [0..30]) \\ 15% faster than (A^n*[1,-1]~)[2]. - M. F. Hasler, Aug 06 2018
    
  • SageMath
    A028860 = BinaryRecurrenceSequence(2,2,-1,1)
    [A028860(n) for n in range(51)] # G. C. Greubel, Dec 08 2022

Formula

a(n) = 4*A028859(n-4), for n > 3.
From R. J. Mathar, Nov 27 2008: (Start)
G.f.: -(1 - 3*x)/(1 - 2*x - 2*x^2).
a(n) = 3*A002605(n-1) - A002605(n). (End)
a(n) = det A, where A is the Hessenberg matrix of order n+1 defined by: A[i,j] = p(j - i + 1) (i <= j), A[i,j] = -1 (i = j + 1), A[i,j] = 0 otherwise, with p(i) = fibonacci(2i - 4). - Milan Janjic, May 08 2010, edited by M. F. Hasler, Aug 06 2018
a(n) = (2*sqrt(3) - 3)/6*(1 + sqrt(3))^n - (2*sqrt(3) + 3)/6*(1 - sqrt(3))^n. - Sergei N. Gladkovskii, Jul 18 2012
a(n) = 2*A002605(n-2) for n >= 2. - M. F. Hasler, Aug 06 2018
E.g.f.: exp(x)*(2*sqrt(3)*sinh(sqrt(3)*x) - 3*cosh(sqrt(3)*x))/3. - Franck Maminirina Ramaharo, Nov 11 2018

Extensions

Edited by N. J. A. Sloane, Apr 11 2009
Edited and initial values added in definition by M. F. Hasler, Aug 06 2018

A155116 a(n) = 3*a(n-1) + 3*a(n-2), n>2, a(0)=1, a(1)=2, a(2)=8.

Original entry on oeis.org

1, 2, 8, 30, 114, 432, 1638, 6210, 23544, 89262, 338418, 1283040, 4864374, 18442242, 69919848, 265086270, 1005018354, 3810313872, 14445996678, 54768931650, 207644784984, 787241149902, 2984657804658, 11315696863680, 42901064005014
Offset: 0

Views

Author

Philippe Deléham, Jan 20 2009

Keywords

Comments

From Johannes W. Meijer, Aug 14 2010: (Start)
A berserker sequence, see A180140 and A180147. For the central square 16 A[5] vectors with decimal values between 3 and 384 lead to this sequence. These vectors lead for the corner squares to A123620 and for the side squares to A180142.
This sequence belongs to a family of sequences with GF(x)=(1-(2*k-1)*x-k*x^2)/(1-3*x+(k-4)*x^2). Berserker sequences that are members of this family are A000007 (k=2), A155116 (k=1; this sequence), A000302 (k=0), 6*A179606 (k=-1; with leading 1 added) and 2*A180141 (k=-2; n>=1 and a(0)=1). Some other members of this family are (-2)*A003688 (k=3; with leading 1 added), (-4)*A003946 (k=4; with leading 1 added), (-6)*A002878 (k=5; with leading 1 added) and (-8)*A033484 (k=6; with leading 1 added).
Inverse binomial transform of A101368 (without the first leading 1).
(End)

Crossrefs

Sequences of the form a(n) = m*(a(n-1) + a(n-2)) with a(0)=1, a(1) = m-1, a(2) = m^2 -1: A155020 (m=2), this sequence (m=3), A155117 (m=4), A155119 (m=5), A155127 (m=6), A155130 (m=7), A155132 (m=8), A155144 (m=9), A155157 (m=10).

Programs

  • Magma
    m:=3; [1] cat [n le 2 select (m-1)*(m*n-(m-1)) else m*(Self(n-1) + Self(n-2)): n in [1..30]]; // G. C. Greubel, Mar 25 2021
    
  • Mathematica
    With[{m=3}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 25 2021 *)
  • PARI
    Vec((1-x-x^2)/(1-3*x-3*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • Sage
    m=3; [1]+[-(m-1)*(sqrt(m)*i)^(n-2)*chebyshev_U(n, -sqrt(m)*i/2) for n in (1..30)] # G. C. Greubel, Mar 25 2021

Formula

G.f.: (1-x-x^2)/(1-3*x-3*x^2).
a(n) = 2*A125145(n-1), n>=1 .
a(n) = ( (2+4*A)*A^(-n-1) + (2+4*B)*B^(-n-1) )/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6 for n>=1 with a(0)=1. [corrected by Johannes W. Meijer, Aug 12 2010]
Contribution from Johannes W. Meijer, Aug 14 2010: (Start)
a(n) = A123620(n)/2 for n>=1.
(End)
a(n) = (1/3)*[n=0] - 2*(sqrt(3)*i)^(n-2)*ChebyshevU(n, -sqrt(3)*i/2). - G. C. Greubel, Mar 25 2021

A106435 a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 9, 36, 135, 513, 1944, 7371, 27945, 105948, 401679, 1522881, 5773680, 21889683, 82990089, 314639316, 1192888215, 4522582593, 17146412424, 65006985051, 246460192425, 934401532428, 3542585174559, 13430960120961
Offset: 0

Views

Author

Roger L. Bagula, May 29 2005

Keywords

Comments

The first entry of the vector v[n] = M*v[n-1], where M is the 2 x 2 matrix [[0,3],[1,3]] and v[1] is the column vector [0,1]. The characteristic polynomial of the matrix M is x^2-3x-3.

Crossrefs

Programs

  • Haskell
    a106435 n = a106435_list !! n
    a106435_list = 0 : 3 : map (* 3) (zipWith (+) a106435_list (tail
    a106435_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    a:=[0,3]; [n le 2 select a[n] else    3*Self(n-1) + 3*Self(n-2) : n in [1..24]]; // Marius A. Burtea, Jan 21 2020
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 25); Coefficients(R!(3*x/(1-3*x-3*x^2))); // Marius A. Burtea, Jan 21 2020
    
  • Maple
    seq(coeff(series(3*x/(1-3*x-3*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Mar 12 2020
  • Mathematica
    LinearRecurrence[{3,3}, {0,3}, 30] (* G. C. Greubel, Mar 12 2020 *)
  • PARI
    a(n)=([0,3;1,3]^n)[1,2]
    
  • Sage
    [3^((n+1)/2)*i^(1-n)*chebyshev_U(n-1, i*sqrt(3)/2) for n in (0..30)] # G. C. Greubel, Mar 12 2020

Formula

G.f.: 3*x/(1-3*x-3*x^2). - Philippe Deléham, Nov 19 2008
From G. C. Greubel, Mar 12 2020: (Start)
a(n) = 3^((n+1)/2) * Fibonacci(n, sqrt(3)), where F(n, x) is the Fibonacci polynomial.
a(n) = 3^((n+1)/2)*i^(1-n)*ChebyshevU(n-1, i*sqrt(3)/2). (End)

Extensions

Edited by N. J. A. Sloane, May 20 2006 and May 29 2006
Offset corrected by Reinhard Zumkeller, Oct 15 2011

A154929 A Fibonacci convolution triangle.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 5, 10, 6, 1, 8, 22, 21, 8, 1, 13, 45, 59, 36, 10, 1, 21, 88, 147, 124, 55, 12, 1, 34, 167, 339, 366, 225, 78, 14, 1, 55, 310, 741, 976, 770, 370, 105, 16, 1, 89, 566, 1557, 2422, 2337, 1443, 567, 136, 18, 1, 144, 1020, 3174, 5696, 6505, 4920, 2485
Offset: 0

Views

Author

Paul Barry, Jan 17 2009

Keywords

Comments

Row sums are A028859. Diagonal sums are A141015(n+1). Inverse is A154930. Product of A030528 and A007318.
Transforms sequence m^n with g.f. 1/(1-m*x) to the sequence with g.f. (1+x)/(1-(m+1)x-(m+1)x^2).
Subtriangle of triangle T(n,k), given by (0, 2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. This triangle is the Riordan array (1, x(1+x)/(1-x-x^2)). - Philippe Deléham, Jan 25 2012

Examples

			Triangle begins
   1;
   2,   1;
   3,   4,   1;
   5,  10,   6,   1;
   8,  22,  21,   8,   1;
  13,  45,  59,  36,  10,   1;
  21,  88, 147, 124,  55,  12,   1;
  34, 167, 339, 366, 225,  78,  14,  1;
  55, 310, 741, 976, 770, 370, 105, 16, 1;
Production array is
     2,    1;
    -1,    2,   1;
     3,   -1,   2,   1;
   -10,    3,  -1,   2,  1;
    36,  -10,   3,  -1,  2,  1;
  -137,   36, -10,   3, -1,  2, 1;
   543, -137,  36, -10,  3, -1, 2, 1;
or ((1+x+sqrt(1+6x+5x^2))/2,x) beheaded.
T(5,3) = T(4,3) + T(4,2) + T(3,3) + T(3,2) = 8 + 21 + 1 + 6 = 36. - _Philippe Deléham_, Jan 18 2009
From _Philippe Deléham_, Jan 25 2012: (Start)
Triangle (0,2,-1/2,-1/2,0,0,0,...) DELTA (1,0,0,0,0,0,...) begins:
  1;
  0,   1;
  0,   2,   1;
  0,   3,   4,   1;
  0,   5,  10,   6,   1;
  0,   8,  22,  21,   8,   1;
  0,  13,  45,  59,  36,  10,   1;
  0,  21,  88, 147, 124,  55,  12,   1; (End)
		

Programs

  • Mathematica
    Table[Sum[Binomial[j + 1, n - j] Binomial[j, k], {j, 0, n}], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 25 2018 *)

Formula

Riordan array ((1+x)/(1-x-x^2), x(1+x)/(1-x-x^2));
Triangle T(n,k) = Sum_{j=0..n} C(j+1,n-j)*C(j,k).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1), T(0,0)=1, T(1,0)=2, T(n,k)=0 if k > n. - Philippe Deléham, Jan 18 2009
Sum_{k=0..n} T(n,k)*x^k = A000045(n+1), A028859(n), A125145(n), A086347(n+1) for x=0,1,2,3 respectively. - Philippe Deléham, Jan 19 2009

A083337 a(n) = 2*a(n-1) + 2*a(n-2); a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 6, 18, 48, 132, 360, 984, 2688, 7344, 20064, 54816, 149760, 409152, 1117824, 3053952, 8343552, 22795008, 62277120, 170144256, 464842752, 1269974016, 3469633536, 9479215104, 25897697280, 70753824768, 193303044096, 528113737728, 1442833563648, 3941894602752, 10769456332800
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083337 n = a083337_list !! n
    a083337_list =
       0 : 3 : map (* 2) (zipWith (+) a083337_list (tail a083337_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Mathematica
    CoefficientList[Series[3x/(1-2x-2x^2), {x, 0, 25}], x]
    s = Sqrt[3]; a[n_] := Simplify[s*((1 + s)^n - (1 - s)^n)/2]; Array[a, 30, 0] (* or *)
    LinearRecurrence[{2, 2}, {0, 3}, 31] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( a(n)=([1,1;3,1]^n)[2,1], [0..30]) \\ or: ([2,2;1,0]^n)[2,1]*3. - M. F. Hasler, Aug 06 2018

Formula

G.f.: 3x/(1 - 2x - 2x^2).
a(n) = a(n-1) + 3*A026150(n-1). a(n)/A026150(n) converges to sqrt(3).
a(n) = lower left term of [1,1; 3,1]^n. - Gary W. Adamson, Mar 12 2008

Extensions

Edited and definition completed by M. F. Hasler, Aug 06 2018

A108898 a(n+3) = 3*a(n+2) - 2*a(n), a(0) = -1, a(1) = 1, a(2) = 3.

Original entry on oeis.org

-1, 1, 3, 11, 31, 87, 239, 655, 1791, 4895, 13375, 36543, 99839, 272767, 745215, 2035967, 5562367, 15196671, 41518079, 113429503, 309895167, 846649343, 2313089023, 6319476735, 17265131519, 47169216511, 128868696063, 352075825151, 961889042431, 2627929735167, 7179637555199
Offset: 0

Views

Author

Creighton Dement, Jul 16 2005

Keywords

Comments

In reference to the program code, "ibasek" corresponds to the floretion 'ik'. Sequences in this same batch are "kbase" = A005665 (Tower of Hanoi with cyclic moves only.) and "ibase" = A077846.

Crossrefs

Programs

  • Haskell
    a108898 n = a108898_list !! n
    a108898_list = -1 : 1 : 3 :
       zipWith (-) (map (* 3) $ drop 2 a108898_list) (map (* 2) a108898_list)
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Maple
    seriestolist(series((-1+4*x)/((x-1)*(2*x^2+2*x-1)), x=0,31)); -or- Floretion Algebra Multiplication Program, FAMP Code: 2ibaseksumseq[A*B] with A = + 'i + 'ii' + 'ij' + 'ik' and B = + .5'i + .5'j - .5'k + .5i' - .5j' + .5k' + .5'ij' + .5'ik' - .5'ji' - .5'ki'; Sumtype is set to:sum[(Y[0], Y[1], Y[2]),mod(3)
  • Mathematica
    LinearRecurrence[{3, 0, -2}, {-1, 1, 3}, 40] (* Paolo Xausa, Aug 21 2024 *)
  • PARI
    Vec(-(1 - 4*x) / ((1 - x)*(1 - 2*x - 2*x^2)) + O(x^40)) \\ Colin Barker, Apr 29 2019

Formula

a(n) = A028860(n+2)-1.
G.f.: (-1+4*x)/((x-1)*(2*x^2+2*x-1)).
From Colin Barker, Apr 29 2019: (Start)
a(n) = (-1 + (-(1-sqrt(3))^n + (1+sqrt(3))^n)/sqrt(3)).
a(n) = 3*a(n-1) - 2*a(n-3) for n>2.
(End)

A181253 T(n,k)=Number of nXk binary matrices with no 2X2 block having four 1's.

Original entry on oeis.org

2, 4, 4, 8, 15, 8, 16, 57, 57, 16, 32, 216, 417, 216, 32, 64, 819, 3032, 3032, 819, 64, 128, 3105, 22077, 42176, 22077, 3105, 128, 256, 11772, 160697, 587920, 587920, 160697, 11772, 256, 512, 44631, 1169792, 8191392, 15701273, 8191392, 1169792, 44631, 512
Offset: 1

Views

Author

R. H. Hardin, Oct 10 2010

Keywords

Examples

			Table starts
....2......4.........8...........16..............32.................64
....4.....15........57..........216.............819...............3105
....8.....57.......417.........3032...........22077.............160697
...16....216......3032........42176..........587920............8191392
...32....819.....22077.......587920........15701273..........419045269
...64...3105....160697......8191392.......419045269........21418970801
..128..11772...1169792....114142368.....11185495872......1095020802848
..256..44631...8515337...1590466304....298561305103.....55979092539545
..512.169209..61986457..22161786304...7969215344753...2861765993703849
.1024.641520.451223152.308805072256.212714316418464.146298965997241152
		

Crossrefs

Diagonal is A139810.
Column 2 is A125145.

Formula

Empirical column 1: a(n)=2*a(n-1)
Empirical column 2: a(n)=3*a(n-1)+3*a(n-2)
Empirical column 3: a(n)=6*a(n-1)+10*a(n-2)-5*a(n-3)
Empirical column 4: a(n)=10*a(n-1)+54*a(n-2)+16*a(n-3)-64*a(n-4)
Empirical column 5: a(n)=20*a(n-1)+188*a(n-2)-192*a(n-3)-1660*a(n-4)+2804*a(n-5)-507*a(n-6)-624*a(n-7)
Empirical column 6: a(n)=33*a(n-1)+908*a(n-2)+1687*a(n-3)-37947*a(n-4)-16572*a(n-5)+513993*a(n-6)-663729*a(n-7)-486540*a(n-8)+617409*a(n-9)+191835*a(n-10)-49140*a(n-11)
Empirical column 7: a(n)=68*a(n-1)+3106*a(n-2)-10300*a(n-3)-731184*a(n-4)+3930848*a(n-5)+47046600*a(n-6)-471525808*a(n-7)+1012118640*a(n-8)+2396096576*a(n-9)-9445394304*a(n-10)-4382776896*a(n-11)+29415041536*a(n-12)+8676097024*a(n-13)-36065068032*a(n-14)-14871987200*a(n-15)+10138337280*a(n-16)+2907136000*a(n-17)-1119682560*a(n-18)
Empirical column 8: a(n)=113*a(n-1)+13879*a(n-2)+91506*a(n-3)-13567062*a(n-4)-45766270*a(n-5)+5948333641*a(n-6)-25692714697*a(n-7)-932093986319*a(n-8)+9749317949468*a(n-9)+6293344318720*a(n-10)-400364584466276*a(n-11)+544975615003201*a(n-12)+8011657063605359*a(n-13)-12237642139437047*a(n-14)-98976024373360414*a(n-15)+87321080164809042*a(n-16)+743714645681446194*a(n-17)-21941742884172873*a(n-18)-2838216189512832023*a(n-19)-1559534908222727729*a(n-20)+4451110188283146640*a(n-21)+3110756142589939204*a(n-22)-3806251587192837456*a(n-23)-2258950594106495040*a(n-24)+1998716044109621760*a(n-25)+565195437997056000*a(n-26)-541032812384256000*a(n-27)+28184753405952000*a(n-28)+19493777571840000*a(n-29)

A229412 T(n,k)=Number of nXk 0..3 arrays avoiding 11 horizontally, 22 vertically, 33 antidiagonally and 00 diagonally.

Original entry on oeis.org

4, 15, 15, 57, 163, 57, 216, 1756, 1756, 216, 819, 18712, 53538, 18712, 819, 3105, 199595, 1629298, 1629298, 199595, 3105, 11772, 2127718, 49788258, 142475606, 49788258, 2127718, 11772, 44631, 22684613, 1519840402, 12462062342
Offset: 1

Views

Author

R. H. Hardin Sep 22 2013

Keywords

Comments

Table starts
.....4........15............57..............216..................819
....15.......163..........1756............18712...............199595
....57......1756.........53538..........1629298.............49788258
...216.....18712.......1629298........142475606..........12462062342
...819....199595......49788258......12462062342........3113479414050
..3105...2127718....1519840402....1088122273732......777638567093963
.11772..22684613...46408035676...95053083585891...194334416016079648
.44631.241841143.1416912709750.8301763765531574.48554820719187209670

Examples

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

Crossrefs

Column 1 is A125145

Formula

Empirical for column k:
k=1: a(n) = 3*a(n-1) +3*a(n-2)
k=2: a(n) = 10*a(n-1) +13*a(n-2) -67*a(n-3) +38*a(n-4) -2*a(n-5)
k=3: [order 13]
k=4: [order 40]

A180165 Triangle read by rows, derived from an array of sequences generated from (1 + x)/ (1 - r*x - r*x^2).

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 8, 5, 1, 5, 15, 22, 8, 1, 6, 24, 57, 60, 13, 1, 7, 35, 116, 216, 164, 21, 1, 8, 48, 205, 560, 819, 448, 34, 1, 9, 63, 330, 1200, 2704, 3105, 1224, 55, 1, 10, 80, 497, 2268, 7025, 13056, 11772, 3344, 89, 1, 11, 99, 712, 3920, 15588, 41125, 63040, 44631, 9136, 144
Offset: 1

Views

Author

Gary W. Adamson, Aug 14 2010

Keywords

Comments

Row sums = A180166: (1, 3, 7, 18, 51, 161, 560, 2163, ...).
Rows of the array, with other offsets: (row 1 = A000045 starting with offset 2: (1, 2, 3, 5, 8, 13, ...); and for rows > 1, the entries: A028859, A125145, A086347, and A180033 start with offset 0; with the offset in the present array = 1.

Examples

			First few rows of the triangle:
  1;
  1, 2;
  1, 3, 3;
  1, 4, 8, 5;
  1, 5, 15, 22, 8;
  1, 6, 24, 57, 60, 13;
  1, 7, 35, 116, 216, 164, 21;
  1, 8, 48, 205, 560, 819, 448, 34;
  1, 9, 63, 330, 1200, 2704, 3105, 1224, 55;
  1, 10, 80, 497, 2268, 7025, 13056, 11772, 3344, 89;
  1, 11, 99, 712, 3920, 15588, 41125, 63040, 44631, 9136, 144;
  1, 12, 120, 981, 6336, 30919, 107136, 240750, 304384, 169209, 24960, 233;
  ...
As an array A(r,k) by upwards antidiagonals:
        k=1  k=2  k=3   k=4    k=5
  r=1:   1,   2,    3,    5,     8, ...
  r=2:   1,   3,    8,   22,    60, ...
  r=3:   1,   4,   15,   57,   216, ...
  r=4:   1,   5,   24,  116,   560, ...
  r=5:   1,   6,   35,  205,  1200, ...
Row r=5 = A180033 = (1, 6, 35, 205,...) and is generated from (1+x)/(1-5*x-5*x^2); is the INVERT transform of row r=4; and the array term A(5,4) = 205 = 5*35 + 5*6.
Terms A(2,4) and A(2,5) = [22,60] = [0,1; 2,2]^3 * [1,3].
		

Crossrefs

Programs

  • Mathematica
    A180165[a_] := Reverse[Table[Table[CoefficientList[Series[(1 + x)/(1 - r*x - r*x^2), {x, 0, a - 2}], x], {r, 1, a + 1}][[k, n - k]], {n, 1, a}, {k, 1, n - 1}], 2] // Flatten;
    A180165[12] (* Robert P. P. McKone, Jan 19 2021 *)

Formula

Triangle read by rows, generated from an array of sequences generated from (1 + x)/(1 - r*x - r*x^2); r > 0.
Alternatively, given the array with offset 1, the sequence r-th sequence is generated from a(k) = r*a(k-1) + r*(k-2); a(1) = 1, a(2) = r+1.
With a matrix method, the array can be generated from a 2 X 2 matrix of the form [0,1; r,r] = M, such that M^n * [1,r+1] = [r,n+1; r,n+2].
Also, for r > 1, the (r+1)-th row of the array is the INVERT transform of the r-th row.

Extensions

a(35) corrected by Robert P. P. McKone, Dec 31 2020

A340156 Square array read by upward antidiagonals: T(n, k) is the number of n-ary strings of length k containing 00.

Original entry on oeis.org

1, 1, 3, 1, 5, 8, 1, 7, 21, 19, 1, 9, 40, 79, 43, 1, 11, 65, 205, 281, 94, 1, 13, 96, 421, 991, 963, 201, 1, 15, 133, 751, 2569, 4612, 3217, 423, 1, 17, 176, 1219, 5531, 15085, 20905, 10547, 880, 1, 19, 225, 1849, 10513, 39186, 86241, 92935, 34089, 1815
Offset: 2

Views

Author

Robert P. P. McKone, Dec 29 2020

Keywords

Examples

			For n = 3 and k = 4, there are 21 strings: {0000, 0001, 0002, 0010, 0011, 0012, 0020, 0021, 0022, 0100, 0200, 1000, 1001, 1002, 1100, 1200, 2000, 2001, 2002, 2100, 2200}.
Square table T(n,k):
     k=2:  k=3:  k=4:   k=5:    k=6:     k=7:
n=2:   1     3     8     19      43       94
n=3:   1     5    21     79     281      963
n=4:   1     7    40    205     991     4612
n=5:   1     9    65    421    2569    15085
n=6:   1    11    96    751    5531    39186
n=7:   1    13   133   1219   10513    87199
n=8:   1    15   176   1849   18271   173608
n=9:   1    17   225   2665   29681   317817
		

Crossrefs

Cf. A008466 (row 2), A186244 (row 3), A000567 (column 4).
Cf. A180165 (not containing 00), A340242 (containing 000).

Programs

  • Mathematica
    m[r_] := Normal[With[{p = 1/n}, SparseArray[{Band[{1, 2}] -> p, {i_, 1} /; i <= r -> 1 - p, {r + 1, r + 1} -> 1}]]];
    T[n_, k_, r_] := MatrixPower[m[r], k][[1, r + 1]]*n^k;
    Reverse[Table[T[n, k - n + 2, 2], {k, 2, 11}, {n, 2, k}], 2] // Flatten (* Robert P. P. McKone, Jan 26 2021 *)

Formula

T(n, k) = n^k - A180165(n+1,k-1), where A180165 in the number of strings not containing 00.
m(2) = [1 - 1/n, 1/n, 0; 1 - 1/n, 0, 1/n; 0, 0, 1], is the probability/transition matrix for two consecutive "0" -> "containing 00".
Previous Showing 11-20 of 23 results. Next