A322827 A permutation of A025487: Sequence of least representatives of distinct prime signatures obtained from the run lengths present in the binary expansion of n.
1, 2, 6, 4, 36, 30, 12, 8, 216, 180, 210, 900, 72, 60, 24, 16, 1296, 1080, 1260, 5400, 44100, 2310, 6300, 27000, 432, 360, 420, 1800, 144, 120, 48, 32, 7776, 6480, 7560, 32400, 264600, 13860, 37800, 162000, 9261000, 485100, 30030, 5336100, 1323000, 69300, 189000, 810000, 2592, 2160, 2520, 10800, 88200, 4620, 12600
Offset: 0
Examples
The sequence can be represented as a binary tree: 1 | ...................2................... 6 4 36......../ \........30 12......../ \........8 / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ 216 180 210 900 72 60 24 16 etc. Both children are multiples of their common parent, see A323503, A323504 and A323507. The value of a(n) is computed from the binary expansion of n as follows: Starting from the least significant end of the binary expansion of n (A007088), we record the successive run lengths, subtract one from all lengths except the first one, and use the reversed partial sums of these adjusted values as the exponents of successive primes. For 11, which is "1011" in base 2, we have run lengths [2, 1, 1] when scanned from the right, and when one is subtracted from all except the first, we have [2, 0, 0], partial sums of which is [2, 2, 2], which stays same when reversed, thus a(11) = 2^2 * 3^2 * 5^2 = 900. For 13, which is "1101" in base 2, we have run lengths [1, 1, 2] when scanned from the right, and when one is subtracted from all except the first, we have [1, 0, 1], partial sums of which is [1, 1, 2], reversed [2, 1, 1], thus a(13) = 2^2 * 3^1 * 5^1 = 60. Sequence A227183 is based on the same algorithm.
Links
Crossrefs
Programs
-
Mathematica
{1}~Join~Array[Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ Accumulate@ MapIndexed[Length[#1] - Boole[First@ #2 > 1] &, Split@ Reverse@ IntegerDigits[#, 2]]] &, 54] (* Michael De Vlieger, Feb 05 2020 *)
-
PARI
A322827(n) = if(!n,1,my(bits = Vecrev(binary(n)), rl=1, o = List([])); for(i=2,#bits,if(bits[i]==bits[i-1], rl++, listput(o,rl))); listput(o,rl); my(es=Vecrev(Vec(o)), m=1); for(i=1,#es,m *= prime(i)^es[i]); (m));
Comments