login
The OEIS is supported by the many generous donors 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
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 * A330790 A060994 A086544
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 02:36 EDT 2024. Contains 374323 sequences. (Running on oeis4.)