cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A258898 a(1)=a(2)=1, a(n) = ceiling(e*a(n-1) - a(n-2)) for n>2.

Original entry on oeis.org

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

Views

Author

Morris Neene, Jun 14 2015

Keywords

Comments

Ratio of consecutive terms approaches A189040, (e + sqrt(e^2 - 4))/2.

Examples

			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.
		

Crossrefs

Programs

  • Magma
    I:=[1,1]; [n le 2 select I[n] else Ceiling(Exp(1)*Self(n-1)-Self(n-2)): n in [1..200]];
  • 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 *)