|
|
A279101
|
|
a(n) = Sum_{k=0..n} ceiling((1 + sqrt(2))^k).
|
|
1
|
|
|
1, 4, 10, 25, 59, 142, 340, 819, 1973, 4760, 11486, 27725, 66927, 161570, 390056, 941671, 2273385, 5488428, 13250226, 31988865, 77227939, 186444726, 450117372, 1086679451, 2623476253, 6333631936, 15290740102, 36915112117, 89120964311, 215157040714, 519435045712, 1254027132111, 3027489309905, 7309005751892
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1 + x - 2*x^2 - x^3 - x^4)/((1 - x)^2*(1 - x - 3*x^2 - x^3)).
a(n) = 3*a(n-1) - 4*a(n-3) + a(n-4) + a(n-5).
a(n) = (4*(1 + sqrt(2))^n + 2*sqrt(2)*(1 + sqrt(2))^n - 2*(-2 + sqrt(2))*(1 - sqrt(2))^n + 2*n - (-1)^n - 3)/4.
a(n) ~ s^(n+1)/(s-1), where s is the silver ratio (A014176).
|
|
MAPLE
|
Digits:=100: a:=n->add(ceil((1+sqrt(2))^k), k=0..n); seq(a(n), n=0..35); # Muniru A Asiru, Oct 11 2018
|
|
MATHEMATICA
|
Accumulate[Table[Ceiling[(1 + Sqrt[2])^n], {n, 0, 33}]]
LinearRecurrence[{3, 0, -4, 1, 1}, {1, 4, 10, 25, 59}, 34]
CoefficientList[Series[(1 + x - 2*x^2 - x^3 - x^4)/((1 - x)^2*(1 - x - 3*x^2 - x^3)), {x, 0, 50}], x] (* or *)
a[n_]:=(4*(1 + Sqrt[2])^n + 2*Sqrt[2]*(1 + Sqrt[2] )^n - 2*(-2 + Sqrt[2] )*(1 - Sqrt[2] )^n + 2*n - (-1)^n - 3)/4; Simplify[Array[a, 50, 0]] (* Stefano Spezia, Oct 11 2018 *)
|
|
PROG
|
(PARI) x='x+O('x^40); Vec((1+x-2*x^2-x^3-x^4)/((1-x)^2*(1-x-3*x^2-x^3))) \\ G. C. Greubel, Oct 10 2018
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x-2*x^2-x^3-x^4)/((1-x)^2*(1-x-3*x^2-x^3)))); // G. C. Greubel, Oct 10 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|