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!)
A200714 Stolarsky representation interpreted as binary to decimal integers. 7
0, 1, 3, 2, 7, 5, 6, 15, 4, 11, 13, 14, 31, 10, 9, 23, 12, 27, 29, 30, 63, 8, 21, 19, 22, 47, 26, 25, 55, 28, 59, 61, 62, 127, 20, 17, 43, 18, 39, 45, 46, 95, 24, 53, 51, 54, 111, 58, 57, 119, 60, 123, 125, 126, 255, 16, 41, 35, 42, 87, 37, 38, 79, 44, 91, 93 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
See explanation of Stolarsky representations in the C. Mongoven link.
LINKS
FORMULA
From Amiram Eldar, Jul 07 2023: (Start)
A000120(a(n)) = A200649(n).
A023416(a(n)) = A200650(n).
A070939(a(n)) = A200648(n).
A005811(a(n)) = A200651(n). (End)
EXAMPLE
The Stolarsky representation of 19 is 11101. In binary this is equal to 29. So a(19) = 29.
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_] := FromDigits[stol[n], 2]; Array[a, 100] (* Amiram Eldar, Jul 07 2023 *)
PROG
(PARI) a(n) = {if (n == 1, return (0)); tau = (1 + sqrt(5))/2; mn = 0; while ((m = round(mn*tau)) < n, mn++; ); if (m == n, return (2*a(mn)+1)); mn = 0; while ((m = floor(mn*(1+tau)-tau/2)) < n, mn++; ); if (m == n, return (2*a(mn))); error("neither A nor B !!"); } \\ (cf C. Mongoven link) Michel Marcus, May 21 2013, Sep 02 2013
(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) = fromdigits(stol(n), 2); \\ Amiram Eldar, Jul 07 2023
CROSSREFS
Sequence in context: A126314 A358139 A358654 * A086702 A156140 A324556
KEYWORD
nonn,base
AUTHOR
Casey Mongoven, Nov 20 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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)