login
A010686
Periodic sequence: repeat [1, 5].
19
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,2
COMMENTS
Also continued fraction expansion of (5+3*sqrt(5))/10. - Bruno Berselli, Sep 30 2011
From Gary Detlefs, May 19 2014: (Start)
This sequence can be generated by an infinite number of formulas all having the form a^(b*n) mod c subject to the following conditions. The number a is congruent to either 5,11,13,17,21, or 23 mod 24 and b is of the form 2k+1.
1. If a = 5 mod 6 then c = 6.
2. If a = 5 mod 8 then c = 8.
3. If a = 5 mod 12 then c = 12.
4. If a = 5 mod 24 then c = 24.
For example: a(n)= 13^(5*n) mod 8, a(n)= 29^(7*n) mod c where c is any number in {6,8,12,24}. (End)
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
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 *)
PROG
(Sage) [pow(5, n, 12) for n in range(51)] # Zerinvary Lajos, Nov 25 2009
(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
CROSSREFS
Cf. A000364.
Sequence in context: A375340 A205109 A144432 * A021070 A176260 A098190
KEYWORD
nonn,easy
EXTENSIONS
Definition rewritten by Bruno Berselli, Sep 30 2011
STATUS
approved