A357111 For n >= 1, a(n) = n / A076775(n).
1, 1, 3, 1, 5, 3, 7, 1, 9, 1, 11, 3, 13, 7, 15, 1, 17, 9, 19, 1, 1, 11, 23, 3, 25, 13, 27, 7, 29, 3, 31, 1, 3, 17, 35, 9, 37, 19, 39, 1, 41, 1, 43, 11, 45, 23, 47, 3, 49, 5, 51, 13, 53, 27, 55, 7, 57, 29, 59, 3, 61, 31, 3, 1, 65, 3, 67, 17, 23, 7, 71, 9, 73, 37, 75
Offset: 1
Examples
a(12) = 12 / A076775(12) = 3.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local L,i; L:= convert(n,base,2); n/igcd(n,add(10^(i-1)*L[i],i=1..nops(L))); end proc: map(f, [$1..100]); # Robert Israel, Sep 11 2022
-
Mathematica
a[n_] := n / GCD[n, FromDigits@IntegerDigits[n, 2]]; Array[a, 100] (* Amiram Eldar, Sep 11 2022 *)
-
Python
from math import gcd def A357111(n): return n//gcd(n,int(bin(n)[2:])) # Chai Wah Wu, Sep 12 2022