login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061420 a(n) = a(ceiling((n-1)*2/3)) + 1 with a(0) = 0. 2
0, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Least k such that f^(k)(n) = 0 where f(x) = floor(2/3*x) and f^(k+1)(x) = f(f^(k)(x)). - Benoit Cloitre, May 26 2007

LINKS

Clark Kimberling, Table of n, a(n) for n = 0..2000

William J. Gilbert, Radix Representations of Quadratic Fields, Journal of Mathematical Analysis and Applications 83 (1981) pp 264-274.  Gilbert (page 273) cites Wang and Washburn (below) in connection with the length of the base 3/2 expansion of the even positive integers.

A. M. Odlyzko and H. S. Wilf, Functional iteration and the Josephus problem, Glasgow Math. J. 33, 235-240, 1991.

E. T. H. Wang, Phillip C. Washburn, Problem E2604, American Mathematical Monthly 84 (1977) pp. 821-822.

FORMULA

a(n) = a(n-1) + 1 if n is in A061419; a(n) = a(n-1) otherwise.

From Clark Kimberling, Oct 19 2012: (Start)

a(n) = a(floor(2*n/3)) + 1, where a(0) = 0 (alternative definition).

Washburn's solution of Problem E2604 (see References) shows that (for n>0), a(n) = -floor(-L((n+1)/c)), where L is the logarithm with base 3/2 and

  c = lim_{n->infinity} (2/3)^n*s(n) where s(n) = floor(3*s(n-1)/2) + 1 and s(0)=0.  The editors state that "It may be interesting to know whether c is irrational or even transcendental"; c = 1.62227050288476731595695098289932... .

Odlyzko and Wilf also discuss the defining recurrence, and they, after Washburn, give a formula for the sequence using c, as in the third Mathematica program below.

(End)

EXAMPLE

a(10) = a(ceiling(9*2/3)) + 1 = a(6) + 1 = 4 + 1 = 5.

MAPLE

a:= n-> `if`(n=0, 0, a(ceil((n-1)*2/3))+1):

seq(a(n), n=0..100);  # Alois P. Heinz, Oct 29 2012

MATHEMATICA

(* 1st program, using the alternative definition *)

a[0] = 0; a[n_] := a[Floor[2 n/3]] + 1;

Table[a[n], {n, 0, 120}]

(* 2nd program, using Cloitre's recurrence *)

f[x_] := Floor[2 x/3]; g[0, x_] := f[x];

g[k_, x_] := f[g[k - 1, x]];

u[n_] := Flatten[Table[g[k, n], {k, 0, 12}]]

v[n_] := First[Position[u[n], 0]];

Flatten[Table[v[n], {n, 1, 120}]]

(* 3rd program, using the constant c *)

f[n_] := -Floor[-Log[3/2, (n + 1)/1.62227050288476731595695098289932]]

Table[f[n], {n, 1, 120}]

(* Clark Kimberling, Oct 23 2012 *)

PROG

(PARI) a(n) = if(n<0, 0, s=n; c=0; while(floor(s)>0, s=floor(2/3*s); c++); c) \\ Benoit Cloitre, May 26 2007

(MAGMA) [IsZero(n) select 0 else Self(Floor(2*n/3)+1)+1: n in [0..90]]; // Bruno Berselli, Oct 31 2012

CROSSREFS

Cf. A029837, A061419, A083286 (the constant c).

Sequence in context: A083398 A221671 A301640 * A003057 A239308 A216256

Adjacent sequences:  A061417 A061418 A061419 * A061421 A061422 A061423

KEYWORD

nonn

AUTHOR

Henry Bottomley, May 02 2001

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 October 13 16:50 EDT 2019. Contains 327968 sequences. (Running on oeis4.)