A159741
a(n) = 8*(2^n - 1).
Original entry on oeis.org
8, 24, 56, 120, 248, 504, 1016, 2040, 4088, 8184, 16376, 32760, 65528, 131064, 262136, 524280, 1048568, 2097144, 4194296, 8388600, 16777208, 33554424, 67108856, 134217720, 268435448, 536870904, 1073741816, 2147483640, 4294967288, 8589934584, 17179869176, 34359738360
Offset: 1
Al Hakanson (hawkuu(AT)gmail.com), Apr 20 2009
From _R. J. Mathar_, Apr 22 2009: (Start)
The base table is
.1..1....1....1....1....1....1....1....1....1....1....1....1....1
.1..1....1....1....1....1....1....1....1....1....1....1....1....1
.2..2....2....2....2....2....2....2....2....2....2....2....2....2
.0..2....3....4....4....4....4....4....4....4....4....4....4....4
.0..2....5....7....8....8....8....8....8....8....8....8....8....8
.0..2....8...13...15...16...16...16...16...16...16...16...16...16
.0..2...13...24...29...31...32...32...32...32...32...32...32...32
.0..2...21...44...56...61...63...64...64...64...64...64...64...64
.0..2...34...81..108..120..125..127..128..128..128..128..128..128
.0..2...55..149..208..236..248..253..255..256..256..256..256..256
.0..2...89..274..401..464..492..504..509..511..512..512..512..512
.0..2..144..504..773..912..976.1004.1016.1021.1023.1024.1024.1024
.0..2..233..927.1490.1793.1936.2000.2028.2040.2045.2047.2048.2048
.0..2..377.1705.2872.3525.3840.3984.4048.4076.4088.4093.4095.4096
Columns: A000045, A000073, A000078, A001591, A001592 etc. (End)
-
[8*(2^n -1): n in [1..50]]; // G. C. Greubel, May 22 2018
-
T := proc(n,m) option remember ; if n < 0 then 0; elif n <= 1 then 1; elif n = 2 then 2; else add(procname(n-i,m),i=1..m) ; fi: end: A159741 := proc(n) T(n+4,n+1) ; end: seq(A159741(n),n=1..40) ; # R. J. Mathar, Apr 22 2009
-
Table[8(2^n-1),{n,60}] (* Vladimir Joseph Stephan Orlovsky, Apr 18 2011 *)
LinearRecurrence[{3,-2},{8,24},30] (* Harvey P. Dale, Jan 01 2019 *)
-
a(n)=8*(2^n-1) \\ Charles R Greathouse IV, Sep 24 2015
Edited by Al Hakanson (hawkuu(AT)gmail.com), May 11 2009
Comments claiming negative entries deleted by
R. J. Mathar, Aug 24 2009
A107066
Expansion of 1/(1-2*x+x^5).
Original entry on oeis.org
1, 2, 4, 8, 16, 31, 60, 116, 224, 432, 833, 1606, 3096, 5968, 11504, 22175, 42744, 82392, 158816, 306128, 590081, 1137418, 2192444, 4226072, 8146016, 15701951, 30266484, 58340524, 112454976, 216763936, 417825921, 805385358, 1552430192, 2992405408, 5768046880
Offset: 0
G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4 + 31*x^5 + 60*x^6 + 116*x^7 + 224*x^8 + ...
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Otto Dunkel, Solutions of a probability difference equation, Amer. Math. Monthly, 32 (1925), 354-370; see p. 356.
- Jia Huang, A coin flip game and generalizations of Fibonacci numbers, arXiv:2501.07463 [math.CO], 2025. See p. 7.
- Thomas Langley, Jeffrey Liese, and Jeffrey Remmel, Generating Functions for Wilf Equivalence Under Generalized Factor Order, J. Int. Seq. 14 (2011), Article #11.4.2.
- Index entries for linear recurrences with constant coefficients, signature (2,0,0,0,-1).
Column k = 1 of array
A140996 (with a different offset) and second main diagonal of
A140995.
Column k = 4 of
A172119 (with a different offset).
-
a:=[1,2,4,8,16];; for n in [6..40] do a[n]:=2*a[n-1]-a[n-5]; od; a; # G. C. Greubel, Jun 12 2019
-
I:=[1,2,4,8,16]; [n le 5 select I[n] else 2*Self(n-1) - Self(n-5): n in [1..40]]; // G. C. Greubel, Jun 12 2019
-
CoefficientList[Series[1/(1 - 2*z + z^5), {z, 0, 40}], z] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2011 *)
LinearRecurrence[{2,0,0,0,-1}, {1,2,4,8,16}, 40] (* G. C. Greubel, Jun 12 2019 *)
-
{a(n) = if( n<0, n = -n; polcoeff( -x^5 / (1 - 2*x^4 + x^5) + x * O(x^n), n), polcoeff( 1 / (1 - 2*x + x^5) + x * O(x^n), n))} /* Michael Somos, Dec 28 2012 */
-
(1/(1-2*x+x^5)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
A048888
a(n) = Sum_{m=1..n} T(m,n+1-m), array T as in A048887.
Original entry on oeis.org
0, 1, 2, 4, 7, 13, 23, 42, 76, 139, 255, 471, 873, 1627, 3044, 5718, 10779, 20387, 38673, 73561, 140267, 268065, 513349, 984910, 1892874, 3643569, 7023561, 13557019, 26200181, 50691977, 98182665, 190353369, 369393465, 717457655
Offset: 0
From _Joerg Arndt_, Dec 28 2012: (Start)
There are a(6)=23 compositions p(1)+p(2)+...+p(m)=6 such that p(k)<=p(1)+1:
[ 1] [ 1 1 1 1 1 1 ]
[ 2] [ 1 1 1 1 2 ]
[ 3] [ 1 1 1 2 1 ]
[ 4] [ 1 1 2 1 1 ]
[ 5] [ 1 1 2 2 ]
[ 6] [ 1 2 1 1 1 ]
[ 7] [ 1 2 1 2 ]
[ 8] [ 1 2 2 1 ]
[ 9] [ 2 1 1 1 1 ]
[10] [ 2 1 1 2 ]
[11] [ 2 1 2 1 ]
[12] [ 2 1 3 ]
[13] [ 2 2 1 1 ]
[14] [ 2 2 2 ]
[15] [ 2 3 1 ]
[16] [ 3 1 1 1 ]
[17] [ 3 1 2 ]
[18] [ 3 2 1 ]
[19] [ 3 3 ]
[20] [ 4 1 1 ]
[21] [ 4 2 ]
[22] [ 5 1 ]
[23] [ 6 ]
(End)
-
N = 66; x = 'x + O('x^N);
gf = sum(n=0,N, (1-x^n)*x^n/(1-2*x+x^(n+1)) ) + 'c0;
v = Vec(gf); v[1]-='c0; v
/* Joerg Arndt, Apr 14 2013 */
A122189
Heptanacci numbers: each term is the sum of the preceding 7 terms, with a(0),...,a(6) = 0,0,0,0,0,0,1.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 32, 64, 127, 253, 504, 1004, 2000, 3984, 7936, 15808, 31489, 62725, 124946, 248888, 495776, 987568, 1967200, 3918592, 7805695, 15548665, 30972384, 61695880, 122895984, 244804400, 487641600, 971364608, 1934923521
Offset: 0
- Robert Price, Table of n, a(n) for n = 0..1000
- Tomás Aguilar-Fraga, Jennifer Elder, Rebecca E. Garcia, Kimberly P. Hadaway, Pamela E. Harris, Kimberly J. Harry, Imhotep B. Hogan, Jakeyl Johnson, Jan Kretschmann, Kobe Lawson-Chavanu, J. Carlos Martínez Mori, Casandra D. Monroe, Daniel Quiñonez, Dirk Tolson III, and Dwight Anderson Williams II, Interval and L-interval Rational Parking Functions, arXiv:2311.14055 [math.CO], 2023. See p. 14.
- Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
- Taras Goy and Mark Shattuck, Some Toeplitz-Hessenberg Determinant Identities for the Tetranacci Numbers, J. Int. Seq., Vol. 23 (2020), Article 20.6.8.
- Tian-Xiao He, Impulse Response Sequences and Construction of Number Sequence Identities, J. Int. Seq. 16 (2013) #13.8.2.
- F. T. Howard and Curtis Cooper, Some identities for r-Fibonacci numbers, Fibonacci Quart. 49 (2011), no. 3, 231-243.
- Omar Khadir, László Németh, and László Szalay, Tiling of dominoes with ranked colors, Results in Math. (2024) Vol. 79, Art. No. 253. See p. 2.
- Benjamin E. Merkel, Probabilities of Consecutive Events in Coin Flipping, Master's Thesis, Univ. Cincinatti, May 11 2011.
- László Németh and László Szalay, Explicit solution of system of two higher-order recurrences, arXiv:2408.12196 [math.NT], 2024. See p. 10.
- Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,1,1,1).
-
for n from 0 to 50 do k(n):=sum((-1)^i*binomial(n-6-7*i,i)*2^(n-6-8*i),i=0..floor((n-6)/8))-sum((-1)^i*binomial(n-7-7*i,i)*2^(n-7-8*i),i=0..floor((n-7)/8)):od:seq(k(n),n=0..50); a:=taylor((z^6-z^7)/(1-2*z+z^8),z=0,51);for p from 0 to 50 do j(p):=coeff(a,z,p):od :seq(j(p),p=0..50); # Richard Choulet, Feb 22 2010
-
LinearRecurrence[{1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
a={0,0,0,0,0,0,1} For[n=7, n≤100, n++, sum=Plus@@a; Print[sum]; a=RotateLeft[a]; a[[7]]=sum] (* Robert Price, Dec 04 2014 *)
-
a(n)=([0,1,0,0,0,0,0; 0,0,1,0,0,0,0; 0,0,0,1,0,0,0; 0,0,0,0,1,0,0; 0,0,0,0,0,1,0; 0,0,0,0,0,0,1; 1,1,1,1,1,1,1]^n*[0;0;0;0;0;0;1])[1,1] \\ Charles R Greathouse IV, Jun 20 2015
Wrong Binet-type formula removed by
R. J. Mathar, Feb 13 2009
A106273
Discriminant of the polynomial x^n - x^(n-1) - ... - x - 1.
Original entry on oeis.org
1, 5, -44, -563, 9584, 205937, -5390272, -167398247, 6042477824, 249317139869, -11597205023744, -601139006326619, 34383289858207744, 2151954708695291177, -146323302326154543104, -10742330662077208945103, 846940331265064719417344, 71373256668946058057974997
Offset: 1
- Vincenzo Librandi, Table of n, a(n) for n = 1..200
- Mohammad K. Azarian, On the Hyperfactorial Function, Hypertriangular Function, and the Discriminants of Certain Polynomials, International Journal of Pure and Applied Mathematics 36(2), 2007, pp. 251-257. MR2312537. Zbl 1133.11012.
- Michael Baake and Uwe Grimm, Fourier transform of Rauzy fractals and point spectrum of 1D Pisot inflation tilings, arXiv:1907.11012 [math.MG], 2019.
- Herbert Batte and Florian Luca, The Discriminant of the Characteristic Polynomial of the kth Fibonacci sequence is not a member of the kth Lucas sequence, arXiv:2504.02514 [math.NT], 2025.
- Florian Luca, On the discriminant of the k-generalized Fibonacci polynomial, II, Fibonacci Quart. 62 (2024), no. 3, 193-200.
- Eric Weisstein's World of Mathematics, Fibonacci n-Step Number
- Eric Weisstein's World of Mathematics, Polynomial Discriminant
Cf.
A086797 (discriminant of the polynomial x^n-x-1),
A000045,
A000073,
A000078,
A001591,
A001592 (Fibonacci n-step sequences),
A000032,
A001644,
A073817,
A074048,
A074584,
A104621,
A105754,
A105755 (Lucas n-step sequences),
A086937,
A106276,
A106277,
A106278 (number of distinct zeros of these polynomials for n=2, 3, 4, 5).
-
Discriminant[p_?PolynomialQ, x_] := With[{n=Exponent[p, x]}, Cancel[((-1)^(n(n-1)/2) Resultant[p, D[p, x], x])/Coefficient[p, x, n]^(2n-1)]]; Table[Discriminant[x^n-Sum[x^i, {i, 0, n-1}], x], {n, 20}]
-
{a(n)=(-1)^(n*(n+1)/2)*((n+1)^(n+1)-2*(2*n)^n)/(n-1)^2} \\ Max Alekseyev, May 05 2005
-
a(n)=poldisc('x^n-sum(k=0,n-1,'x^k)); \\ Joerg Arndt, May 04 2013
A209972
Number of binary words of length n avoiding the subword given by the binary expansion of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 4, 1, 1, 1, 2, 4, 5, 5, 1, 1, 1, 2, 4, 7, 8, 6, 1, 1, 1, 2, 4, 7, 12, 13, 7, 1, 1, 1, 2, 4, 7, 12, 20, 21, 8, 1, 1, 1, 2, 4, 7, 12, 21, 33, 34, 9, 1, 1, 1, 2, 4, 8, 13, 20, 37, 54, 55, 10, 1, 1, 1, 2, 4, 8, 15, 24, 33, 65, 88, 89, 11, 1, 1
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 2, 2, 2, 2, 2, 2, 2, ...
1, 1, 3, 3, 4, 4, 4, 4, 4, ...
1, 1, 4, 5, 7, 7, 7, 7, 8, ...
1, 1, 5, 8, 12, 12, 12, 13, 15, ...
1, 1, 6, 13, 20, 21, 20, 24, 28, ...
1, 1, 7, 21, 33, 37, 33, 44, 52, ...
1, 1, 8, 34, 54, 65, 54, 81, 96, ...
1, 1, 9, 55, 88, 114, 88, 149, 177, ...
Columns give: 0, 1:
A000012, 2:
A001477(n+1), 3:
A000045(n+2), 4, 6:
A000071(n+3), 5:
A005251(n+3), 7:
A000073(n+3), 8, 12, 14:
A008937(n+1), 9, 11, 13:
A049864(n+2), 10:
A118870, 15:
A000078(n+4), 16, 20, 24, 26, 28, 30:
A107066, 17, 19, 23, 25, 29:
A210003, 18, 22:
A209888, 21:
A152718(n+3), 27:
A210021, 31:
A001591(n+5), 32:
A001949(n+5), 33, 35, 37, 39, 41, 43, 47, 49, 53, 57, 61:
A210031.
-
A[n_, k_] := Module[{bb, cnt = 0}, Do[bb = PadLeft[IntegerDigits[j, 2], n]; If[SequencePosition[bb, IntegerDigits[k, 2], 1]=={}, cnt++], {j, 0, 2^n-1 }]; cnt];
Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 01 2021 *)
A238888
Number A(n,k) of self-inverse permutations p on [n] with displacement of elements restricted by k: |p(i)-i| <= k, square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 4, 5, 1, 1, 1, 2, 4, 8, 8, 1, 1, 1, 2, 4, 10, 15, 13, 1, 1, 1, 2, 4, 10, 22, 29, 21, 1, 1, 1, 2, 4, 10, 26, 48, 56, 34, 1, 1, 1, 2, 4, 10, 26, 66, 103, 108, 55, 1, 1, 1, 2, 4, 10, 26, 76, 158, 225, 208, 89, 1, 1, 1, 2, 4, 10, 26, 76, 206, 376, 492, 401, 144, 1
Offset: 0
A(4,0) = 1: 1234.
A(4,1) = 5: 1234, 1243, 1324, 2134, 2143.
A(4,2) = 8: 1234, 1243, 1324, 1432, 2134, 2143, 3214, 3412.
A(4,3) = 10: 1234, 1243, 1324, 1432, 2134, 2143, 3214, 3412, 4231, 4321.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, 2, 2, 2, ...
1, 3, 4, 4, 4, 4, 4, 4, 4, ...
1, 5, 8, 10, 10, 10, 10, 10, 10, ...
1, 8, 15, 22, 26, 26, 26, 26, 26, ...
1, 13, 29, 48, 66, 76, 76, 76, 76, ...
1, 21, 56, 103, 158, 206, 232, 232, 232, ...
1, 34, 108, 225, 376, 546, 688, 764, 764, ...
Columns k=0-10 give:
A000012,
A000045(n+1),
A000078(n+3),
A239075,
A239076,
A239077,
A239078,
A239079,
A239080,
A239081,
A239082.
-
b:= proc(n, k, s) option remember; `if`(n=0, 1, `if`(n in s,
b(n-1, k, s minus {n}), b(n-1, k, s) +add(`if`(i in s, 0,
b(n-1, k, s union {i})), i=max(1, n-k)..n-1)))
end:
A:= (n, k)-> `if`(k>n, A(n, n), b(n, k, {})):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
b[n_, k_, s_] := b[n, k, s] = If[n == 0, 1, If[MemberQ[s, n], b[n-1, k, DeleteCases[s, n]], b[n-1, k, s] + Sum[If[MemberQ[s, i], 0, b[n-1, k, s ~Union~ {i}]], {i, Max[1, n-k], n-1}]]]; A[n_, k_] := If[k>n, A[n, n], b[n, k, {}]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Mar 12 2014, translated from Maple *)
A050232
a(n) is the number of n-tosses having a run of 4 or more heads for a fair coin (i.e., probability is a(n)/2^n).
Original entry on oeis.org
0, 0, 0, 1, 3, 8, 20, 48, 111, 251, 558, 1224, 2656, 5713, 12199, 25888, 54648, 114832, 240335, 501239, 1042126, 2160676, 4468664, 9221281, 18989899, 39034824, 80103276, 164126496, 335808927, 686182387, 1400438814, 2854992080, 5814293120, 11829648225, 24046855887, 48840756608
Offset: 1
- W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.
- T. D. Noe, Table of n, a(n) for n = 1..300
- Simon Cowell, A Formula for the Reliability of a d-dimensional Consecutive-k-out-of-n:F System, arXiv preprint arXiv:1506.03580 [math.CO], 2015.
- T. Langley, J. Liese, and J. Remmel, Generating Functions for Wilf Equivalence Under Generalized Factor Order, J. Int. Seq. 14 (2011) # 11.4.2.
- Eric Weisstein's World of Mathematics, Run
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-1,-1,-2).
-
R:= PowerSeriesRing(Integers(), 50);
[0,0,0] cat Coefficients(R!( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) )); // G. C. Greubel, Jun 01 2025
-
Flatten[With[{tetrnos=LinearRecurrence[{1,1,1,1},{0,1,1,2},50]}, Table[ 2^n- Take[tetrnos,{n+3}],{n,40}]]] (* Harvey P. Dale, Dec 02 2011 *)
LinearRecurrence[{3,-1,-1,-1,-2}, {0,0,0,1,3}, 31] (* Ray Chandler, Aug 03 2015 *)
-
a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -2,-1,-1,-1,3]^(n-1)*[0;0;0;1;3])[1,1] \\ Charles R Greathouse IV, Feb 09 2017
-
def a(n, adict={0:0, 1:0, 2:0, 3:1, 4:3}):
if n in adict:
return adict[n]
adict[n]=3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - 2*a(n-5)
return adict[n] # David Nacin, Mar 07 2012
-
def A050232_list(prec):
P.= PowerSeriesRing(QQ, prec)
return P( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) ).list()
a=A050232_list(41); a[1:] # G. C. Greubel, Jun 01 2025
A126198
Triangle read by rows: T(n,k) (1 <= k <= n) = number of compositions of n into parts of size <= k.
Original entry on oeis.org
1, 1, 2, 1, 3, 4, 1, 5, 7, 8, 1, 8, 13, 15, 16, 1, 13, 24, 29, 31, 32, 1, 21, 44, 56, 61, 63, 64, 1, 34, 81, 108, 120, 125, 127, 128, 1, 55, 149, 208, 236, 248, 253, 255, 256, 1, 89, 274, 401, 464, 492, 504, 509, 511, 512, 1, 144, 504, 773, 912, 976, 1004, 1016, 1021, 1023, 1024
Offset: 1
Triangle begins:
1;
1, 2;
1, 3, 4;
1, 5, 7, 8;
1, 8, 13, 15, 16;
1, 13, 24, 29, 31, 32;
1, 21, 44, 56, 61, 63, 64;
Could also be extended to a square array:
1 1 1 1 1 1 1 ...
1 2 2 2 2 2 2 ...
1 3 4 4 4 4 4 ...
1 5 7 8 8 8 8 ...
1 8 13 15 16 16 16 ...
1 13 24 29 31 32 32 ...
1 21 44 56 61 63 64 ...
which when read by antidiagonals (downwards) gives A048887.
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 154-155.
2nd column = Fibonacci numbers, next two columns are
A000073,
A000078; last three diagonals are 2^n, 2^n-1, 2^n-3.
-
A126198 := proc(n,k) coeftayl( x*(1-x^k)/(1-2*x+x^(k+1)),x=0,n); end: for n from 1 to 11 do for k from 1 to n do printf("%d, ",A126198(n,k)); od; od; # R. J. Mathar, Mar 09 2007
# second Maple program:
T:= proc(n, k) option remember;
if n=0 or k=1 then 1
else add(T(n-j, k), j=1..min(n, k))
fi
end:
seq(seq(T(n, k), k=1..n), n=1..15); # Alois P. Heinz, Oct 23 2011
-
rows = 11; t[n_, k_] := Sum[ (-1)^i*2^(n-i*(k+1))*Binomial[ n-i*k, i], {i, 0, Floor[n/(k+1)]}] - Sum[ (-1)^i*2^((-i)*(k+1)+n-1)*Binomial[ n-i*k-1, i], {i, 0, Floor[(n-1)/(k+1)]}]; Flatten[ Table[ t[n, k], {n, 1, rows}, {k, 1, n}]](* Jean-François Alcover, Nov 17 2011, after Max Alekseyev *)
A135492
Number of ways to toss a coin n times and not get a run of five.
Original entry on oeis.org
1, 2, 4, 8, 16, 30, 58, 112, 216, 416, 802, 1546, 2980, 5744, 11072, 21342, 41138, 79296, 152848, 294624, 567906, 1094674, 2110052, 4067256, 7839888, 15111870, 29129066, 56148080, 108228904, 208617920, 402123970, 775118874, 1494089668, 2879950432
Offset: 0
James R FitzSimons (cherry(AT)getnet.net), Feb 07 2008
-
a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]; a[1] = 2; a[2] = 4; a[3] = 8; a[4] = 16; Array[a, 33] (* Robert G. Wilson v, Feb 10 2008 *)
LinearRecurrence[{1, 1, 1, 1}, {2, 4, 8, 16}, 25] (* G. C. Greubel, Oct 15 2016 *)
-
a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,1,1,1]^(n-1)*[2;4;8;16])[1,1] \\ Charles R Greathouse IV, Oct 17 2016
Comments