A182622 a(n) is the number whose binary representation is the concatenation of the divisors of n written in base 2.
1, 6, 7, 52, 13, 222, 15, 840, 121, 858, 27, 28268, 29, 894, 991, 26896, 49, 113970, 51, 215892, 2037, 3446, 55, 14471576, 441, 3514, 3899, 217052, 61, 14538238, 63, 1721376, 7905, 13410, 7139, 926213284, 101, 13542, 8039, 221009192
Offset: 1
Examples
The divisors of 10 are 1, 2, 5, 10. Then 1, 2, 5, 10 written in base 2 are 1, 10, 101, 1010. The concatenation of 1, 10, 101, 1010 is 1101011010. Then a(10) = 858 because the binary number 1101011010 written in base 10 is 858.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..50000
Programs
-
Mathematica
concatBits[n_] := FromDigits[Join @@ (IntegerDigits[#, 2]& /@ Divisors[n]), 2]; concatBits /@ Range[40](* Giovanni Resta, Nov 23 2010 *)
-
PARI
a(n) = {my(cbd = []); fordiv(n, d, cbd = concat(cbd, binary(d));); fromdigits(cbd, 2);} \\ Michel Marcus, Jan 28 2017
-
Python
def A182622(n): s="" for i in range(1,n+1): if n%i==0: s+=bin(i)[2:] return int(s,2) # Indranil Ghosh, Jan 28 2017
Formula
a(p) = 2^(floor(log_2(p)) + 1) + p for p prime. Also, a(p + k) > a(p) for all k > 0. Furthermore, for all primes p > 3, a(p) < a(p - 1).
a(2^(m - 1)) = sum(k = 0 .. m - 1, 2^((m^2 + m)/2 - (k^2 + k)/2 - 1)) = A164894(m). - Alonso del Arte, Nov 13 2013
Extensions
More terms from Giovanni Resta, Nov 23 2010
Comments