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!)
A025482 a(0) = 0; a(n) = a(n/3)/3 if n = a(n/3) = 0 (mod 3); a(n) = a(n-1)+1 otherwise. 1

%I #9 Apr 25 2017 18:57:37

%S 0,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,10,11,12,13,14,

%T 15,16,1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,10,3,4,5,6,7,8,1,2,3,4,5,6,7,

%U 8,9,2,3,4,5,6,7,8,9,10,3,4,5,6,7,8,9,10,11,4,5,6,7,8,9,10,11,12,5,6,7,8,9,10

%N a(0) = 0; a(n) = a(n/3)/3 if n = a(n/3) = 0 (mod 3); a(n) = a(n-1)+1 otherwise.

%C Bounded, conjectured maximum is a(257) = 17.

%H Robert Israel, <a href="/A025482/b025482.txt">Table of n, a(n) for n = 0..10000</a>

%p A[0]:= 0;

%p for n from 1 to 1000 do

%p if n mod 3 = 0 and A[n/3] mod 3 = 0 then A[n]:= A[n/3]/3

%p else A[n]:= A[n-1]+1

%p fi od:

%p seq(A[i],i=0..1000); # _Robert Israel_, Apr 25 2017

%K nonn

%O 0,3

%A _David W. Wilson_

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 April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)