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!)
A275536 Differences of the exponents of the adjacent distinct powers of 2 in the binary representation of n (with -1 subtracted from the least exponent present) are concatenated as decimal digits in reverse order. 1
1, 2, 11, 3, 12, 21, 111, 4, 13, 22, 112, 31, 121, 211, 1111, 5, 14, 23, 113, 32, 122, 212, 1112, 41, 131, 221, 1121, 311, 1211, 2111, 11111, 6, 15, 24, 114, 33, 123, 213, 1113, 42, 132, 222, 1122, 312, 1212, 2112, 11112 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A preferable representation is a sequence of arrays, since multi-digit items are possible: [1],[2],[1,1],[3],[1,2],[2,1],[1,1,1],[4],[1,3],[2,2],[1,1,2],[3,1],[1,2,1],[2,1,1],[1,1,1,1],[5],[1,4],[2,3],[1,1,3],[3,2],[1,2,2],[2,1,2],[1,1,1,2],[4,1],[1,3,1],[2,2,1],[1,1,2,1],[3,1,1],[1,2,1,1],[2,1,1,1],[1,1,1,1,1],[6],[1,5],[2,4],[1,1,4],[3,3],[1,2,3],[2,1,3],[1,1,1,3],[4,2],[1,3,2],[2,2,2],[1,1,2,2],[3,1,2],[1,2,1,2],[2,1,1,2],[1,1,1,1,2]. 0 is not allowed as a digit.
a(512) is the first term which cannot be expressed unambiguously in decimal. - Charles R Greathouse IV, Aug 02 2016
The first two terms which are equal (because of the ambiguity inherent in using decimal, or more generally any finite base) are a(3) = a(1024) = 11. a(3) corresponds to the array [1,1] while a(1024) corresponds to [11]. - Charles R Greathouse IV, Mar 19 2017
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..511
FORMULA
For n=1..511, a(n) = A004086(A004719(A071160(n))) [In other words, terms of A071160 with 0-digits deleted and the remaining digits reversed.] - Antti Karttunen, Sep 03 2016
EXAMPLE
5 = 2^2 + 2^0, so the representation is [2-0, 0-(-1)] = [2, 1] so a(5) = 12.
6 = 2^2 + 2^1, so the representation is [2-1, 1-(-1)] = [1, 2] so a(6) = 21.
18 = 2^4 + 2^1, so the representation is [4-1, 1-(-1)] = [3, 2] so a(18) = 23.
PROG
(PHP) function dec2delta($k) {
$p = -1;
while ($k > 0) {
$k -= $c = pow(2, floor(log($k, 2)));
if ($p > -1) $d[] = $p - floor(log($c, 2));
$p = floor(log($c, 2));
}
$d[] = $p + 1;
return array_reverse($d);
}
function delta2dec($d) {
$k = 0;
$e = -1;
foreach ($d AS $v) {
if ($v > 0) {
$e += $v;
$k += pow(2, $e);
}
}
return $k;
}
(PARI) a(n)=my(v=List(), k); while(n, k=valuation(n, 2)+1; n>>=k; listput(v, k)); fromdigits(Vec(v)) \\ Charles R Greathouse IV, Aug 02 2016
CROSSREFS
Sequence in context: A081926 A242614 A069800 * A060002 A110741 A113625
KEYWORD
nonn,base,fini
AUTHOR
Armands Strazds, Aug 01 2016
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 29 23:45 EDT 2024. Contains 372114 sequences. (Running on oeis4.)