|
|
A084214
|
|
Inverse binomial transform of a math magic problem.
|
|
16
|
|
|
1, 1, 4, 6, 14, 26, 54, 106, 214, 426, 854, 1706, 3414, 6826, 13654, 27306, 54614, 109226, 218454, 436906, 873814, 1747626, 3495254, 6990506, 13981014, 27962026, 55924054, 111848106, 223696214, 447392426, 894784854, 1789569706, 3579139414
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Inverse binomial transform of A060816.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (5*2^n - 3*0^n + 4*(-1)^n)/6.
G.f.: (1+x^2)/((1+x)*(1-2*x)).
E.g.f.: (5*exp(2*x) - 3*exp(0) + 4*exp(-x))/6.
The binomial transform of a(n+1) is A020989(n).
a(n+1) = Sum_{i=0..n} a(i) + 1 - (-1)^n, a(0)=1.
a(n) = A000975(n-3)*10 + 5 + (-1)^(n-3), a(0)=1, a(1)=1, a(2)=4. (End)
|
|
MAPLE
|
a[0]:=1:a[1]:=4:for n from 2 to 50 do a[n]:=a[n-1]+2*a[n-2]od: seq(a[n], n=-1..31); # Zerinvary Lajos, Dec 15 2008
|
|
MATHEMATICA
|
LinearRecurrence[{1, 2}, {1, 1, 4}, 50] (* Harvey P. Dale, Mar 05 2021 *)
|
|
PROG
|
(Haskell)
a084214 n = a084214_list !! n
a084214_list = 1 : xs where
xs = 1 : 4 : zipWith (+) (map (* 2) xs) (tail xs)
(PARI) a(n) = 5<<(n-1)\3 + bitnegimply(1, n); \\ Kevin Ryde, Dec 20 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|