OFFSET
0,2
COMMENTS
Also the digital root of 8^n. Also the decimal expansion of 2/11 = 0.181818181818... - Cino Hilliard, Dec 31 2004
Continued fraction expansion of (2 + sqrt(6))/4. - Klaus Brockhaus, Apr 02 2010
Digital root of the powers of any number congruent to 8 mod 9. - Alonso del Arte, Jan 26 2014
REFERENCES
Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.
LINKS
FORMULA
From Paul Barry, Sep 16 2004: (Start)
G.f.: (1 + 8*x)/((1 - x)*(1 + x)).
a(n) = (9 - 7*(-1)^n)/2.
a(n) = 8^(ceiling(n/2) - floor(n/2)).
a(n) = gcd((n-1)^3, (n+1)^3). (End)
MATHEMATICA
Table[Mod[8^n, 9], {n, 0, 99}] (* Alonso del Arte, Jan 26 2014 *)
PadRight[{}, 120, {1, 8}] (* Harvey P. Dale, Jun 03 2015 *)
PROG
(Sage) [power_mod(8, n, 9)for n in range(0, 105)] # Zerinvary Lajos, Nov 27 2009
(Magma) &cat[ [1, 8]: n in [0..52] ]; // Klaus Brockhaus, Apr 02 2010
(Magma) &cat [[1, 8]^^60]; // Bruno Berselli, Mar 10 2017
(Maxima) A010689(n):=if evenp(n) then 1 else 8$
makelist(A010689(n), n, 0, 30); /* Martin Ettl, Nov 09 2012 */
(PARI) a(n)=1; if(n%2==1, 8, 1) \\ Felix Fröhlich, Aug 11 2014
CROSSREFS
KEYWORD
AUTHOR
EXTENSIONS
Definition edited and keywords cons, cofr added by Klaus Brockhaus, Apr 02 2010
STATUS
approved