A010686 Periodic sequence: repeat [1, 5].
1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1
Offset: 0
Examples
0.15151515151515151515151515151515151515151...
Links
- Burkard Polster, Juggling, maths and a beautiful mind. [From Parthasarathy Nambi, Nov 20 2009]
- Vladimir Ivanovich Smirnov, A course of higher mathematics, vol. 1 , Pergamon Press, 1964, p. 2.
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Crossrefs
Cf. A000364.
Programs
-
Maple
[seq (modp((4*n+1),8),n=0..80)]; # Zerinvary Lajos, Dec 01 2006
-
Mathematica
PadRight[{},120,{1,5}] (* Harvey P. Dale, Aug 19 2012 *)
-
Maxima
A010686(n):=if evenp(n) then 1 else 5$ makelist(A010686(n),n,0,30); /* Martin Ettl, Nov 09 2012 */
-
PARI
a(n)=n%2*4+1 \\ Charles R Greathouse IV, Sep 24 2015
-
Sage
[pow(5,n,12) for n in range(51)] # Zerinvary Lajos, Nov 25 2009
Formula
From Paul Barry, Jun 03 2003: (Start)
G.f.: (1+5*x)/((1-x)*(1+x)).
E.g.f.: 3*exp(x)-2*exp(-x).
a(n) = 3-2(-1)^n.
a(n) = 5^((1-(-1)^n)/2) = 5^(ceiling(n/2)-floor(n/2)). (End)
a(n) = 5^n mod 24. - Paul Curtz, Jan 09 2008
a(n) = 5^n mod 12. - Zerinvary Lajos, Nov 25 2009
a(n) = A000364(n+1) mod 10. - Paul Curtz, Feb 09 2010
a(n) = 11^n mod 6. - Vincenzo Librandi, Jun 01 2016
Extensions
Definition rewritten by Bruno Berselli, Sep 30 2011
Comments