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.

A010695 Period 2: repeat (2,5).

Original entry on oeis.org

2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5
Offset: 0

Views

Author

Keywords

Comments

Also decimal expansion of 25/99.
Continued fraction expansion of A176052. - R. J. Mathar, Mar 08 2012
Periodic part of the partial quotients of the continued fraction expansion of sqrt(7/5), which starts [1, 5, 2, 5, 2, 5, ...]. - Hugo Pfoertner, Jan 10 2025

Crossrefs

Cf. A010674 (2^(1-(-1)^n) - 1).
Cf. A010691.

Programs

  • Magma
    &cat [[2,5]^^50]; // Bruno Berselli, Dec 29 2015
  • Mathematica
    PadRight[{}, 100, {2, 5}] (* Paolo Xausa, Jan 16 2025 *)
  • Maxima
    makelist(if evenp(n) then 2 else 5, n, 0, 80); /* Martin Ettl, Nov 09 2012 */
    

Formula

G.f.: (2+5*x)/((1-x)*(1+x)). - R. J. Mathar, Nov 21 2011
a(n) = 2^(1-(-1)^n) + 1. - Bruno Berselli, Dec 29 2015
From Nicolas Bělohoubek, Nov 11 2021: (Start)
a(n) = 10/a(n-1). See also A010691.
a(n) = 7 - a(n-1). See also A010702. (End)

Extensions

Edited by Bruno Berselli, Dec 29 2015