OFFSET
1,2
COMMENTS
LINKS
Jaroslav Krizek, Table of n, a(n) for n = 1..500
EXAMPLE
The divisors of 10 are 1, 2, 5, 10, which written in base 2 are 1, 10, 101, 1010. The concatenation of 1, 10, 101, 1010 is 1101011010, so a(10) = 1101011010.
MATHEMATICA
A182621[n_]:=FromDigits[Flatten[IntegerDigits[Divisors[n], 2]]]; Array[A182621, 50] (* Paolo Xausa, Aug 31 2023 *)
PROG
(Sage) A182621 = lambda n: Integer(''.join(d.str(base=2) for d in divisors(n))) # D. S. McNeil, Dec 19 2010
(Python)
from sympy import divisors
def a(n): return int("".join(bin(d)[2:] for d in divisors(n)))
print([a(n) for n in range(1, 25)]) # Michael S. Branicky, Apr 20 2022
(PARI) a(n) = fromdigits(concat(apply(binary, divisors(n)))); \\ Kevin Ryde, May 02 2023
CROSSREFS
KEYWORD
nonn,base,easy,less
AUTHOR
Omar E. Pol, Nov 22 2010
STATUS
approved