|
|
A329443
|
|
a(n) is the GCD of the binary representation of n interpreted in any numeric base.
|
|
3
|
|
|
0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
LINKS
|
|
|
FORMULA
|
k divides a(A329000(k)) for any k > 0.
|
|
EXAMPLE
|
For n = 42:
- the binary representation of 42 is "101010",
- the corresponding interpretations in the first bases b, alongside their GCD, are:
b b+b^3+b^5 GCD
-- --------- ---
2 42 42
3 273 21
4 1092 21
5 3255 21
6 7998 3
- as b + b^3 + b^5 is always divisible by 3, we have a(42) = 3.
|
|
PROG
|
(PARI) a(n) = my (g=n, d=binary(n)); for (b=3, oo, g = gcd(g, fromdigits(d, b)); if (g < b, return (g)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|