login
Periodic sequence: Repeat 1, 8.
14

%I #50 Dec 18 2023 09:38:11

%S 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,

%T 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,

%U 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1

%N Periodic sequence: Repeat 1, 8.

%C Also the digital root of 8^n. Also the decimal expansion of 2/11 = 0.181818181818... - _Cino Hilliard_, Dec 31 2004

%C Interleaving of A000012 and A010731. - _Klaus Brockhaus_, Apr 02 2010

%C Continued fraction expansion of (2 + sqrt(6))/4. - _Klaus Brockhaus_, Apr 02 2010

%C Digital root of the powers of any number congruent to 8 mod 9. - _Alonso del Arte_, Jan 26 2014

%D Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).

%F From _Paul Barry_, Sep 16 2004: (Start)

%F G.f.: (1 + 8*x)/((1 - x)*(1 + x)).

%F a(n) = (9 - 7*(-1)^n)/2.

%F a(n) = 8^(ceiling(n/2) - floor(n/2)).

%F a(n) = gcd((n-1)^3, (n+1)^3). (End)

%t Table[Mod[8^n, 9], {n, 0, 99}] (* _Alonso del Arte_, Jan 26 2014 *)

%t PadRight[{},120,{1,8}] (* _Harvey P. Dale_, Jun 03 2015 *)

%o (Sage) [power_mod(8,n,9)for n in range(0,105)] # _Zerinvary Lajos_, Nov 27 2009

%o (Magma) &cat[ [1, 8]: n in [0..52] ]; // _Klaus Brockhaus_, Apr 02 2010

%o (Magma) &cat [[1,8]^^60]; // _Bruno Berselli_, Mar 10 2017

%o (Maxima) A010689(n):=if evenp(n) then 1 else 8$

%o makelist(A010689(n),n,0,30); /* _Martin Ettl_, Nov 09 2012 */

%o (PARI) a(n)=1; if(n%2==1, 8, 1) \\ _Felix Fröhlich_, Aug 11 2014

%Y Cf. A000012 (all 1's sequence), A010731 (all 8's sequence), A174925 (decimal expansion of (2 + sqrt(6))/4). [_Klaus Brockhaus_, Apr 02 2010]

%Y Cf. Digital roots of powers of c mod 9: c = 2, A153130; c = 4, A100402; c = 5, A070366; c = 7, A070403.

%Y Cf. sequences listed in Comments section of A283393.

%K nonn,cofr,cons,easy

%O 0,2

%A _N. J. A. Sloane_

%E Definition edited and keywords cons, cofr added by _Klaus Brockhaus_, Apr 02 2010