login
A258898
a(1)=a(2)=1, a(n) = ceiling(e*a(n-1) - a(n-2)) for n>2.
0
1, 1, 2, 5, 12, 28, 65, 149, 341, 778, 1774, 4045, 9222, 21023, 47925, 109251, 249051, 567740, 1294227, 2950334, 6725613, 15331778, 34950481, 79673480, 181624492, 414033077, 943834098, 2151574001, 4904750412, 11180919918
OFFSET
1,3
COMMENTS
Ratio of consecutive terms approaches A189040, (e + sqrt(e^2 - 4))/2.
EXAMPLE
a(2) = ceiling(e*1 - 1) = 2;
a(3) = ceiling(e*2 - 1) = 5;
a(4) = ceiling(e*5 - 2) = 12;
a(5) = ceiling(e*12 - 5) = 28.
MAPLE
a:= proc(n) option remember; `if`(n<3, 1,
ceil(exp(1)*a(n-1)-a(n-2)))
end:
seq(a(n), n=1..40); # Alois P. Heinz, Jun 18 2015
MATHEMATICA
nxt[{a_, b_}]:={b, Ceiling[E*b-a]}; NestList[nxt, {1, 1}, 30][[All, 1]] (* Harvey P. Dale, Dec 02 2017 *)
PROG
(Magma) I:=[1, 1]; [n le 2 select I[n] else Ceiling(Exp(1)*Self(n-1)-Self(n-2)): n in [1..200]];
CROSSREFS
Sequence in context: A290990 A324586 A001410 * A019486 A019485 A018914
KEYWORD
nonn
AUTHOR
Morris Neene, Jun 14 2015
STATUS
approved