login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A010688
Period 2: repeat (1,7).
11
1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1
OFFSET
0,2
COMMENTS
Continued fraction of (7 + sqrt 77)/14. - R. J. Mathar, Nov 21 2011
FORMULA
From Paul Barry, May 23 2003: (Start)
a(n) = 4 - 3(-1)^n;
g.f.: (1+7x)/((1+x)(1-x));
e.g.f.: 4*exp(x)-3*exp(-x). (End)
a(n) = 7^n mod 8. - Vincenzo Librandi, Feb 07 2011
MATHEMATICA
PadRight[{}, 120, {1, 7}] (* Harvey P. Dale, Mar 21 2018 *)
PROG
(Sage) [power_mod(7, n, 8)for n in range(0, 92)] # Zerinvary Lajos, Nov 03 2009
(Magma) &cat[[1, 7]^^50]; // Vincenzo Librandi, Feb 07 2011 - Jul 23 2016
(PARI) a(n)=n%2*6+1 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
Sequence in context: A296472 A171544 A344698 * A176415 A356948 A363150
KEYWORD
nonn,easy
EXTENSIONS
Formula corrected by Philippe Deléham, Oct 30 2008
STATUS
approved