A385891 The number k = a(n) whose Stolarsky representation (row k of A385888) is the binary expansion of n (row n of A030302). Inverse Stolarsky representation of binary expansion of n.
1, 2, 4, 3, 9, 6, 7, 5, 22, 15, 14, 10, 17, 11, 12, 8, 56, 36, 38, 24, 35, 23, 25, 16, 43, 28, 27, 18, 30, 19, 20, 13, 145, 91, 93, 58, 98, 61, 62, 39, 90, 57, 59, 37, 64, 40, 41, 26, 111, 70, 72, 45, 69, 44, 46, 29, 77, 49, 48, 31, 51, 32, 33, 21, 378, 235, 237
Offset: 0
Keywords
Links
- Casey Mongoven, Description of Stolarsky Representations.
Crossrefs
Programs
-
Mathematica
nn=30; 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}]]]; ss=Table[stol[n],{n,nn}]; mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0]; Table[Position[ss,If[n==0,{},IntegerDigits[n,2]]][[1,1]],{n,0,mnrm[FromDigits[#,2]&/@ss+1]-1}]
Comments