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!)
A050016 a(n) = floor(a(n-1)/2) if this is positive and not yet in the sequence, otherwise a(n) = 9*a(n-1). 5
1, 9, 4, 2, 18, 162, 81, 40, 20, 10, 5, 45, 22, 11, 99, 49, 24, 12, 6, 3, 27, 13, 117, 58, 29, 14, 7, 63, 31, 15, 135, 67, 33, 16, 8, 72, 36, 324, 2916, 1458, 729, 364, 182, 91, 819, 409, 204, 102, 51, 25, 225, 112, 56, 28, 252, 126, 1134 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 2]], r, 9 #[[-1]]]] &, {0, 1}, 56] (* Ivan Neretin, Jul 31 2016 *)
PROG
(PARI) first(n)=my(v=vector(n), t); v[1]=1; for(i=2, n, t=v[i-1]\2; if(t<2, v[i]=9*v[i-1]; next); for(j=1, i-1, if(v[j]==t, v[i]=9*v[i-1]; next(2))); v[i]=t); v \\ Charles R Greathouse IV, Jul 31 2016
CROSSREFS
Cf. A050000 and references therein.
Sequence in context: A126774 A179587 A223709 * A033329 A097326 A282100
KEYWORD
nonn,easy
AUTHOR
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 17 09:00 EDT 2024. Contains 374363 sequences. (Running on oeis4.)