OFFSET
0,2
COMMENTS
The first sequence of "less twisted numbers"; this sequence, A130752 and A130755 form a "suite en trio" (cf. reference, p. 130).
Sequence equals its third differences:
1 3 8 17 33 64 127 255 512 1025
2 5 9 16 31 63 128 257 513
3 4 7 15 32 65 129 256
1 3 8 17 33 64 127
From Klaus Purath, Nov 26 2025: (Start)
Alternating sums of 3 consecutive terms divided by 6 are powers of 2. The following appears to hold true for all recurrences satisfying b(n) = 3*b(n-1) - 3*b(n-2) + b(n-3): Alternating sums of 3 consecutive terms divided by the alternating sum of the first three initial terms are powers of 2.
The initial terms of the differences of this sequence give A010882. (End)
REFERENCES
Paul Curtz, Exercise Book, manuscript, 1995.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,2).
FORMULA
G.f.: (1+2*x^2)/((1-2*x)*(1-x+x^2)).
a(0) = 1; a(1) = 3; a(2) = 8; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^(n+1) + A128834(n+4).
a(0) = 1; for n > 0, a(n) = 2*a(n-1) + A057079(n-1).
E.g.f.: 2*exp(2*x) - exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Dec 02 2025
MATHEMATICA
CoefficientList[Series[(1+2*x^2)/((1-2*x)*(1-x+x^2)), {x, 0, 50}], x] (* or *) LinearRecurrence[{3, -3, 2}, {1, 3, 8}, 30] (* G. C. Greubel, Jan 15 2018 *)
PROG
(Magma) m:=31; S:=[ [1, 2, 3][(n-1) mod 3 +1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Aug 03 2007
(Magma) I:=[1, 3, 8]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
(PARI) {m=31; v=vector(m); v[1]=1; v[2]=3; v[3]=8; for(n=4, m, v[n]=3*v[n-1]-3*v[n-2]+2*v[n-3]); v} \\ Klaus Brockhaus, Aug 03 2007
(PARI) {for(n=0, 30, print1(2^(n+1)+[ -1, -1, 0, 1, 1, 0][n%6+1], ", "))} \\ Klaus Brockhaus, Aug 03 2007
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jul 13 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Aug 03 2007
STATUS
approved
