OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
EXAMPLE
12 is '1100' in binary representation: a(12) = gcd(12,1100) = gcd(3*2^2,11*5^2*2^2) = 4.
MATHEMATICA
Table[GCD[n, FromDigits[IntegerDigits[n, 2]]], {n, 100}] (* Harvey P. Dale, Jun 18 2014 *)
PROG
(PARI)
(Python)
from math import gcd
def A076775(n): return gcd(n, int(bin(n)[2:])) # Chai Wah Wu, Sep 12 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Nov 14 2002
STATUS
approved