login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000689 Final decimal digit of 2^n. 10
1, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

These are the analogs of the powers of 2 in carryless arithmetic mod 10.

Let G = {2,4,8,6}. Let o be defined as XoY = least significant digit in XY. Then (G,o) is an Abelian group wherein 2 is a generator (Also see the first comment under A001148). - K.V.Iyer, Mar 12 2010

a(n) is also 2^n mod 10.

For n > 0: a(n) = A002081(n) - A002081(n-1).

LINKS

Table of n, a(n) for n=0..80.

David Applegate, Marc LeBrun and N. J. A. Sloane, Carryless Arithmetic (I): The Mod 10 Version

Index entries for sequences related to carryless arithmetic

Index entries for sequences related to final digits of numbers

Index entries for linear recurrences with constant coefficients, signature (1, -1, 1).

FORMULA

Periodic with period 4.

a(n) = (1/6)*{8*(n mod 4)-[(n+1) mod 4]+2*[(n+2) mod 4]+11*[(n+3) mod 4]}-5*{1-[((n+1)!+1) mod (n+1)]}, with n>=0. - Paolo P. Lava, Jun 25 2007; corrected by Paolo P. Lava, Mar 23 2010

a(n) = +a(n-1) -a(n-2) +a(n-3), n>3. G.f.: (x+3*x^2+5*x^3+1)/((1-x) * (1+x^2)). - R. J. Mathar, Apr 13 2010

a(n) = 5+(1/2)*[(1+3*I)*I^n+(1-3*I)*(-I)^n]-5*[C(2*n,n) mod 2], with n>=0. - Paolo P. Lava, May 10 2010

For n>=1, a(n) = 10 - (4x^3 +47x -27x^2)/3, where x = (n+3) mod 4 + 1.

For n>=1, a(n) = A070402(n) + 5*floor( ((n-1) mod 4)/2 ).

G.f.: 1 / (1 - 2*x / (1 + 5*x^3 / (1 + x / (1 - 3*x / (1 + 3*x))))). - Michael Somos, May 12 2012

EXAMPLE

G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 6*x^4 + 2*x^5 + 4*x^6 + 8*x^7 + 6*x^8 + ...

MAPLE

P:=proc(n) local a, i; for i from 0 by 1 to n do a:=1/6*(8*(i mod 4)-((i+1) mod 4)+2*((i+2) mod 4)+11*((i+3) mod 4))-5*(1-(((i+1)!+1) mod (i+1))); print(a); od; end: P(100); # Paolo P. Lava, Jun 25 2007

MATHEMATICA

Table[PowerMod[2, n, 10], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)

PROG

(Sage) [power_mod(2, n, 10)for n in xrange(0, 81)] #  Zerinvary Lajos, Nov 03 2009

(PARI) for(n=0, 80, if(n, {x=(n+3)%4+1; print1(10-(4*x^3+47*x-27*x^2)/3, ", ")}, {print1("1, ")}))

(MAGMA) [2^n mod 10: n in [0..150]]; // Vincenzo Librandi, Apr 12 2011

(Haskell)

a000689 n = a000689_list !! n

a000689_list = 1 : cycle [2, 4, 8, 6]  -- Reinhard Zumkeller, Sep 15 2011

CROSSREFS

Cf. A173635.

Sequence in context: A125733 A248573 A280426 * A132137 A011180 A103546

Adjacent sequences:  A000686 A000687 A000688 * A000690 A000691 A000692

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified October 18 10:28 EDT 2017. Contains 293507 sequences.