OFFSET
1,2
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
MAPLE
with(numtheory):
z:= proc(n) local m, r; m, r:=n, 0;
while m>1 do r:= r+1-irem(m, 2, 'm'); r od
end:
a:= proc(n) local d, t; t:=z(n);
for d in sort([divisors(n)[]]) do
if z(d)=t then return d fi od
end:
seq(a(n), n=0..100); # Alois P. Heinz, Jun 23 2013
MATHEMATICA
sdn[n_]:=SelectFirst[Divisors[n], DigitCount[#, 2, 0]==DigitCount[n, 2, 0]&]; Array[sdn, 80] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Sep 05 2015 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jun 09 2009
STATUS
approved