|
|
A167784
|
|
a(n) = 2^n - (1 - (-1)^n)*3^((n-1)/2).
|
|
3
|
|
|
1, 0, 4, 2, 16, 14, 64, 74, 256, 350, 1024, 1562, 4096, 6734, 16384, 28394, 65536, 117950, 262144, 484922, 1048576, 1979054, 4194304, 8034314, 16777216, 32491550, 67108864, 131029082, 268435456, 527304974, 1073741824, 2118785834, 4294967296, 8503841150
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3).
G.f.: (x-1)^2/((2*x-1)*(3*x^2-1)).
a(n) mod 10 = 1, bar(0,4,2,6,4,4,4,6), where bar(...) denotes a periodically repeated sequence of 8 terms.
E.g.f.: exp(2*x) - (2/sqrt(3))*sinh(sqrt(3)*x). - G. C. Greubel, Jun 27 2016
|
|
MAPLE
|
seq(2^n - (1 - (-1)^n)*3^((n-1)/2), n=0..100); # Robert Israel, Apr 11 2019
|
|
MATHEMATICA
|
LinearRecurrence[{2, 3, -6}, {1, 0, 4}, 40] (* Harvey P. Dale, Nov 29 2011 *)
|
|
PROG
|
(Magma) [Floor(2^n+((-1)^n-1)*3^(-1/2+1/2*n)): n in [0..40] ]; // Vincenzo Librandi, Aug 06 2011
Caution: this program gives incorrect results starting at n=103. - Robert Israel, Apr 11 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|