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.

A161153 Positive integers that are coprime to their number of digits in binary representation.

This page as a plain text file.
%I A161153 #25 Jun 28 2025 10:56:05
%S A161153 1,3,4,5,7,9,11,13,15,16,17,18,19,21,22,23,24,26,27,28,29,31,35,37,41,
%T A161153 43,47,49,53,55,59,61,64,65,66,67,68,69,71,72,73,74,75,76,78,79,80,81,
%U A161153 82,83,85,86,87,88,89,90,92,93,94,95,96,97,99,100,101,102,103,104,106
%N A161153 Positive integers that are coprime to their number of digits in binary representation.
%H A161153 Indranil Ghosh, <a href="/A161153/b161153.txt">Table of n, a(n) for n = 1..1000</a>
%t A161153 Select[Range[106], GCD[Length[IntegerDigits[#, 2]], #]==1 &] (* _Indranil Ghosh_, Mar 08 2017 *)
%o A161153 (PARI) for(n=1, 106, if(gcd(#digits(n, 2), n)==1, print1(n,", "))) \\ _Indranil Ghosh_, Mar 08 2017
%o A161153 (Python)
%o A161153 from math import gcd
%o A161153 i=1
%o A161153 j=1
%o A161153 while j<=100:
%o A161153     if gcd(len(bin(i)[2:]),i)==1:
%o A161153         print(j, i)
%o A161153         j+=1
%o A161153     i+=1 # _Indranil Ghosh_, Mar 08 2017
%Y A161153 Cf. A094387, A161152, A161154, A161155, A161156.
%K A161153 base,nonn
%O A161153 1,2
%A A161153 _Leroy Quet_, Jun 03 2009
%E A161153 Extended by _Ray Chandler_, Jun 11 2009
%E A161153 Name edited by _Michel Marcus_, Apr 30 2021