The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A200648 Length of Stolarsky representation of n. 9
1, 1, 2, 2, 3, 3, 3, 4, 3, 4, 4, 4, 5, 4, 4, 5, 4, 5, 5, 5, 6, 4, 5, 5, 5, 6, 5, 5, 6, 5, 6, 6, 6, 7, 5, 5, 6, 5, 6, 6, 6, 7, 5, 6, 6, 6, 7, 6, 6, 7, 6, 7, 7, 7, 8, 5, 6, 6, 6, 7, 6, 6, 7, 6, 7, 7, 7, 8, 6, 6, 7, 6, 7, 7, 7, 8, 6, 7, 7, 7, 8, 7, 7, 8, 7, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For the Stolarsky representation of n, see the C. Mongoven link.
LINKS
FORMULA
a(n) = A200649(n) + A200650(n). - Michel Marcus, Mar 14 2023
EXAMPLE
The Stolarsky representation of 19 is 11101. This is of length 5. So a(19) = 5.
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[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) = if(n == 1, 1, #stol(n)); \\ Amiram Eldar, Jul 07 2023
CROSSREFS
Sequence in context: A062558 A072789 A126302 * A264982 A134674 A253894
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 May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)