# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a214972 Showing 1-1 of 1 %I A214972 #30 Oct 31 2012 09:32:59 %S A214972 0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6, %T A214972 6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8, %U A214972 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9 %N A214972 a(n) = a(floor(2*(n-1)/3)) + 1, where a(0) = 0. %H A214972 Clark Kimberling, Table of n, a(n) for n = 0..10000 %F A214972 Conjecture: a(n) = a(n-1) + 1 if n is in A152009, and a(n) = a(n-1) otherwise. %e A214972 a(10) = a(9*2/3)+1 = a(6)+1 = 3+1 = 4. %t A214972 a[0] := 0; a[n_] := a[Floor[2*(n-1)/3]] + 1; Table[a[n], {n, 0, 120}] %o A214972 (PARI) a214972(n) = {local(nn,r); nn=n; r=0; while(nn>0, r=r+1; nn=floor(2*(nn-1)/3)); r} \\ _Michael B. Porter_, Oct 30 2012 %o A214972 (Maxima) %o A214972 a[0]:0$ %o A214972 a[n]:=a[floor(2*(n-1)/3)] + 1$ %o A214972 A214972(n):=a[n]; %o A214972 makelist(A214972(n),n,0,30); /* _Martin Ettl_, Oct 31 2012 */ %K A214972 nonn %O A214972 0,4 %A A214972 _Clark Kimberling_, Oct 19 2012 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE