LINKS
Rémy Sigrist, <a href="/A373886/b373886_1.txt">Table of n, a(n) for n = 0..8190</a>
Rémy Sigrist, <a href="/A373886/b373886_1.txt">Table of n, a(n) for n = 0..8190</a>
proposed
approved
editing
proposed
Rémy Sigrist, <a href="/A373886/b373886_1.txt">Table of n, a(n) for n = 0..8190</a>
approved
editing
proposed
approved
editing
proposed
nonn,base,new,look
f:= proc(n) local L, nL, i, j, k, r, x;
L:= convert(n, base, 2);
nL:= nops(L);
r:= n;
for i from 1 to nL-1 do
for j from i+1 to nL do
r:= min(r, n + add((L[j-k]-L[i+k])*2^(i+k-1), k=0..j-i));
od od;
r
end proc:
map(f, [$0..100]); # Robert Israel, Aug 13 2024
reviewed
editing
proposed
reviewed
editing
proposed