A193649 Q-residue of the (n+1)st Fibonacci polynomial, where Q is the triangular array (t(i,j)) given by t(i,j)=1. (See Comments.)
1, 1, 3, 5, 15, 33, 91, 221, 583, 1465, 3795, 9653, 24831, 63441, 162763, 416525, 1067575, 2733673, 7003971, 17938661, 45954543, 117709185, 301527355, 772364093, 1978473511
Offset: 0
Keywords
A081341 Expansion of exp(3*x)*cosh(3*x).
1, 3, 18, 108, 648, 3888, 23328, 139968, 839808, 5038848, 30233088, 181398528, 1088391168, 6530347008, 39182082048, 235092492288, 1410554953728, 8463329722368, 50779978334208, 304679870005248, 1828079220031488, 10968475320188928, 65810851921133568
Offset: 0
Comments
Binomial transform of A081340. 3rd binomial transform of (1,0,9,0,81,0,729,0,...).
For m > 1, n > 0, A166469(A002110(m)*a(n)) = (n+1)*A000045(m+1). For n > 0, A166469(a(n)) = 2n. - Matthew Vandermast, Nov 05 2009
Number of compositions of even natural numbers in n parts <= 5. - Adi Dani, May 29 2011
Examples
From _Adi Dani_, May 29 2011: (Start) a(2)=18: there are 18 compositions of even natural numbers into 2 parts <= 5: for 0: (0,0); for 2: (0,2),(2,0),(1,1); for 4: (0,4),(4,0),(1,3),(3,1),(2,2); for 6: (1,5),(5,1),(2,4),(4,2),(3,3); for 8: (3,5),(5,3),(4,4); for 10: (5,5). (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..125
- Index entries for linear recurrences with constant coefficients, signature (6).
Programs
-
Maple
a:= proc(n) option remember; `if`(n=0, 1, add(3^j*a(n-j), j=1..n)) end: seq(a(n), n=0..30); # Alois P. Heinz, Sep 22 2017
-
Mathematica
Table[Ceiling[1/2(6^n)], {n, 0, 25}] CoefficientList[Series[-(-1 + 3 x)/(1 - 6 x), {x, 0, 50}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 21 2011 *) Join[{1},NestList[6#&,3,30]] (* Harvey P. Dale, May 25 2019 *)
-
PARI
x='x+O('x^66); /* that many terms */ Vec((1-3*x)/(1-6*x)) /* show terms */ /* Joerg Arndt, May 29 2011 */
Formula
a(0)=1, a(n) = 6^n/2, n > 0.
G.f.: (1-3*x)/(1-6*x).
E.g.f.: exp(3*x)*cosh(3*x).
a(n) = ((3+sqrt(9))^n + (3-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
a(n) = Sum_{k=0..n} A134309(n,k)*3^k = Sum_{k=0..n} A055372(n,k)*2^k. - Philippe Deléham, Feb 04 2012
From Sergei N. Gladkovskii, Jul 19 2012: (Start)
a(n) = ((8*n-4)*a(n-1) - 12*(n-2)*a(n-2))/n, a(0)=1, a(1)=3.
E.g.f. (exp(6*x) + 1)/2 = 1 + 3*x/(G(0) - 6*x) where G(k) = 6*x + 1 + k - 6*x*(k+1)/G(k+1) (continued fraction, Euler's 1st kind, 1-step). (End)
"INVERT" transform of A000244. - Alois P. Heinz, Sep 22 2017
Extensions
Typo in A-number fixed by Klaus Brockhaus, Apr 04 2010
A034494 a(n) = (7^n+1)/2.
1, 4, 25, 172, 1201, 8404, 58825, 411772, 2882401, 20176804, 141237625, 988663372, 6920643601, 48444505204, 339111536425, 2373780754972, 16616465284801, 116315256993604, 814206798955225, 5699447592686572, 39896133148806001, 279272932041642004
Offset: 0
Comments
Number of compositions of even natural numbers into n parts <=6. - Adi Dani, May 28 2011
From Charlie Marion, Jun 24 2011: (Start)
a(n)+(a(n)+1)+...+(a(n+1)-7^n-1)=(a(n+1)-7^n)+...+(a(n+1)-1). Let S(2n) and S(2n+1) be the sets of addends on the left- and right-hand sides, respectively, of the preceding equations. Then, since the intersection of any 2 different S(i) is null and the union of all of them is the positive integers, {S(i)} forms a partition of the positive integers. See also A034659.
In general, for k>0, let b(n)=((4k+3)^n+1)/2. Then b(n)+(b(n)+1)+ ... +(b(n+1)-(4k+3)^n-1)=k*((b(n+1)-(4k+3)^n)+ ... +(b(n+1)-1)). Then, for each k, the set of addends on the two sides of these equations also forms a partition of the positive integers. Also, with b(0)=1, b(n)=(4k+3)*b(n-1)-(2k+1).
For k>0, let c(0)=1 and, for n>0, c(n)=(2*(2k+1))^n/2. Then the sequence b(0),b(1),... is the binomial transform of the sequence c(0),c(1),....
For k>0, let d(2n)=(2k+1)^(2n) and d(2n+1)=0. Then the sequence b(0),b(1),... is the (2k+2)nd binomial transform of the sequence d(0),d(1),.... (End)
Examples
From _Adi Dani_, May 28 2011: (Start) a(2)=25: there are 25 compositions of even numbers into 2 parts <=6: (0,0) (0,2),(2,0),(1,1) (0,4),(4,0),(1,3),(3,1),(2,2) (0,6),(6,0),(1,5),(5,1),(2,4),(4,2),(3,3) (2,6),(6,2),(3,5),(5,3),(4,4) (4,6),(6,4),(5,5) (6,6) (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (8,-7).
Programs
-
Magma
[(7^n+1)/2: n in [0..30]]; // Vincenzo Librandi, Jun 16 2011
-
Maple
A034494:=n->(7^n+1)/2: seq(A034494(n), n=0..30); # Wesley Ivan Hurt, Apr 09 2017
-
Mathematica
(7^Range[0, 25] + 1)/2 (* or *) LinearRecurrence[{8, -7}, {1, 4}, 26] (* Paolo Xausa, Aug 14 2025 *)
-
PARI
a(n)=(7^n+1)/2 \\ Charles R Greathouse IV, Jul 02 2013
-
PARI
Vec((1-4*x)/((1-x)*(1-7*x)) + O(x^100)) \\ Altug Alkan, Nov 01 2015
Formula
E.g.f.: exp(4*x)*cosh(3*x). - Paul Barry, Apr 20 2003
a(n) = 7*a(n-1) - 3, a(0) = 1.
G.f.: (1-4*x)/((1-x)*(1-7*x)). - Philippe Deléham, Jul 11 2005
a(n) = 8*a(n-1)-7*a(n-2), a(0)=1, a(1)=4. - Philippe Deléham, Nov 15 2008
a(n) = ((4+sqrt(9))^n+(4-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
A003665 a(n) = 2^(n-1)*( 2^n + (-1)^n ).
1, 1, 10, 28, 136, 496, 2080, 8128, 32896, 130816, 524800, 2096128, 8390656, 33550336, 134225920, 536854528, 2147516416, 8589869056, 34359869440, 137438691328, 549756338176, 2199022206976, 8796095119360, 35184367894528, 140737496743936, 562949936644096, 2251799847239680
Offset: 0
Comments
Binomial transform of expansion of cosh(3*x), the aerated version of A001019, 1,0,9,0,81,0,729,... - Paul Barry, Apr 05 2003
Alternatively: start with the fraction 1/1, take the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 9 times the bottom to get the new top. The limit of the sequence of fractions used to generate this sequence is sqrt(9). - Cino Hilliard, Sep 25 2005
This sequence also gives the number of ordered pairs of subsets (A, B) of {1, 2, ..., n} such that |A u B| is even. (Here "u" stands for the set-theoretic union.) The special case n = 13 can be found as in CRUX Problem 3257. - Walther Janous (walther.janous(AT)tirol.com), Mar 01 2008
For n > 0, a(n) is term (1,1) in the n-th power of the 2 X 2 matrix [1,3; 3,1]. - Gary W. Adamson, Aug 06 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 9 types of other natural numbers. - Milan Janjic, Aug 13 2010
a(n) = ((1+3)^n+(1-3)^n)/2. In general, if b(0),b(1),... is the k-th binomial transform of the sequence ((3^n+(-3)^n)/2), then b(n) = ((k+3)^n+(k-3)^n)/2. More generally, if b(0),b(1),... is the k-th binomial transform of the sequence ((m^n+(-m)^n)/2), then b(n) = ((k+m)^n+(k-m)^n)/2. See A034494, A081340-A081342, A034659. - Charlie Marion, Jun 25 2011
Pisano period lengths: 1, 1, 1, 1, 4, 1, 6, 1, 1, 4, 5, 1, 12, 6, 4, 1, 8, 1, 9, 4, ... - R. J. Mathar, Aug 10 2012
Starting with offset 1 the sequence is the INVERT transform of (1, 9, 9, 9, ...). - Gary W. Adamson, Aug 06 2016
References
- John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.
- M. Gardner, Riddles of Sphinx, M.A.A., 1987, p. 145.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- R. K. Guy, s-Additive sequences, Preprint, 1994. (Annotated scanned copy)
- Bill Sands, Problem 3257, Crux Math. 33 (2007), No.5, p. 298.
- Index entries for linear recurrences with constant coefficients, signature (2,8).
Programs
-
GAP
List([0..30], n-> 2^(n-1)*(2^n +(-1)^n)); # G. C. Greubel, Aug 02 2019
-
Magma
[2^(n-1)*( 2^n + (-1)^n ): n in [0..30]]; // Vincenzo Librandi, Aug 19 2011
-
Maple
A003665:=n->2^(n-1)*( 2^n + (-1)^n ): seq(A003665(n), n=0..30); # Wesley Ivan Hurt, Apr 28 2017
-
Mathematica
CoefficientList[Series[(1+8x)/(1-2x-8x^2), {x,0,30}], x] (* or *) LinearRecurrence[{2,8}, {1,1}, 30] (* Robert G. Wilson v, Sep 18 2013 *)
-
PARI
a(n)=2^(n-1)*( 2^n + (-1)^n );
-
Sage
[2^(n-1)*(2^n +(-1)^n) for n in (0..30)] # G. C. Greubel, Aug 02 2019
Formula
From Paul Barry, Mar 01 2003: (Start)
a(n) = 2*a(n-1) + 8*a(n-2), a(0)=a(1)=1.
a(n) = (4^n + (-2)^n)/2.
G.f.: (1-x)/((1+2*x)*(1-4*x)). (End)
From Paul Barry, Apr 05 2003: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*9^k.
E.g.f. exp(x)*cosh(3*x). (End)
Given a(0)=1, b(0)=1 then for i=1, 2, ..., a(i)/b(i) = (a(i-1) + 9*b(i-1)) / (a(i-1) + b(i-1)). - Cino Hilliard, Sep 25 2005
a(n) = Sum_{k=0..n} A098158(n,k)*9^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = ((1+sqrt(9))^n + (1-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
If p[1]=1, and p[i]=9, (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.: G(0)/2, where G(k) = 1 + 1/(1 - x*(9*k-1)/(x*(9*k+8) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 28 2013
Extensions
Entry revised by N. J. A. Sloane, Nov 22 2006
A081343 a(n) = (10^n + 4^n)/2.
1, 7, 58, 532, 5128, 50512, 502048, 5008192, 50032768, 500131072, 5000524288, 50002097152, 500008388608, 5000033554432, 50000134217728, 500000536870912, 5000002147483648, 50000008589934592, 500000034359738368
Offset: 0
Comments
Binomial transform of A025551. 7th binomial transform of {1, 0, 9, 0, 81, 0, 729, 0, ...}.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (14,-40).
Crossrefs
Cf. A081342.
Programs
-
GAP
List([0..25], n-> (10^n + 4^n)/2); # G. C. Greubel, Jan 07 2020
-
Magma
[(10^n+4^n)/2: n in [0..25]]; // Vincenzo Librandi, Aug 08 2013
-
Maple
seq( (10^n + 4^n)/2, n=0..25); # G. C. Greubel, Jan 07 2020
-
Mathematica
CoefficientList[Series[(1-7x)/((1-4x)(1-10x)), {x, 0, 20}], x] (* Vincenzo Librandi, Aug 08 2013 *)
-
PARI
a(n)=(10^n+4^n)/2 \\ Charles R Greathouse IV, Oct 07 2015
-
Sage
[(10^n + 4^n)/2 for n in (0..25)] # G. C. Greubel, Jan 07 2020
Formula
a(n) = 14*a(n-1) -40*a(n-2), a(0)=1, a(1)=7.
G.f.: (1-7*x)/((1-4*x)*(1-10*x)).
E.g.f.: exp(7*x) * cosh(3*x).
a(n) = ((7+sqrt(9))^n + (7-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
A162516 Triangle of coefficients of polynomials defined by Binet form: P(n,x) = ((x+d)^n + (x-d)^n)/2, where d=sqrt(x+4).
1, 1, 0, 1, 1, 4, 1, 3, 12, 0, 1, 6, 25, 8, 16, 1, 10, 45, 40, 80, 0, 1, 15, 75, 121, 252, 48, 64, 1, 21, 119, 287, 644, 336, 448, 0, 1, 28, 182, 588, 1457, 1360, 1888, 256, 256, 1, 36, 270, 1092, 3033, 4176, 6240, 2304, 2304, 0, 1, 45, 390, 1890, 5925, 10801, 17780, 11680, 12160, 1280, 1024
Offset: 0
Examples
First six rows: 1; 1, 0; 1, 1, 4; 1, 3, 12, 0; 1, 6, 25, 8, 16; 1, 10, 48, 40, 80, 0;
Links
- G. C. Greubel, Rows n = 0..100 of triangle, flattened
Crossrefs
Programs
-
Magma
m:=12; p:= func< n,x | ((x+Sqrt(x+4))^n + (x-Sqrt(x+4))^n)/2 >; R
:=PowerSeriesRing(Rationals(), m+1); T:= func< n,k | Coefficient(R!( p(n,x) ), n-k) >; [T(n,k): k in [0..n], n in [0..m]]; // G. C. Greubel, Jul 09 2023 -
Mathematica
P[n_, x_]:= P[n, x]= ((x+Sqrt[x+4])^n + (x-Sqrt[x+4])^n)/2; T[n_, k_]:= Coefficient[Series[P[n, x], {x,0,n-k+1}], x, n-k]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 08 2020; Jul 09 2023 *)
-
SageMath
def p(n,x): return ((x+sqrt(x+4))^n + (x-sqrt(x+4))^n)/2 def T(n,k): P.
= PowerSeriesRing(QQ) return P( p(n,x) ).list()[n-k] flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 09 2023
Formula
P(n,x) = 2*x*P(n-1,x) - (x^2 -x -4)*P(n-2,x).
From G. C. Greubel, Jul 09 2023: (Start)
T(n, k) = [x^(n-k)] ( ((x+sqrt(x+4))^n + (x-sqrt(x+4))^n)/2 ).
T(n, 1) = A000217(n-1), n >= 1.
T(n, n) = A199572(n).
Sum_{k=0..n} T(n, k) = A084057(n).
Sum_{k=0..n} 2^k*T(n, k) = A125818(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A026150(n).
Sum_{k=0..n} (-2)^k*T(n, k) = A133343(n). (End)
A025551 a(n) = 3^n*(3^n + 1)/2.
1, 6, 45, 378, 3321, 29646, 266085, 2392578, 21526641, 193720086, 1743421725, 15690618378, 141215033961, 1270933711326, 11438398618965, 102945573221778, 926510115949281, 8338590914403366, 75047317842209805, 675425859417626778
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..750
- Index entries for linear recurrences with constant coefficients, signature (12, -27).
Programs
-
GAP
List([0..20], n-> Binomial(3^n+1,2) ); # G. C. Greubel, Jan 08 2020
-
Magma
[Binomial(3^n+1,2): n in [0..20]]; // G. C. Greubel, Jan 08 2020
-
Maple
seq( binomial(3^n +1,2), n=0..20); # G. C. Greubel, Jan 08 2020
-
Mathematica
LinearRecurrence[{12,-27}, {1,6}, 20] (* G. C. Greubel, Jan 08 2020 *) Table[3^n(3^n+1)/2,{n,0,20}] (* Harvey P. Dale, Mar 13 2022 *)
-
PARI
Vec( (1-6*x)/((1-3*x)*(1-9*x)) + O(x^66) ) \\ Joerg Arndt, Sep 01 2013
-
Sage
[binomial(3^n+1,2) for n in (0..20)] # G. C. Greubel, Jan 08 2020
Formula
From Philippe Deléham, Jul 11 2005: (Start)
Binomial transform of A081342.
6th binomial transform of (1, 0, 9, 0, 81, 0, 729, 0, . . ).
Inverse binomial transform of A081343.
a(n) = 12*a(n-1) - 27*a(n-2), a(0) = 1, a(1) = 6.
G.f.: (1-6*x)/((1-3*x)*(1-9*x)).
E.g.f.: exp(7*x)*cosh(3*x). (End)
a(n) = ((6+sqrt(9))^n + (6-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
a(n) = Sum_{k=1..3^n} k. - Joerg Arndt, Sep 01 2013
A120689 a(n) = 10*a(n-1) - 16*a(n-2), with a(0) = 0 and a(1) = 3.
0, 3, 30, 252, 2040, 16368, 131040, 1048512, 8388480, 67108608, 536870400, 4294966272, 34359736320, 274877902848, 2199023247360, 17592186028032, 140737488322560, 1125899906777088, 9007199254609920, 72057594037665792
Offset: 0
Comments
a(n) is a leg in a Pythagorean triangle along with A081342(n) (the hypotenuse) and 4^n. Example: a(4) = 2040, A081342(4) = 2056; then sqrt(2056^2 - 2040^2) = 256 = 4^4. Characteristic polynomial of M = x^2 -10*x + 16.
Order of modular group of degree 2^(n-1)+1. - Artur Jasinski, Aug 04 2007
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- E. Mathieu, Mémoire sur le nombre de valeurs que peut acquérir une fonction quand on y permute ses variables de toutes les manières possibles, Journ. de math. pures et appliquées (2) 5 (1860), 9-42 (see p. 39).
- Index entries for linear recurrences with constant coefficients, signature (10,-16).
Programs
-
Magma
[2^(n-1)*(4^n-1): n in [0..30]]; // G. C. Greubel, Dec 27 2022
-
Maple
a[0]:=0: a[1]:=3; for n from 2 to 20 do a[n]:=10*a[n-1]-16*a[n-2] end do: seq(a[n], n = 0 .. 20); # Emeric Deutsch, Aug 16 2007 seq(binomial(2^n,2)*(2^n + 1),n=0..19); # Zerinvary Lajos, Jan 07 2008
-
Mathematica
Table[2^(n-1) (4^n-1), {n,0,20}] (* Artur Jasinski, Aug 04 2007 *)
-
SageMath
A120689=BinaryRecurrenceSequence(10,-16,0,3) [A120689(n) for n in range(31)] # G. C. Greubel, Dec 27 2022
Formula
a(n) = 8^n - A081342(n).
Given M = 2 X 2 matrix [5,3; 3,5]; M^n * [1,0] = [A081342(a), a(n)]. E.g. a(4) = 2040, right term in = M^4 * [1,0] = [2056, 2040] = [A081342(4), a(4)].
a(n) = 2^(n-1)*(4^n - 1). - Artur Jasinski, Aug 04 2007
From R. J. Mathar, Feb 16 2011: (Start)
a(n) = 3*A016131(n-1).
G.f.: 3*x / ( (1-2*x)*(1-8*x) ). (End)
E.g.f.: (1/2)*(exp(8*x) - exp(2*x)). - G. C. Greubel, Dec 27 2022
Extensions
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 13 2007
More terms from Emeric Deutsch, Aug 16 2007
A083332 a(n) = 10*a(n-2) - 16*a(n-4) for n > 3, a(0) = 1, a(1) = 5, a(2) = 14, a(3) = 34.
1, 5, 14, 34, 124, 260, 1016, 2056, 8176, 16400, 65504, 131104, 524224, 1048640, 4194176, 8388736, 33554176, 67109120, 268434944, 536871424, 2147482624, 4294968320, 17179867136, 34359740416, 137438949376, 274877911040
Offset: 0
Comments
a(n)/A083333(n) converges to 3.
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 10, 0, -16).
Crossrefs
Cf. A199710. [Bruno Berselli, Nov 11 2011]
Programs
-
Mathematica
CoefficientList[Series[(1+5x+4x^2-16x^3)/(1-10x^2+16x^4), {x, 0, 30}], x]
-
Maxima
(a[0] : 1, a[1] : 5, a[2] : 14, a[3] : 34, a[n] := 10*a[n - 2] - 16*a[n - 4], makelist(a[n], n, 0, 50));/* Franck Maminirina Ramaharo, Nov 12 2018 */
Formula
G.f.: (1 + 5*x + 4*x^2 - 16*x^3)/(1 - 10*x^2 + 16*x^4).
From Franck Maminirina Ramaharo, Nov 12 2018: (Start)
a(n) = sqrt(2)^(3*n - 1)*(1 + sqrt(2) + (-1)^n*(sqrt(2) - 1)) + sqrt(2)^(n - 3)*(1 - sqrt(2) - (-1)^n*(sqrt(2) + 1)).
E.g.f.: (sinh(sqrt(2)*x) + 2*sinh(2*sqrt(2)*x))/sqrt(2) - cosh(sqrt(2)*x) + 2*cosh(2*sqrt(2)*x). (End)
A146988 Triangle, read by rows, T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + 4^(n-1) * binomial(n-2, k-1) otherwise.
1, 1, 1, 1, 6, 1, 1, 19, 19, 1, 1, 68, 134, 68, 1, 1, 261, 778, 778, 261, 1, 1, 1030, 4111, 6164, 4111, 1030, 1, 1, 4103, 20501, 40995, 40995, 20501, 4103, 1, 1, 16392, 98332, 245816, 327750, 245816, 98332, 16392, 1, 1, 65545, 458788, 1376340, 2293886, 2293886, 1376340, 458788, 65545, 1
Offset: 0
Comments
Row sums are {1, 2, 8, 40, 272, 2080, 16448, 131200, 1048832, 8389120, 67109888, ...} = {1, 2, 8*A081342(n)}. (modified by G. C. Greubel, Jan 09 2020)
Examples
Triangle begins as: 1; 1, 1; 1, 6, 1; 1, 19, 19, 1; 1, 68, 134, 68, 1; 1, 261, 778, 778, 261, 1; 1, 1030, 4111, 6164, 4111, 1030, 1;
Links
- G. C. Greubel, Rows n = 0..100 of triangle, flattened
Programs
-
GAP
T:= function(n,k,q) if n<2 then return Binomial(n,k); else return Binomial(n,k) + q^(n-1)*Binomial(n-2,k-1); fi; end; Flat(List([0..10], n-> List([0..n], k-> T(n,k,4) ))); # G. C. Greubel, Jan 09 2020
-
Magma
T:= func< n,k,q | n lt 2 select Binomial(n,k) else Binomial(n,k) + q^(n-1)*Binomial(n-2,k-1) >; [T(n,k,4): k in [0..n], n in [0..10]]; // G. C. Greubel, Jan 09 2020
-
Maple
q:=4; seq(seq( `if`(n<2, binomial(n,k), binomial(n,k) + q^(n-1)*binomial(n-2,k-1)), k=0..n), n=0..10); # G. C. Greubel, Jan 09 2020
-
Mathematica
Table[If[n<2, Binomial[n, m], Binomial[n, m] + 4^(n-1)*Binomial[n-2, m-1]], {n, 0, 10}, {m, 0, n}]//Flatten
-
PARI
T(n,k) = if(n<2, binomial(n,k), binomial(n,k) + 4^(n-1)*binomial(n-2,k-1) ); \\ G. C. Greubel, Jan 09 2020
-
Sage
@CachedFunction def T(n, k, q): if (n<2): return binomial(n,k) else: return binomial(n,k) + q^(n-1)*binomial(n-2,k-1) [[T(n, k, 4) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jan 09 2020
Formula
T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + 2^(n-1) * binomial(n-2, k-1) otherwise.
Sum_{k=0..n} T(n,k) = n+1 for n < 2 and 4*(2^n + 8^n) otherwise. - G. C. Greubel, Jan 09 2020
Extensions
Edited by G. C. Greubel, Jan 09 2020
Comments
Examples
Crossrefs
Programs
Mathematica
Formula