A292274 a(n) = A292383(A163511(n)).
0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 11, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 16, 17, 16, 17, 20, 20, 22, 22, 16, 17, 16, 17, 20, 20, 22, 22, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 11, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 32, 32, 34, 35, 32, 32, 34, 35, 40, 41, 40, 40, 44
Offset: 0
Examples
A163511(18) = 54, that is, at "node address" 18 in binary tree A163511 (which is the mirror image of A005940) sits number 54. 18 in binary is "10010", which when read from left to right (after the most significant bit which is always 1) gives the directions to follow in either tree when starting from the root, so that we land in number 54. (E.g. in A005940-tree, turn right from 2, turn right from 4, turn left from 8 and then turn right from 27 and one lands in 54, this corresponds with the four lowermost bits of the code, "0010". In A163511 the sense of direction is just reversed). When one selects the numbers of the form 4k+3 from this path 1 -> 2 -> 4 -> 8 -> 27 -> 54, one sees that only one is 27, which corresponds with the second rightmost bit (which also is the only 1-bit) in the code, which can be masked with 2 (binary "10"), thus a(18) = 2. A163511(15) = 7, that is, at "node address" 15 in binary tree A163511 sits number 7. 15 in binary is "1111", which tells that 7 can be located in mirror-image tree A005940 by going (after the initial root 1 and 2) three steps towards left from 2: 1 -> 2 -> 3 -> 5 -> 7. Of these numbers, only 3 and 7 are of the form 4k+3, thus the mask with which to obtain the corresponding bits from "1111" is "00101" (5 in binary), thus a(15) = 5. A163511(31) = 11, that is, at "node address" 31 in binary tree A163511 sits number 11. 31 in binary is "11111", which tells that 11 can be located in mirror-image tree A005940 by going (after the initial root 1 and 2) four steps towards left from 2: 1 -> 2 -> 3 -> 5 -> 7 -> 11. Of these numbers, only 3, 7 and 11 are of the form 4k+3, thus the mask with which to obtain the corresponding bits from "11111" is "001011" (11 in binary), thus a(31) = 11.
Links
Crossrefs
Programs
-
Mathematica
f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; Map[FromDigits[Reverse@ NestWhileList[Function[k, Which[k == 1, 1, EvenQ@ k, k/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ k]], #, # > 1 &] /. k_ /; IntegerQ@ k :> If[Mod[k, 4] == 3, 1, 0], 2] &, {1}~Join~Table[Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}]][DigitCount[n, 2, 1]], {n, 120}]] (* Michael De Vlieger, Sep 22 2017 *)
Formula
Extensions
Comments and examples from Antti Karttunen, Sep 22 2017
Comments