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!)
A135818 Number of 1's (or A's) in the Wythoff representation of n. 6
1, 0, 1, 2, 0, 3, 1, 1, 4, 2, 2, 2, 0, 5, 3, 3, 3, 1, 3, 1, 1, 6, 4, 4, 4, 2, 4, 2, 2, 4, 2, 2, 2, 0, 7, 5, 5, 5, 3, 5, 3, 3, 5, 3, 3, 3, 1, 5, 3, 3, 3, 1, 3, 1, 1, 8, 6, 6, 6, 4, 6, 4, 4, 6, 4, 4, 4, 2, 6, 4, 4, 4, 2, 4, 2, 2, 6, 4, 4, 4, 2, 4, 2, 2, 4, 2, 2, 2, 0, 9, 7, 7, 7, 5, 7, 5, 5, 7, 5, 5, 5, 3, 7, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) = number of applications of Wythoff's A sequence A000201 needed in the unique Wythoff representation of n>=1.
See A135817 for references and links for the Wythoff representation for n>=1.
LINKS
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
Cf. A000201, A135817 (lengths of Wythoff representation), A007895 (number of 0's (or B's) in the Wythoff representation).
Sequence in context: A070812 A308230 A061865 * A078804 A071465 A333409
KEYWORD
nonn,base,easy
AUTHOR
Wolfdieter Lang, Jan 21 2008
STATUS
approved

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)