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.

A046698 a(0) = 0, a(1) = 1, a(n) = a(a(n-1)) + a(a(n-2)) if n > 1.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Keywords

Comments

Partial sums are A004275. Binomial transform is A048492, starting with 0. - Paul Barry, Feb 28 2003
From Elmo R. Oliveira, Jul 25 2024: (Start)
Continued fraction expansion of 2 - sqrt(2) = A101465.
Decimal expansion of 101/9000. (End)

References

  • Sequence proposed by Reg Allenby.

Crossrefs

Cf. A004275, A048492, A101465 (decimal expansion of 2 - sqrt(2)).

Programs

  • Mathematica
    CoefficientList[Series[x (1 + x^2)/(1 - x), {x, 0, 104}], x] (* or *)
    Nest[Append[#, #[[#[[-1]] + 1]] + #[[#[[-2]] + 1 ]]] &, {0, 1}, 105] (* Michael De Vlieger, Jul 31 2020 *)
  • PARI
    a(n)=(n>0)+(n>2)

Formula

G.f.: x*(1+x^2)/(1-x). - Paul Barry, Feb 28 2003
From Elmo R. Oliveira, Jul 25 2024: (Start)
E.g.f.: 2*exp(x) - x - 1.
a(n) = 2 for n > 2.
a(n) = 2 - A033324(n+2) = 4 - A343461(n+4) = A114955(n+6) - 6. (End)