login
This site is supported by donations 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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

MAPLE

A[0]:= 0;

for n from 1 to 1000 do

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

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

fi od:

seq(A[i], i=0..1000); # Robert Israel, Apr 25 2017

CROSSREFS

Sequence in context: A101412 A053830 A033929 * A023125 A319657 A255594

Adjacent sequences:  A025479 A025480 A025481 * A025483 A025484 A025485

KEYWORD

nonn

AUTHOR

David W. Wilson

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 November 17 18:24 EST 2019. Contains 329241 sequences. (Running on oeis4.)