A130785 Sequence identical to its third differences: a(n+3) = 3a(n+2)-3a(n+1)+2a(n), with a(0)=1, a(1)=4, a(2)=9.
1, 4, 9, 17, 32, 63, 127, 256, 513, 1025, 2048, 4095, 8191, 16384, 32769, 65537, 131072, 262143, 524287, 1048576, 2097153, 4194305, 8388608, 16777215, 33554431, 67108864, 134217729, 268435457, 536870912, 1073741823, 2147483647, 4294967296, 8589934593
Offset: 0
Examples
Triangle of sequence and 1st, 2nd, 3rd differences: 1 4 9 17 32 63 127 256 513 3 5 8 15 31 64 129 257 2 3 7 16 33 65 128 1 4 9 17 32 63 ... equal to first row
Links
- Index entries for linear recurrences with constant coefficients, signature (3,-3,2).
Programs
-
Mathematica
d = 3; nmax = 20; a[n_ /; n < d] := (n+1)^2; seq = Table[a[n], {n, 0, nmax}]; seq /. Solve[ Thread[ Take[seq, nmax - d + 1] == Differences[seq, d]]] // First (* Jean-François Alcover, Nov 07 2013 *) LinearRecurrence[{3, -3, 2},{1, 4, 9},21] (* Ray Chandler, Sep 23 2015 *) Table[2^(n + 1) - Cos[(2 n + 1) Pi/6] 2/Sqrt[3], {n, 0, 32}] (* Vladimir Reshetnikov, Oct 15 2017 *)
Formula
a(n) = 2^(n+1) - cos((2*n+1)*Pi/6) * 2/sqrt(3). - Vladimir Reshetnikov, Oct 15 2017
G.f.: (1+x)/((1-2*x)*(1-x+x^2)). - Joerg Arndt, Oct 16 2017
Extensions
Edited and extended by R. J. Mathar, Nov 22 2007
Comments