A010695 Period 2: repeat (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, 2, 5
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
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
Comments