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.

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.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 24 2025

Keywords

Comments

A permutation of the positive integers.

Crossrefs

A000120 counts 1's in binary expansion, zeros A023416.
A030302 gives binary expansion.
A035506 is the Stolarsky array.
A385888 is the Stolarsky representation, lengths A200648, sums A200649, zeros A200650, ranks A200714.

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}]

Formula

A385888(a(n)) = A030302(n).