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!)
A200651 Number of equal bit-runs in Stolarsky Representation of n. 7
1, 1, 1, 2, 1, 3, 2, 1, 2, 3, 3, 2, 1, 4, 3, 3, 2, 3, 3, 2, 1, 2, 5, 3, 4, 3, 4, 3, 3, 2, 3, 3, 2, 1, 4, 3, 5, 4, 3, 5, 4, 3, 2, 5, 3, 4, 3, 4, 3, 3, 2, 3, 3, 2, 1, 2, 5, 3, 6, 5, 5, 4, 3, 4, 5, 5, 4, 3, 4, 3, 5, 4, 3, 5, 4, 3, 2, 5, 3, 4, 3, 4, 3, 3, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
For the Stolarsky representation of n, see the C. Mongoven link.
LINKS
EXAMPLE
The Stolarsky representation of 19 is 11101. This has 3 equal bit-runs: '111', '0' and '1'. So a(19) = 3.
MATHEMATICA
stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
a[n_] := If[n == 1, 1, Length[Split[stol[n]]]]; Array[a, 100] (* Amiram Eldar, Jul 07 2023 *)
PROG
(PARI) stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1]))); }
a(n) = {my(s = stol(n), c = 1); for(k = 1, #s-1, if(s[k+1] != s[k], c++)); c; } \\ Amiram Eldar, Jul 07 2023
CROSSREFS
Sequence in context: A182321 A285731 A114905 * A126597 A261867 A076081
KEYWORD
nonn,base
AUTHOR
Casey Mongoven, Nov 19 2011
EXTENSIONS
More terms from Amiram Eldar, Jul 07 2023
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 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)