cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A200714 Stolarsky representation interpreted as binary to decimal integers.

This page as a plain text file.
%I A200714 #31 Oct 27 2024 06:11:36
%S A200714 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,
%T A200714 26,25,55,28,59,61,62,127,20,17,43,18,39,45,46,95,24,53,51,54,111,58,
%U A200714 57,119,60,123,125,126,255,16,41,35,42,87,37,38,79,44,91,93
%N A200714 Stolarsky representation interpreted as binary to decimal integers.
%C A200714 See explanation of Stolarsky representations in the C. Mongoven link.
%H A200714 Amiram Eldar, <a href="/A200714/b200714.txt">Table of n, a(n) for n = 1..10000</a>
%H A200714 Casey Mongoven, <a href="/A200648/a200648.txt">Description of Stolarsky Representations</a>.
%F A200714 From _Amiram Eldar_, Jul 07 2023: (Start)
%F A200714 A000120(a(n)) = A200649(n).
%F A200714 A023416(a(n)) = A200650(n).
%F A200714 A070939(a(n)) = A200648(n).
%F A200714 A005811(a(n)) = A200651(n). (End)
%F A200714 Conjecture: a(n) = A367306(A358654(n-1)). - _Mikhail Kurkov_, Oct 17 2024
%e A200714 The Stolarsky representation of 19 is 11101. In binary this is equal to 29. So a(19) = 29.
%t A200714 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}]]];
%t A200714 a[n_] := FromDigits[stol[n], 2]; Array[a, 100] (* _Amiram Eldar_, Jul 07 2023 *)
%o A200714 (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
%o A200714 (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])));}
%o A200714 a(n) = fromdigits(stol(n), 2); \\ _Amiram Eldar_, Jul 07 2023
%Y A200714 Cf. A048679, A200648, A200649, A200650, A200651.
%Y A200714 Cf. A000120, A005811, A023416, A070939.
%K A200714 nonn,base
%O A200714 1,3
%A A200714 _Casey Mongoven_, Nov 20 2011
%E A200714 More terms from _Amiram Eldar_, Jul 07 2023