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!)
A348416 For n >= 1; a(n) = gcd(n,w(n)) where w(n) is the binary weight of n, A000120(n). 1
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 3, 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, 5, 1, 1, 2, 1, 4, 1, 1, 3, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
a(n) is even for n in A125592, a(n) = 1 for n in A094387.
LINKS
FORMULA
a(n) = gcd(n, A000120(n)).
a(n) = A000120(n) if and only if n is in A049445. - Amiram Eldar, Oct 19 2021
EXAMPLE
n = 6; gcd(6, A000120(6)) = 2, thus a(6) = 2.
MATHEMATICA
Array[GCD[#, Total@ IntegerDigits[#, 2]] &, 105] (* Michael De Vlieger, Oct 19 2021 *)
PROG
(PARI) a(n) = gcd(n, hammingweight(n)); \\ Michel Marcus, Oct 19 2021
CROSSREFS
Sequence in context: A066955 A089048 A329443 * A263025 A184348 A307614
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Oct 19 2021
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 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)