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.

A328282 a(n) is the least k such that A175930(k) = n.

This page as a plain text file.
%I A328282 #9 Oct 14 2019 14:31:24
%S A328282 1,3,2,15,6,4,5,255,30,12,13,16,9,11,10,65535,510,60,61,48,25,27,26,
%T A328282 256,33,19,18,47,22,20,21,4294967295,131070,1020,1021,240,121,123,122,
%U A328282 768,97,51,50,111,54,52,53,65536,513,67,66,79,38,36,37,767,94,44,45
%N A328282 a(n) is the least k such that A175930(k) = n.
%C A328282 To compute a(n):
%C A328282 - the binary representation of n has k = A000120(n) one bits,
%C A328282 - the binary representation of a(n) has k runs of consecutive equal bits,
%C A328282 - the length of the i-th run in a(n) has length 2^z where z is the number of zeros immediately following the i-th one bit in the binary representation of n,
%C A328282 - this division into sections starting with ones in n or corresponding to a run in a(n) is materialized by slashes in the example section.
%F A328282 a(n) <= 2^n-1 with equality iff n is a power of 2.
%F A328282 A005811(a(n)) = A000120(n).
%e A328282 The first terms, alongside the binary representation of n and of a(n) with peer sections separated by slashes, are:
%e A328282     n   a(n)   bin(n)   bin(a(n))
%e A328282     --  -----  -------  ----------------
%e A328282      1      1        1                 1
%e A328282      2      3       10                11
%e A328282      3      2      1/1               1/0
%e A328282      4     15      100              1111
%e A328282      5      6     10/1              11/0
%e A328282      6      4     1/10              1/00
%e A328282      7      5    1/1/1             1/0/1
%e A328282      8    255     1000          11111111
%e A328282      9     30    100/1            1111/0
%e A328282     10     12    10/10             11/00
%e A328282     11     13   10/1/1            11/0/1
%e A328282     12     16    1/100            1/0000
%e A328282     13      9   1/10/1            1/00/1
%e A328282     14     11   1/1/10            1/0/11
%e A328282     15     10  1/1/1/1           1/0/1/0
%e A328282     16  65535    10000  1111111111111111
%o A328282 (PARI) a(n)={ my (r=[], l, v=0); while (n, r=concat(l=1+valuation(n,2), r); n \= 2^l); for (i=1, #r, v *= 2^2^(r[i]-1); if (i%2, v += 2^2^(r[i]-1)-1)); v }
%Y A328282 Cf. A000120, A005811, A175930.
%K A328282 nonn,base
%O A328282 1,2
%A A328282 _Rémy Sigrist_, Oct 11 2019