cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348416 For n >= 1; a(n) = gcd(n,w(n)) where w(n) is the binary weight of n, A000120(n).

This page as a plain text file.
%I A348416 #25 Oct 19 2021 15:22:59
%S A348416 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,
%T A348416 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,
%U A348416 3,1,1,2,1,1,1,1,1,2,1,2,3,1,1,3
%N A348416 For n >= 1; a(n) = gcd(n,w(n)) where w(n) is the binary weight of n, A000120(n).
%C A348416 a(n) is even for n in A125592, a(n) = 1 for n in A094387.
%F A348416 a(n) = gcd(n, A000120(n)).
%F A348416 a(n) = A000120(n) if and only if n is in A049445. - _Amiram Eldar_, Oct 19 2021
%e A348416 n = 6; gcd(6, A000120(6)) = 2, thus a(6) = 2.
%t A348416 Array[GCD[#, Total@ IntegerDigits[#, 2]] &, 105] (* _Michael De Vlieger_, Oct 19 2021 *)
%o A348416 (PARI) a(n) = gcd(n, hammingweight(n)); \\ _Michel Marcus_, Oct 19 2021
%Y A348416 Cf. A000120, A001969, A049445, A094387, A125592.
%K A348416 nonn,base
%O A348416 1,6
%A A348416 _Ctibor O. Zizka_, Oct 19 2021