login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326674 GCD of the set of positions of 1's in the reversed binary expansion of n. 26
1, 2, 1, 3, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 2, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is even if and only if n is in A062880. - Robert Israel, Oct 13 2020
LINKS
FORMULA
Trivially, a(n) <= log_2(n). - Charles R Greathouse IV, Nov 15 2022
EXAMPLE
The reversed binary expansion of 40 is (0,0,0,1,0,1), with positions of 1's being {4,6}, so a(40) = GCD(4,6) = 2.
MAPLE
f:= proc(n) local B;
B:= convert(n, base, 2);
igcd(op(select(t -> B[t]=1, [$1..ilog2(n)+1])))
end proc:
map(f, [$1..100]); # Robert Israel, Oct 13 2020
MATHEMATICA
Table[GCD@@Join@@Position[Reverse[IntegerDigits[n, 2]], 1], {n, 100}]
CROSSREFS
Positions of 1's are A291166, and non-1's are A291165.
GCDs of prime indices are A289508.
GCDs of strict partitions encoded by FDH numbers are A319826.
Numbers whose binary positions are pairwise coprime are A326675.
Sequence in context: A006083 A338713 A080301 * A331184 A333768 A306922
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, Jul 17 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 07:54 EDT 2024. Contains 371922 sequences. (Running on oeis4.)