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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113683 a(n)=a(n-1)/3 if a(n-1)=0(mod 3), a(n)=4*a(n-1)+2 if a(n-1)=1(mod 3), a(n)=4*a(n-1)-2 if a(n-1)=2(mod 3). 0
10, 42, 14, 54, 18, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

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

MATHEMATICA

a[0] = 10; a[n_] := a[n] = Switch[ Mod[a[n - 1], 3], 0, a[n - 1]/3, 1, 4a[n - 1] + 2, 2, 4a[n - 1] - 2]; Table[ a[n], {n, 0, 102}] (* Robert G. Wilson v, Nov 10 2005 *)

nxt[a_]:=Module[{m=Mod[a, 3]}, Which[m==0, a/3, m==1, 4a+2, m==2, 4a-2]]; NestList[ nxt, 10, 110] (* or *) PadRight[{10, 42, 14, 54, 18}, 120, {2, 6}] (* Harvey P. Dale, Feb 19 2018 *)

CROSSREFS

Sequence in context: A220927 A222858 A041188 * A060994 A086544 A031146

Adjacent sequences:  A113680 A113681 A113682 * A113684 A113685 A113686

KEYWORD

nonn

AUTHOR

Edwin F. Sampang, Nov 04 2005

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 21:19 EDT 2019. Contains 326133 sequences. (Running on oeis4.)