OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
C. Kimberling, Problem 10520, Amer. Math. Mon. 103 (1996) p. 347.
FORMULA
From Chai Wah Wu, Jun 02 2016: (Start)
a(n) = 3*a(n-1) - 4*a(n-3) + a(n-4) + a(n-5) for n > 5 (conjectured).
G.f.: x*(x^4 - 2*x^3 + x^2 - 2)/((x - 1)^2*(x + 1)*(x^2 + 2*x - 1)) (conjectured). (End)
MATHEMATICA
Table[t=0; k=0; While[k++; s=Floor[2*(1+Sqrt[2])^(n-k)]; s>0, t=t+s]; t, {n, 26}]
Table[Sum[Floor[2*(1 + Sqrt[2])^(n - k)], {k, 1, 1000}], {n, 1, 50}] (* G. C. Greubel, Sep 30 2018 *)
PROG
(PARI) for(n=1, 50, print1(sum(k=1, 2*n, floor(2*(1+sqrt(2))^(n-k))), ", ")) \\ G. C. Greubel, Sep 30 2018
(Magma) [(&+[Floor(2*(1+sqrt(2))^(n-k)): k in [1..2*n]]): n in [1..50]] // G. C. Greubel, Sep 30 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Revised Feb 03 1999. Revised Nov 30 2010.
STATUS
approved