OFFSET

1,4

COMMENTS

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

EXAMPLE

6 = A(A(A(B(1)))) = AAAB = `1110`, hence a(6)=3.

MATHEMATICA

z[n_] := Floor[(n + 1)*GoldenRatio] - n - 1; h[n_] := z[n] - z[n - 1]; w[n_] := Module[{m = n, zm = 0, hm, s = {}}, While[zm != 1, hm = h[m]; AppendTo[s, hm]; If[hm == 1, zm = z[m], zm = z[z[m]]]; m = zm]; s]; w[0] = 0; a[n_] := Total[w[n]]; Array[a, 100] (* Amiram Eldar, Jul 01 2023 *)

CROSSREFS

KEYWORD

nonn,base,easy

AUTHOR

Wolfdieter Lang, Jan 21 2008

STATUS

approved