A054458 Convolution triangle based on A001333(n), n >= 1.
1, 3, 1, 7, 6, 1, 17, 23, 9, 1, 41, 76, 48, 12, 1, 99, 233, 204, 82, 15, 1, 239, 682, 765, 428, 125, 18, 1, 577, 1935, 2649, 1907, 775, 177, 21, 1, 1393, 5368, 8680, 7656, 4010, 1272, 238, 24, 1, 3363, 14641, 27312, 28548, 18358, 7506, 1946, 308, 27, 1
Offset: 0
Examples
Fourth row polynomial (n=3): p(3,x)= 17+23*x+9*x^2+x^3. Triangle begins : 1 3, 1 7, 6, 1 17, 23, 9, 1 41, 76, 48, 12, 1 99, 233, 204, 82, 15, 1 239, 682, 765, 428, 125, 18, 1. - _Philippe Deléham_, Mar 25 2012 (0, 3, -2/3, -1/3, 0, 0, 0, ...) DELTA (1, 0, 0, 0, ...) begins : 1 0, 1 0, 3, 1 0, 7, 6, 1 0, 17, 23, 9, 1 0, 41, 76, 48, 12, 1 0, 99, 233, 204, 82, 15, 1 0, 239, 682, 765, 428, 125, 15, 1. - _Philippe Deléham_, Mar 25 2012
Links
- Milan Janjić, Words and Linear Recurrences, J. Int. Seq. 21 (2018), #18.1.4.
Crossrefs
Formula
a(n, m) := ((n-m+1)*a(n, m-1) + (2n-m)*a(n-1, m-1) + (n-1)*a(n-2, m-1))/(4*m), n >= m >= 1; a(n, 0)= A001333(n+1); a(n, m) := 0 if n
G.f. for column m: LPell(x)*(x*LPell(x))^m, m >= 0, with LPell(x)= (1+x)/(1-2*x-x^2) = g.f. for A001333(n+1).
G.f.: (1+x)/(1-2*x-y*x-x^2-y*x^2). - Philippe Deléham, Mar 25 2012
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1), T(0,0) = T(1,1) = 1, T(1,0) = 3 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 25 2012
A212835 T(n,k)=Number of 0..k arrays of length n+1 with 0 never adjacent to k.
2, 7, 2, 14, 17, 2, 23, 50, 41, 2, 34, 107, 178, 99, 2, 47, 194, 497, 634, 239, 2, 62, 317, 1106, 2309, 2258, 577, 2, 79, 482, 2137, 6306, 10727, 8042, 1393, 2, 98, 695, 3746, 14407, 35954, 49835, 28642, 3363, 2, 119, 962, 6113, 29114, 97127, 204994, 231521
Offset: 1
Comments
Table starts
.2.....7......14.......23........34.........47.........62..........79
.2....17......50......107.......194........317........482.........695
.2....41.....178......497......1106.......2137.......3746........6113
.2....99.....634.....2309......6306......14407......29114.......53769
.2...239....2258....10727.....35954......97127.....226274......472943
.2...577....8042....49835....204994.....654797....1758602.....4159927
.2..1393...28642...231521...1168786....4414417...13667858....36590017
.2..3363..102010..1075589...6663906...29760487..106226618...321839625
.2..8119..363314..4996919..37994674..200635007..825593474..2830847119
.2.19601.1293962.23214443.216628994.1352612477.6416514026.24899654327
Examples
Some solutions for n=5 k=4 ..1....4....1....1....1....3....2....1....1....4....3....1....0....2....2....3 ..1....3....0....4....2....4....1....1....2....2....3....4....1....3....3....1 ..1....3....3....1....3....3....2....2....2....4....3....3....1....1....0....3 ..1....3....0....4....2....3....3....3....4....2....2....0....4....4....2....1 ..1....4....0....3....2....2....3....3....4....4....0....1....4....3....4....2 ..1....2....0....4....3....1....0....2....4....2....3....2....1....4....3....4
Links
- R. H. Hardin, Table of n, a(n) for n = 1..9999
Crossrefs
Formula
Empirical for column k: a(n) = k*a(n-1) +(k-1)*a(n-2)
Empirical for rows:
n=1: a(k) = k^2 + 2*k - 1
n=2: a(k) = k^3 + 3*k^2 - k - 1
n=3: a(k) = k^4 + 4*k^3 - 4*k + 1
n=4: a(k) = k^5 + 5*k^4 + 2*k^3 - 8*k^2 + k + 1
n=5: a(k) = k^6 + 6*k^5 + 5*k^4 - 12*k^3 - 3*k^2 + 6*k - 1
n=6: a(k) = k^7 + 7*k^6 + 9*k^5 - 15*k^4 - 13*k^3 + 15*k^2 - k - 1
n=7: a(k) = k^8 + 8*k^7 + 14*k^6 - 16*k^5 - 30*k^4 + 24*k^3 + 8*k^2 - 8*k + 1
A108851 a(n) = 4*a(n-1) + 3*a(n-2), a(0) = 1, a(1) = 2.
1, 2, 11, 50, 233, 1082, 5027, 23354, 108497, 504050, 2341691, 10878914, 50540729, 234799658, 1090820819, 5067682250, 23543191457, 109375812578, 508132824683, 2360658736466, 10967033419913, 50950109889050
Offset: 0
Comments
Binomial transform of A083098, second binomial transform of (1, 0, 7, 0, 49, 0, 243, 0, ...).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,3).
Crossrefs
Cf. A080042. - Zerinvary Lajos, May 14 2009
Programs
-
Magma
[Floor(((2 + Sqrt(7))^n + (2 - Sqrt(7))^n) / 2): n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
-
Mathematica
LinearRecurrence[{4,3},{1,2},30] (* Harvey P. Dale, Jan 02 2022 *)
-
PARI
a(n)=round(((2+sqrt(7))^n+(2-sqrt(7))^n)/2) \\ Charles R Greathouse IV, Dec 06 2011
-
Sage
[lucas_number2(n,4,-3)/2 for n in range(0, 22)] # Zerinvary Lajos, May 14 2009
Formula
a(n) = ((2 + sqrt(7))^n + (2 - sqrt(7))^n) / 2.
G.f.: (1 - 2*x) / (1 - 4*x - 3*x^2).
E.g.f.: exp(2*x)*cosh(sqrt(7)*x).
a(n+1)/a(n) converges to 2 + sqrt(7) = 4.645751311064...
Limit_{k->oo} a(n+k)/a(k) = A108851(n) + A015530(n)*sqrt(7); also lim_{n->oo} A108851(n)/A015530(n) = sqrt(7). - Johannes W. Meijer, Aug 01 2010
a(n) = Sum_{k=0..n} A201730(n,k)*6^k. - Philippe Deléham, Dec 06 2011
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(7*k-4)/(x*(7*k+3) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 27 2013
a(n) = (2 + sqrt(7))^n - A015530(n)*sqrt(7). - Robert FERREOL, Aug 04 2025
A287839 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9.
1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807
Offset: 0
Comments
In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).
Links
- Colin Barker, Table of n, a(n) for n = 0..900
- Index entries for linear recurrences with constant coefficients, signature (10,7).
Crossrefs
Programs
-
Maple
a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # Wesley Ivan Hurt, Nov 25 2017
-
Mathematica
LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
-
PARI
Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
-
Python
def a(n): if n in [0,1,2]: return [1, 11, 117][n] return 10*a(n-1) + 7*a(n-2)
Formula
For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.
G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).
a(n) = (((5-4*sqrt(2))^n*(-3+2*sqrt(2)) + (3+2*sqrt(2))*(5+4*sqrt(2))^n)) / (4*sqrt(2)). - Colin Barker, Nov 25 2017
A254600 Numbers of words on alphabet {0,1,...,10} with no subwords ii, for i from {0,1}.
1, 11, 119, 1289, 13961, 151211, 1637759, 17738489, 192124721, 2080893611, 22538058599, 244108628489, 2643928812281, 28636265779211, 310158017102639, 3359306563039289, 36384487784316641, 394078636910520011, 4268246759164049879, 46229175323835178889
Offset: 0
Comments
a(n) equals the number of sequences over the alphabet {0,1,...,9,10} such that no two consecutive terms have distance 10. - David Nacin, Jun 02 2017
Links
- Colin Barker, Table of n, a(n) for n = 0..950
- Index entries for linear recurrences with constant coefficients, signature (10,9).
Programs
-
Magma
[n le 1 select 11^n else 10*Self(n)+9*Self(n-1): n in [0..20]]; // Bruno Berselli, Feb 03 2015
-
Mathematica
RecurrenceTable[{a[0]==1, a[1]==11, a[n]== 10a[n-1] +9a[n-2]}, a[n], {n, 0, 25}] Table[(-3 I)^(n-1)*(ChebyshevU[n-1, 5*I/3] - 3*I*ChebyshevU[n, 5*I/3]), {n,0,25}] (* G. C. Greubel, Feb 13 2021 *)
-
PARI
Vec((x+1) / (1-10*x-9*x^2) + O(x^30)) \\ Colin Barker, Jan 21 2017
-
Sage
[(-3*i)^(n-1)*( chebyshev_U(n-1, 5*i/3) -3*i*chebyshev_U(n, 5*i/3) ) for n in (0..30)] # G. C. Greubel, Feb 13 2021
Formula
G.f.: (1+x)/(1-10*x-9*x^2).
a(n) = 10*a(n-1) + 9*a(n-2) with n>1, a(0) = 1, a(1) = 11.
a(n) = ((5-sqrt(34))^n*(-6+sqrt(34)) + (5+sqrt(34))^n*(6+sqrt(34))) / (2*sqrt(34)). - Colin Barker, Jan 21 2017
a(n) = (-3*i)^(n-1) * (ChebyshevU(n-1, 5*i/3) - 3*i*ChebyshevU(n, 5*i/3)). - G. C. Greubel, Feb 13 2021
A287831 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 8.
1, 10, 96, 924, 8892, 85572, 823500, 7924932, 76265388, 733938084, 7063035084, 67970944260, 654116708844, 6294876045156, 60578584659468, 582976518206148, 5610260171812140, 53990200655546148, 519573366930788172, 5000101506310370436, 48118353758378062956
Offset: 0
Comments
In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10.
Links
- Index entries for linear recurrences with constant coefficients, signature (9,6).
Crossrefs
Programs
-
Mathematica
LinearRecurrence[{9, 6}, {1, 10}, 30]
-
Python
def a(n): if n in [0, 1]: return [1, 10][n] return 9*a(n-1)+6*a(n-2)
Formula
a(n) = 9*a(n-1) + 6*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 6*x^2).
a(n) = ((1 - 11/sqrt(105))/2)*((9 - sqrt(105))/2)^n + ((1 + 11/sqrt(105))/2)*((9 + sqrt(105))/2)^n.
A254657 Numbers of words on alphabet {0,1,...,8} with no subwords ii, where i is from {0,1,2}.
1, 9, 78, 678, 5892, 51204, 444984, 3867096, 33606672, 292055952, 2538087648, 22057036896, 191684821056, 1665820789824, 14476675244928, 125808326698368, 1093326665056512, 9501463280642304, 82571666235477504, 717582109567673856, 6236086873954255872
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (8,6).
Programs
-
Magma
[n le 1 select 9^n else 8*Self(n)+6*Self(n-1): n in [0..20]];
-
Mathematica
RecurrenceTable[{a[0] == 1, a[1] == 9, a[n] == 8 a[n - 1] + 6 a[n - 2]}, a[n], {n, 0, 20}]
-
PARI
Vec((1+x)/(1-8*x-6*x^2) + O(x^30)) \\ Colin Barker, Nov 16 2016
Formula
G.f.: (1 + x)/(1 - 8*x - 6*x^2).
a(n) = 8*a(n-1) + 6*a(n-2) with n>1, a(0) = 1, a(1) = 9.
a(n) = (((4-sqrt(22))^n*(-5+sqrt(22)) + (4+sqrt(22))^n*(5+sqrt(22))))/(2*sqrt(22)). - Colin Barker, Nov 16 2016
A254601 Numbers of n-length words on alphabet {0,1,...,6} with no subwords ii, where i is from {0,1,2}.
1, 7, 46, 304, 2008, 13264, 87616, 578752, 3822976, 25252864, 166809088, 1101865984, 7278432256, 48078057472, 317582073856, 2097804673024, 13857156333568, 91534156693504, 604633565495296, 3993938019745792, 26382162380455936, 174268726361718784
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6,4).
Programs
-
Magma
[n le 1 select 7^n else 6*Self(n)+4*Self(n-1): n in [0..25]]; // Bruno Berselli, Feb 03 2015
-
Mathematica
RecurrenceTable[{a[0] == 1, a[1] == 7, a[n] == 6 a[n - 1] + 4 a[n - 2]}, a[n], {n, 0, 25}] LinearRecurrence[{6,4},{1,7},30] (* Harvey P. Dale, Oct 10 2017 *)
-
PARI
Vec((1 + x)/(1 - 6*x - 4*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017
Formula
G.f.: (1 + x)/(1 - 6*x - 4*x^2).
a(n) = 6*a(n-1) + 4*a(n-2) with n>1, a(0) = 1, a(1) = 7.
a(n) = ((3-r)^n*(-4+r) + (3+r)^n*(4+r)) / (2*r), where r=sqrt(13). - Colin Barker, Jan 22 2017
A254658 Numbers of words on alphabet {0,1,...,7} with no subwords ii, where i is from {0,1,2,3}.
1, 8, 60, 452, 3404, 25636, 193068, 1454020, 10950412, 82468964, 621084396, 4677466628, 35226603980, 265296094372, 1997979076524, 15047037913156, 113321181698188, 853436423539940, 6427339691572332, 48405123535166084, 364545223512451916, 2745437058727827748
Offset: 0
Comments
a(n) equals the number of octonary sequences of length n such that no two consecutive terms differ by 6. - David Nacin, May 31 2017
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7,4).
Programs
-
Magma
[n le 1 select 8^n else 7*Self(n)+4*Self(n-1): n in [0..20]];
-
Mathematica
RecurrenceTable[{a[0] == 1, a[1] == 8, a[n] == 7 a[n - 1] + 4 a[n - 2]}, a[n], {n, 0, 20}] LinearRecurrence[{7,4},{1,8},30] (* Harvey P. Dale, Jan 21 2023 *)
-
PARI
Vec((1 + x) / (1 - 7*x -4*x^2) + O(x^30)) \\ Colin Barker, Jan 21 2017
Formula
G.f.: (1 + x)/(1 - 7*x -4*x^2).
a(n) = 7*a(n-1) + 4*a(n-2) with n>1, a(0) = 1, a(1) = 8.
a(n) = (2^(-1-n)*((7-sqrt(65))^n*(-9+sqrt(65)) + (7+sqrt(65))^n*(9+sqrt(65)))) / sqrt(65). - Colin Barker, Jan 21 2017
A254660 Numbers of words on alphabet {0,1,...,6} with no subwords ii, where i is from {0,1,...,4}.
1, 7, 44, 278, 1756, 11092, 70064, 442568, 2795536, 17658352, 111541184, 704563808, 4450465216, 28111918912, 177572443904, 1121658501248, 7085095895296, 44753892374272, 282693546036224, 1785669060965888, 11279401457867776, 71247746869138432
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6,2).
Programs
-
Mathematica
RecurrenceTable[{a[0] == 1, a[1] == 7, a[n] == 6 a[n - 1] + 2 a[n - 2]}, a[n], {n, 0, 20}] LinearRecurrence[{6,2},{1,7},30] (* Harvey P. Dale, Sep 11 2024 *)
-
PARI
Vec((1 + x) / (1 - 6*x -2*x^2) + O(x^30)) \\ Colin Barker, Jan 21 2017
Formula
G.f.: (1 + x)/(1 - 6*x -2*x^2).
a(n) = 6*a(n-1) + 2*a(n-2) with n>1, a(0) = 1, a(1) = 7.
a(n) = ((3-sqrt(11))^n*(-4+sqrt(11)) + (3+sqrt(11))^n*(4+sqrt(11))) / (2*sqrt(11)). - Colin Barker, Jan 21 2017
Comments